An AirVantage layer for MQTT

Dependencies:   niMQTT picojson

Dependents:   AV_MQTT_example

Committer:
Nim65s
Date:
Tue Aug 13 12:31:37 2013 +0000
Revision:
6:b251f6276497
Parent:
0:37b9835622f9
Child:
7:da5d90052cec
is now a daugther of niMQTT, and able to parse the JSON from AirVantage

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Nim65s 0:37b9835622f9 1 #ifndef AV_MQTT_H
Nim65s 0:37b9835622f9 2 #define AV_MQTT_H
Nim65s 0:37b9835622f9 3
Nim65s 0:37b9835622f9 4 #include "niMQTT.h"
Nim65s 6:b251f6276497 5 #include "picojson.h"
Nim65s 0:37b9835622f9 6
Nim65s 6:b251f6276497 7 class AV_MQTT: public niMQTT {
Nim65s 0:37b9835622f9 8 public:
Nim65s 6:b251f6276497 9 AV_MQTT(char *server, void (*callback)(const char *, const char*), char *username="", char *password="", char *id="mbed", int port=1883, bool debug=false);
Nim65s 0:37b9835622f9 10 void pub(char *key, char *value);
Nim65s 6:b251f6276497 11 void publish_received();
Nim65s 6:b251f6276497 12
Nim65s 6:b251f6276497 13 protected:
Nim65s 0:37b9835622f9 14 char *topic;
Nim65s 6:b251f6276497 15 void call_callback(const char *topic, const char *message);
Nim65s 0:37b9835622f9 16 };
Nim65s 0:37b9835622f9 17
Nim65s 6:b251f6276497 18 #endif