sl_mqtt_client
|
#include <sl_mqtt_client.h>
Public Attributes | |
void(* | sl_ExtLib_MqttRecv )(void *app_hndl, const char *topstr, _i32 toplen, const void *payload, _i32 pay_len, bool dup, unsigned char qos, bool retain) |
void(* | sl_ExtLib_MqttEvent )(void *app_hndl, _i32 evt, const void *buf, _u32 len) |
void(* | sl_ExtLib_MqttDisconn )(void *app_hndl) |
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.
Member Data Documentation
void(* SlMqttClientCbs_t::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
void(* SlMqttClientCbs_t::sl_ExtLib_MqttEvent)(void *app_hndl, _i32 evt, const void *buf, _u32 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:
void(* SlMqttClientCbs_t::sl_ExtLib_MqttRecv)(void *app_hndl, const char *topstr, _i32 toplen, const void *payload, _i32 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.
The documentation for this struct was generated from the following file:
- D:/Project/SimpleLink/mqtt/doxygen/client/sl_mqtt_client.h
Generated on Thu Jan 15 2015 18:26:27 for sl_mqtt_client by 1.8.0