Thingstream Client Library  BLD4131-v2.13
Functions
thingstream_transport.h File Reference

Thingstream protocol implementation. More...

#include "transport_api.h"

Functions

ThingstreamTransportThingstream_createProtocolTransport (ThingstreamTransport *inner, uint8_t *buffer, uint16_t len)
 
ThingstreamTransportResult Thingstream_Protocol_setUssdSessionDelay (ThingstreamTransport *transport, uint32_t delay)
 

Detailed Description

Thingstream protocol implementation.

Function Documentation

◆ Thingstream_createProtocolTransport()

ThingstreamTransport* Thingstream_createProtocolTransport ( ThingstreamTransport inner,
uint8_t *  buffer,
uint16_t  len 
)

Create a thingstream protocol transport instance. This wraps MQTT-SN data in a structure identifying the payload to the server infrastructure. The caller can provide a buffer to use for this codec, allowing payload lengths larger than the underlying transport by using fragmentation and reassembly. If NULL is passed in, or the buffer length is zero, this codec will use the buffer of the inner transport, thus limiting payload length to the MTU of the transport.

Parameters
innerthe underlying ThingstreamTransport instance
buffera buffer to use for reassembling inner ThingstreamTransport packets
lenthe length of the provided buffer
Returns
the new ThingstreamTransport instance

◆ Thingstream_Protocol_setUssdSessionDelay()

ThingstreamTransportResult Thingstream_Protocol_setUssdSessionDelay ( ThingstreamTransport transport,
uint32_t  delay 
)

This api allows the default time between USSD sessions to be defined. The call must happen before the call to Thingstream_Client_connect().

Parameters
transportthe ThingstreamTransport instance
delaythe delay, in milliseconds, between USSD sessions
Returns
a ThingstreamTransportResult status code (success / fail)