![]() |
Thingstream Client Library
BLD4131-v2.13
|
ThingstreamTransport implementation that adds line buffering on callbacks e.g. between a serial connection and a modem driver. More...
#include <transport_api.h>
Macros | |
#define | Thingstream__lineBufferEncodedSize(dataSize, lineLen) (dataSize | (((uint32_t)lineLen) << 16)) |
Functions | |
ThingstreamTransport * | Thingstream_createLineBufferTransport (ThingstreamTransport *inner, uint8_t *data, uint32_t dataSize) |
ThingstreamTransport * | Thingstream_createLineBufferTransport_2 (ThingstreamTransport *inner, uint8_t *data, uint32_t dataSize) |
ThingstreamTransport * | Thingstream_createLineBufferTransport_3 (ThingstreamTransport *inner, uint8_t *data, uint32_t dataSize) |
ThingstreamTransport * | Thingstream__createLegacyLineBufferTransport (ThingstreamTransport *inner, uint8_t *data, uint16_t dataSize) |
ThingstreamTransport implementation that adds line buffering on callbacks e.g. between a serial connection and a modem driver.
#define Thingstream__lineBufferEncodedSize | ( | dataSize, | |
lineLen | |||
) | (dataSize | (((uint32_t)lineLen) << 16)) |
The 'dataSize' argument to Thingstream_createLineBufferTransport() can be encoded to specify the length of the line buffer used for the callback. This helper encodes the two sizes (overall size of the data are and the length of the callback line buffer) in the format required by the Thingstream_createLineBufferTransport() apis.
dataSize | the size of the data area (must be at least twice lineLen) |
lineLen | the size of the callback buffer line |
ThingstreamTransport* Thingstream_createLineBufferTransport | ( | ThingstreamTransport * | inner, |
uint8_t * | data, | ||
uint32_t | dataSize | ||
) |
Create a transport instance that line-buffers a sequence of bytes for callbacks.
The callback of this transport can be safely called from interrupt handlers.
Do not mix calls to Thingstream_createLineBufferTransport() with calls to either the legacy macro line_buffer_transport_create() or the Thingstream__createLegacyLineBufferTransport() function.
inner | the inner ThingstreamTransport instance to use |
data | an area of data to use for the buffers |
dataSize | the size of the data area |
ThingstreamTransport* Thingstream_createLineBufferTransport_2 | ( | ThingstreamTransport * | inner, |
uint8_t * | data, | ||
uint32_t | dataSize | ||
) |
Create a transport instance (number 2) that line-buffers a sequence of bytes for callbacks.
The callback of this transport can be safely called from interrupt handlers.
Do not mix calls to Thingstream_createLineBufferTransport_2() with calls to either the legacy macro line_buffer_transport_create() or the Thingstream__createLegacyLineBufferTransport() function.
inner | the inner ThingstreamTransport instance to use |
data | an area of data to use for the buffers |
dataSize | the size of the data area |
ThingstreamTransport* Thingstream_createLineBufferTransport_3 | ( | ThingstreamTransport * | inner, |
uint8_t * | data, | ||
uint32_t | dataSize | ||
) |
Create a transport instance (number 3) that line-buffers a sequence of bytes for callbacks.
The callback of this transport can be safely called from interrupt handlers.
Do not mix calls to Thingstream_createLineBufferTransport_3() with calls to either the legacy macro line_buffer_transport_create() or the Thingstream__createLegacyLineBufferTransport() function.
inner | the inner ThingstreamTransport instance to use |
data | an area of data to use for the buffers |
dataSize | the size of the data area |