Modified MQTT for Mbed OS.
Dependents: mbed-os-mqtt door_lock co657_IoT nucleo-f429zi-mbed-os-mqtt
Fork of MQTT by
MQTTEthernet.h
- Committer:
- azazeal88
- Date:
- 2016-11-18
- Revision:
- 51:ac90fd2dd859
- Parent:
- 50:2133433118ef
File content as of revision 51:ac90fd2dd859:
#if !defined(MQTTETHERNET_H) #define MQTTETHERNET_H #include "MQTTmbed.h" #include "EthernetInterface.h" #include "MQTTSocket.h" class MQTTEthernet : public MQTTSocket { public: MQTTEthernet() { connectInterface(); } EthernetInterface& getInterface() { return eth; } EthernetInterface& getEth() __attribute__ ((deprecated)) { return eth; } const char * get_ip_address() { return eth.get_ip_address(); } int connectInterface(){ return eth.connect(); } int reconnectInterface() { disconnect(); return eth.connect(); } int disconnectInterface() { return eth.disconnect(); } private: EthernetInterface eth; }; #endif