sl_mqtt_client: SlMqttClientCbs_t Struct Reference

SimpleLink MQTT Client Layer

SlMqttClientCbs_t Struct Reference

#include <sl_mqtt_client.h>

List of all members.

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

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

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

[in]app_hndlapplication 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.

[in]app_hndlapplication handle returned
[in]evtidentifier to the reported event. Refer to SL MQTT Client Events
[in]bufpoints to buffer
[in]lenlength of buffer
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.

[in]app_hndlapplication handle returned
[in]topstrname of topic published by the server. Not NUL terminated.
[in]toplenlength of the topic name published by the server.
[in]payloadrefers to payload published by the server.
[in]pay_lenlength of the payload.
[in]dupassert to indicate that it is re-send by the server
[in]qoSquality of service of the published message
[in]retainasserted to indicate that a retained message has been published

The documentation for this struct was generated from the following file:
Generated on Thu Jan 15 2015 18:26:27 for sl_mqtt_client by   doxygen 1.8.0