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-26
- Revision:
- 43:b1ae0ac88df9
- Parent:
- 41:b7e86fa6dbb8
- Child:
- 44:f53a95f9c1d8
File content as of revision 43:b1ae0ac88df9:
#if !defined(MQTTETHERNET_H) #define MQTTETHERNET_H #include "MQTT_mbed.h" #include "../W5500Interface/EthernetInterface.h" #include "MQTTSocket.h" class MQTTEthernet : public MQTTSocket { public: // MQTTEthernet() // { // eth.init(); // Use DHCP // eth.connect(); // } MQTTEthernet(SPI* spi, PinName cs, PinName reset): eth(spi, cs, reset) { eth.init(); eth.connect(); } EthernetInterface& getEth() { return eth; } void reconnect() { eth.connect(); // nothing I've tried actually works to reconnect } private: EthernetInterface eth; }; #endif