An API for using MQTT over multiple transports

Dependencies:   FP MQTTPacket

Dependents:   Cellular_HelloMQTT IoTStarterKit GSwifiInterface_HelloMQTT IBMIoTClientEthernetExample ... more

This library is part of the EclipseTM Paho project; specifically the embedded client.

The goals of this API are:

  1. to be independent of any system library: hence templates parameters for networking, timer and threading classes
  2. not to rely on heap storage, only automatic (I think this is a good thing)
  3. to limit memory use, for instance by defining the size of the buffers and arrays used at object creation time

Files at this revision

API Documentation at this revision

Comitter:
icraggs
Date:
Fri Aug 01 17:01:13 2014 +0000
Parent:
36:2f1ada427e56
Child:
38:affdb8bd3e7c
Commit message:
Cater for session present flag on connack

Changed in this revision

MQTTClient.h Show annotated file Show diff for this revision Revisions of this file
MQTTPacket.lib Show annotated file Show diff for this revision Revisions of this file
--- a/MQTTClient.h	Fri Aug 01 14:45:25 2014 +0000
+++ b/MQTTClient.h	Fri Aug 01 17:01:13 2014 +0000
@@ -53,9 +53,7 @@
 struct MessageData
 {
     MessageData(MQTTString &aTopicName, struct Message &aMessage)  : message(aMessage), topicName(aTopicName)
-    {
-
-    }
+    { }
     
     struct Message &message;
     MQTTString &topicName;
@@ -538,7 +536,8 @@
     if (waitfor(CONNACK, connect_timer) == CONNACK)
     {
         unsigned char connack_rc = 255;
-        if (MQTTDeserialize_connack(&connack_rc, readbuf, MAX_MQTT_PACKET_SIZE) == 1)
+        bool sessionPresent = false;
+        if (MQTTDeserialize_connack((unsigned char*)&sessionPresent, &connack_rc, readbuf, MAX_MQTT_PACKET_SIZE) == 1)
             rc = connack_rc;
         else
             rc = FAILURE;
--- a/MQTTPacket.lib	Fri Aug 01 14:45:25 2014 +0000
+++ b/MQTTPacket.lib	Fri Aug 01 17:01:13 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/mqtt/code/MQTTPacket/#c2052aee81de
+http://mbed.org/teams/mqtt/code/MQTTPacket/#d0b3886ada32