Integration of MQTT Watson IoT with MultiEvent demo of Nucleo IKS01A2 sensor board
Fork of MQTT by
MQTTEthernet.h
- Committer:
- vlasov01
- Date:
- 2017-11-07
- Revision:
- 50:87ef607e1494
- Parent:
- 43:21da1f744243
File content as of revision 50:87ef607e1494:
#if !defined(MQTTETHERNET_H)
#define MQTTETHERNET_H
#include "MQTTmbed.h"
#include "EthernetInterface.h"
#include "MQTTSocket.h"
class MQTTEthernet : public MQTTSocket
{
public:
MQTTEthernet()
{
eth.init(); // Use DHCP
eth.connect();
}
EthernetInterface& getEth()
{
return eth;
}
void reconnect()
{
eth.connect(); // nothing I've tried actually works to reconnect
}
private:
EthernetInterface eth;
};
#endif
