An API for using MQTT over multiple transports
Dependencies: FP MQTTPacket
Dependents: IBMIoTClientEthernetExample_W5500 IBMIoTClientEthernetExample_W5200
Fork of MQTT by
MQTTEthernet.h
- Committer:
- kaizen
- Date:
- 2014-09-29
- Revision:
- 44:f53a95f9c1d8
- Parent:
- 43:b1ae0ac88df9
File content as of revision 44:f53a95f9c1d8:
#if !defined(MQTTETHERNET_H) #define MQTTETHERNET_H #include "MQTT_mbed.h" #include "MQTTSocket.h" #include "../W5500Interface/EthernetInterface.h" class MQTTEthernet : public MQTTSocket { public: MQTTEthernet(SPI* spi, PinName cs, PinName reset): eth(spi, cs, reset) { wait(1); this->createSocket(); eth.init(); eth.connect(); } EthernetInterface& getEth() { return eth; } void reconnect() { eth.connect(); // nothing I've tried actually works to reconnect } private: EthernetInterface eth; }; #endif