![]() |
Thingstream Client Library
BLD4131-v2.13
|
ThingstreamTransport implementation that communicates with a modem through a serial connection. More...
#include "transport_api.h"
Functions | |
ThingstreamTransport * | Thingstream_createModemUssdTransport (ThingstreamTransport *inner, uint16_t flags) |
ThingstreamTransportResult | Thingstream_ModemUssd_sendLine (ThingstreamTransport *self, const char *line, uint32_t millis) |
uint32_t | Thingstream_ModemUssd_getCUSDErrors (ThingstreamTransport *self, uint32_t andClear) |
uint32_t | Thingstream_ModemUssd_getSeriousErrors (ThingstreamTransport *self, uint32_t andClear) |
ThingstreamTransport implementation that communicates with a modem through a serial connection.
ThingstreamTransport* Thingstream_createModemUssdTransport | ( | ThingstreamTransport * | inner, |
uint16_t | flags | ||
) |
Create an instance of the modem transport.
inner | the inner ThingstreamTransport instance to use |
flags | a set of control flags. See modem flags. Set flags to '0' to get the default settings. |
uint32_t Thingstream_ModemUssd_getCUSDErrors | ( | ThingstreamTransport * | self, |
uint32_t | andClear | ||
) |
Return the number of accumulated +CUSD: errors.
self | instance of modem transport |
andClear | if non-zero, then clear the count. |
uint32_t Thingstream_ModemUssd_getSeriousErrors | ( | ThingstreamTransport * | self, |
uint32_t | andClear | ||
) |
Return the number of accumulated serious errors (those that trigger a modem reset to recover)
self | instance of modem transport |
andClear | if non-zero, then clear the count. |
ThingstreamTransportResult Thingstream_ModemUssd_sendLine | ( | ThingstreamTransport * | self, |
const char * | line, | ||
uint32_t | millis | ||
) |
Send the line to the modem and wait for an OK response. The application can implement Thingstream_Application_modemCallback() to receive any response from the modem caused by the sent line.
self | instance of modem transport |
line | a null-terminated line to send to the modem ("\r\n" will be added) |
millis | the maximum number of milliseconds to run |