|
KPN Things Device SDK
|
Functions | |
| int | printByte (uint8_t value) |
| int | printInt (int i) |
| int | printDouble (double f, unsigned int digits) |
| int | printBinaryAsBase64 (const unsigned char *data, unsigned int length) |
| int | printUnit (SenMLUnit unit) |
| int | printText (const char *const value, int length) |
| bool | canPrint (int length) |
| int | readChar () |
| int | peekChar () |
| void | flush () |
Variables | |
| StreamContext * | _streamCtx = NULL |
| bool canPrint | ( | int | length | ) |
Helper function for the generation process Determines if the underlying stream has enough space to write length bytes (_streamCtx).
always returns true for non buffer backed streams
| void flush | ( | ) |
Helper function for the parsing process flush and reset all input for the current data stream.
| int peekChar | ( | ) |
Helper function for the parsing process peek a character from the current data stream. takes into account that the stream might contain hex values.
| int printBinaryAsBase64 | ( | const unsigned char * | data, |
| unsigned int | length | ||
| ) |
Helper function for the generation process convert the data array to base64 string and write to stream (_streamCtx)
| data | pointer to the binary data blob that needs to be rendered as base64 to the stream. |
| length | the length of the data blob |
| int printByte | ( | uint8_t | value | ) |
Helper function for the generation process write a uint8_t as byte to the stream (_streamCtx).
| value | the value to print |
| int printDouble | ( | double | f, |
| unsigned int | digits | ||
| ) |
Helper function for the generation process write a double as string to the stream (_streamCtx).
| f | the value to print |
| digits | the nr of digits that should be printed after the comma. |
| int printInt | ( | int | i | ) |
Helper function for the generation process write a int as string to the stream (_streamCtx).
| i | the value to print |
| int printText | ( | const char * | value, |
| int | length | ||
| ) |
Helper function for the generation process Writes the specified text to the stream (_streamCtx).
| value | the value to write |
| len | the length of the value. |
| int printUnit | ( | SenMLUnit | unit | ) |
Helper function for the generation process convert the unit to string and write to stream (_streamCtx).
| unit | the value to write as text to the stream. |
| int readChar | ( | ) |
Helper function for the parsing process read a character from the current data stream (_streamCtx) takes into account that the stream might contain hex values
| StreamContext* _streamCtx = NULL |
Internal data field used for the rendering process.