![]() |
Thingstream Client Library
BLD4131-v2.13
|
Porting functions implemented by the target for use by the SDK. More...
Functions | |
uint32_t | Thingstream_Platform_getTimeMillis (void) |
const char * | Thingstream_Platform_getTimeString (void) |
void | Thingstream_Platform_puts (const char *str, int len) |
void | Thingstream_Platform_assertionFailure (int location, const char *expr) |
Porting functions implemented by the target for use by the SDK.
void Thingstream_Platform_assertionFailure | ( | int | location, |
const char * | expr | ||
) |
Report an assertion failure. When using the debug version of the SDK, calls will be made to this function to report errors. For example, when invalid parameters are passed to SDK functions. It is strongly recommended that this version of the SDK is used during development, and that this function is implemented in such a way that it is very obvious that it has been called.
location | a representation of the location of the problem |
expr | details of the problem |
uint32_t Thingstream_Platform_getTimeMillis | ( | void | ) |
Return the current time in milliseconds. May return milliseconds since system start, epoch, or any other reference point. This is used by the client for measuring time intervals only.
const char* Thingstream_Platform_getTimeString | ( | void | ) |
Returns a string representation of the current time (e.g. for logging)
Optional The SDK provides a very simple implementation of this function that formats the milliseconds as if it were a floating point number of seconds to 3 decimal places. e.g. 51234.351
If you wish loggers to use an alternative format, e.g. local time, then the platform should implement this function.
void Thingstream_Platform_puts | ( | const char * | str, |
int | len | ||
) |
Output a string to a debugging stream.
Optional only needed if Thingstream_Util_printf() is called.
str | the string to be written (may not be 0-terminated) |
len | the number of characters to write (may be zero). |