An API for using MQTT over multiple transports
Dependencies: FP MQTTPacket
Dependents: IBMIoTClientEthernetExample_W5500 IBMIoTClientEthernetExample_W5200
Fork of MQTT by
Diff: MQTTEthernet.h
- Revision:
- 44:f53a95f9c1d8
- Parent:
- 43:b1ae0ac88df9
--- a/MQTTEthernet.h Fri Sep 26 08:04:47 2014 +0000 +++ b/MQTTEthernet.h Mon Sep 29 04:56:42 2014 +0000 @@ -1,24 +1,19 @@ - #if !defined(MQTTETHERNET_H) #define MQTTETHERNET_H #include "MQTT_mbed.h" +#include "MQTTSocket.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) { + wait(1); + this->createSocket(); eth.init(); - eth.connect(); + eth.connect(); } EthernetInterface& getEth() @@ -32,10 +27,8 @@ } private: - EthernetInterface eth; }; - #endif