An AirVantage layer for MQTT

Dependencies:   niMQTT picojson

Dependents:   AV_MQTT_example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AV_MQTT.h Source File

AV_MQTT.h

00001 #ifndef AV_MQTT_H
00002 #define AV_MQTT_H
00003 
00004 #include "niMQTT.h"
00005 #include "picojson.h"
00006 
00007 class AV_MQTT: public niMQTT {
00008     public:
00009         AV_MQTT(char *server, void (*callback)(const char *, const char*), char *username="", char *password="", char *id="mbed", int port=1883, bool debug=false);
00010         void pub(char *key, char *value);
00011         void publish_received();
00012     
00013     protected:
00014         char *topic;
00015         virtual void call_callback(const char *topic, const char *message);
00016 };
00017 
00018 #endif