Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: MQTTTransport.h
- Revision:
- 15:e44d75d95b38
- Parent:
- 13:25448d92c205
- Child:
- 69:090e16acccb7
--- a/MQTTTransport.h Thu Feb 27 04:09:39 2014 +0000
+++ b/MQTTTransport.h Thu Feb 27 06:05:01 2014 +0000
@@ -22,12 +22,13 @@
// Base Class
#include "Transport.h"
+// MQTT Support
+#include "PubSubClient.h"
+
// MBED to IOC Resource Map
#include "MBEDToIOCResourceMap.h"
-// MQTT Support
-#include "PubSubClient.h"
-
+// largest MQTT message that PubSubClient will send
#define MAX_MQTT_MESSAGE_LENGTH 127
class MQTTTransport : public Transport {
@@ -38,7 +39,7 @@
char m_endpoint_name[LIGHT_NAME_LEN+1];
public:
- MQTTTransport(ErrorHandler *error_handler,void *endpoint);
+ MQTTTransport(ErrorHandler *error_handler,void *endpoint,MBEDToIOCResourceMap *map);
virtual ~MQTTTransport();
void processMessage(char *message_name,char *payload, unsigned int len);
@@ -56,6 +57,7 @@
char *getTopic();
char *mapIOCResourceToEndpointResource(char *ioc_name);
void sendResult(char *endpoint_name,char *parameter_name,char *value,bool success);
+ MBEDToIOCResourceMap *getMap();
};
#endif // ___MQTTTRANSPORT_H_
\ No newline at end of file