An AirVantage layer for MQTT

Dependencies:   niMQTT picojson

Dependents:   AV_MQTT_example

Committer:
Nim65s
Date:
Tue Aug 13 13:36:45 2013 +0000
Revision:
7:da5d90052cec
Parent:
6:b251f6276497
call_callback is now virtual from niMQTT

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 7:da5d90052cec 15 virtual void call_callback(const char *topic, const char *message);
Nim65s 0:37b9835622f9 16 };
Nim65s 0:37b9835622f9 17
Nim65s 6:b251f6276497 18 #endif