【mbed OS5対応バージョン】データの保存、更新、取得ができるWebサービス「milkcocoa」に接続し、データのプッシュ、送信、取得ができるライブラリです。 https://mlkcca.com/
Dependents: mbed-os-example-wifi-milkcocoa MilkcocoaOsSample_Eth MilkcocoaOsSample_ESP8266 MilkcocoaOsSample_Eth_DigitalIn
Diff: MQTT/MQTTEthernet.h
- Revision:
- 0:0a2f634d3324
diff -r 000000000000 -r 0a2f634d3324 MQTT/MQTTEthernet.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MQTT/MQTTEthernet.h Thu Feb 09 07:26:57 2017 +0000 @@ -0,0 +1,35 @@ + +#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