Update revision to use TI's mqtt and Freertos.
Dependencies: mbed client server
Fork of cc3100_Test_mqtt_CM3 by
SlMqttClientCbs_t Struct Reference
[SL MQTT Client API]
Callbacks Routines The routines are invoked by SL Implementation onto Client application. More...
#include <sl_mqtt_client.h>
Data Fields | |
void(* | sl_ExtLib_MqttRecv )(void *app_hndl, const char *topstr, int32_t toplen, const void *payload, int32_t pay_len, bool dup, unsigned char qos, bool retain) |
Callback routine to receive a PUBLISH from the server. | |
void(* | sl_ExtLib_MqttEvent )(void *app_hndl, int32_t evt, const void *buf, uint32_t len) |
Indication of event either from the server or implementation generated. | |
void(* | sl_ExtLib_MqttDisconn )(void *app_hndl) |
Notifies the client app about the termination of MQTT connection. |
Detailed Description
Callbacks Routines The routines are invoked by SL Implementation onto Client application.
- Note:
- The user applications implement the callbacks that are registered with the libraries. While using the MQTT library, invoking the core library APIs from a callback should be avoided and can lead to lockup scenarios. It is recommended to signal another task from the callback routines invoked from the library and invoke the core library API calls from that task.
Definition at line 157 of file sl_mqtt_client.h.
Field Documentation
void(* sl_ExtLib_MqttDisconn)(void *app_hndl) |
Notifies the client app about the termination of MQTT connection.
After servicing this callback, the client-app can destroy associated context if it no longer required
- Parameters:
-
[in] app_hndl application handle returned
Definition at line 204 of file sl_mqtt_client.h.
void(* sl_ExtLib_MqttEvent)(void *app_hndl, int32_t evt, const void *buf, uint32_t len) |
Indication of event either from the server or implementation generated.
These events are notified as part of the processing carried out by the internal recv task of the SL implementation. The application must populate the callback to receive events about the progress made by the SL Mqtt layer.
This handler is used by the SL Mqtt Layer to report acknowledgements from the server, in case, the application has chosen not to block the service invokes till the arrival of the corresponding ACK.
- Parameters:
-
[in] app_hndl application handle returned [in] evt identifier to the reported event. Refer to SL MQTT Client Events [in] buf points to buffer [in] len length of buffer
- Note:
Definition at line 195 of file sl_mqtt_client.h.
void(* sl_ExtLib_MqttRecv)(void *app_hndl, const char *topstr, int32_t toplen, const void *payload, int32_t pay_len, bool dup, unsigned char qos, bool retain) |
Callback routine to receive a PUBLISH from the server.
The client app must provide this routine for the instances where it has subscribed to certain set of topics from the server. The callback is invoked in the context of the internal SL Receive Task.
- Parameters:
-
[in] app_hndl application handle returned [in] topstr name of topic published by the server. Not NUL terminated. [in] toplen length of the topic name published by the server. [in] payload refers to payload published by the server. [in] pay_len length of the payload. [in] dup assert to indicate that it is re-send by the server [in] qoS quality of service of the published message [in] retain asserted to indicate that a retained message has been published
- Returns:
- none.
Definition at line 174 of file sl_mqtt_client.h.
Generated on Tue Jul 12 2022 18:55:11 by 1.7.2