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_Support C12832 StatusReporter LM75B MQTT-ansond c027_radios endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: MQTTTransport.h
- Revision:
- 8:45f9a920e82c
- Parent:
- 7:f570eb3f38cd
- Child:
- 13:25448d92c205
--- a/MQTTTransport.h Wed Feb 26 18:59:08 2014 +0000
+++ b/MQTTTransport.h Wed Feb 26 21:29:27 2014 +0000
@@ -28,10 +28,13 @@
// MQTT Support
#include "PubSubClient.h"
+#define MAX_MQTT_MESSAGE_LENGTH 127
+
class MQTTTransport : public Transport {
private:
PubSubClient *m_mqtt;
MBEDToIOCResourceMap *m_map;
+ char m_topic[MQTT_IOC_TOPIC_LEN+1];
char m_endpoint_name[LIGHT_NAME_LEN+1];
public:
@@ -49,8 +52,10 @@
private:
char *makeID(char *id_template, char *buffer);
+ void initTopic();
+ char *getTopic();
char *mapEndpointResourceToIOCResource(char *ioc_name);
- void sendResourceValue(char *endpoint_name,char *parameter_name,char *value);
+ void sendResult(char *endpoint_name,char *parameter_name,char *value,bool success);
};
#endif // ___MQTTTRANSPORT_H_
\ No newline at end of file