Thingstream Client Library  BLD4131-v2.13
Macros | Typedefs | Functions
Modem Callback Backwards Compatibility

APIs to set/clear callbacks that will be called when the modem transport layer receives unexpected responses from the modem. More...

Collaboration diagram for Modem Callback Backwards Compatibility:

Macros

#define Thingstream_ModemUssd_clearCallback(self)    Thingstream_ModemUssd_setCallback((self), NULL, NULL)
 
#define Thingstream_Modem2_clearCallback(self)    Thingstream_Modem2_setCallback((self), NULL, NULL)
 

Typedefs

typedef void(* ThingstreamModemCallback_t) (void *cookie, const char *response, uint16_t len)
 

Functions

void Thingstream_ModemUssd_setCallback (ThingstreamTransport *self, ThingstreamModemCallback_t callback, void *cookie)
 
void Thingstream_Modem2_setCallback (ThingstreamTransport *self, ThingstreamModemCallback_t callback, void *cookie)
 

Detailed Description

APIs to set/clear callbacks that will be called when the modem transport layer receives unexpected responses from the modem.

We recommend that the application provides an implemention of Thingstream_Application_modemCallback() to receive responses from the modem.

Macro Definition Documentation

◆ Thingstream_Modem2_clearCallback

#define Thingstream_Modem2_clearCallback (   self)     Thingstream_Modem2_setCallback((self), NULL, NULL)

Clear the function that will be called when the transport layer receive an unrecognized response. Note that calling this will indicate to the stack that the client no longer wishes to accept unrecognized responses from the modem.

Parameters
selfthis instance of modem transport
Deprecated:
Alternative Thingstream_Application_modemCallback() is preferred

◆ Thingstream_ModemUssd_clearCallback

#define Thingstream_ModemUssd_clearCallback (   self)     Thingstream_ModemUssd_setCallback((self), NULL, NULL)

Clear the function that will be called when the transport layer receives an unrecognized response. Note that calling this will indicate to the stack that the client no longer wishes to accept unrecognized responses from the modem.

Parameters
selfinstance of modem transport
Deprecated:
Alternative Thingstream_Application_modemCallback() is preferred

Typedef Documentation

◆ ThingstreamModemCallback_t

typedef void(* ThingstreamModemCallback_t) (void *cookie, const char *response, uint16_t len)

Type definition of the "modem response arrived" callback

Parameters
cookiethe cookie passed to Thingstream_Modem_setCallback()
responsethe unrecognized modem response
lenthe length of the response
Deprecated:
Alternative Thingstream_Application_modemCallback() is preferred

Function Documentation

◆ Thingstream_Modem2_setCallback()

void Thingstream_Modem2_setCallback ( ThingstreamTransport self,
ThingstreamModemCallback_t  callback,
void *  cookie 
)

Set the function that will be called when the modem receives an unrecognized response.

Parameters
selfthis instance of modem transport
callbackthe ThingstreamModemCallback_t function
cookiea caller supplied opaque item passed when callback is called.
Deprecated:
Alternative Thingstream_Application_modemCallback() is preferred

◆ Thingstream_ModemUssd_setCallback()

void Thingstream_ModemUssd_setCallback ( ThingstreamTransport self,
ThingstreamModemCallback_t  callback,
void *  cookie 
)

Set the function that will be called when the modem receives an unrecognized response.

Parameters
selfinstance of modem transport
callbackthe ThingstreamModemCallback_t function
cookiea caller supplied opaque item passed when callback is called.
Deprecated:
Alternative Thingstream_Application_modemCallback() is preferred