【mbed OS5対応バージョン】データの保存、更新、取得ができるWebサービス「milkcocoa」に接続し、データのプッシュ、送信、取得ができるライブラリです。 https://mlkcca.com/

Dependents:   mbed-os-example-wifi-milkcocoa MilkcocoaOsSample_Eth MilkcocoaOsSample_ESP8266 MilkcocoaOsSample_Eth_DigitalIn

Committer:
jksoft
Date:
Thu Feb 09 07:26:57 2017 +0000
Revision:
0:0a2f634d3324
??

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:0a2f634d3324 1
jksoft 0:0a2f634d3324 2 #if !defined(MQTTETHERNET_H)
jksoft 0:0a2f634d3324 3 #define MQTTETHERNET_H
jksoft 0:0a2f634d3324 4
jksoft 0:0a2f634d3324 5 #include "MQTTmbed.h"
jksoft 0:0a2f634d3324 6 #include "EthernetInterface.h"
jksoft 0:0a2f634d3324 7 #include "MQTTSocket.h"
jksoft 0:0a2f634d3324 8
jksoft 0:0a2f634d3324 9 class MQTTEthernet : public MQTTSocket
jksoft 0:0a2f634d3324 10 {
jksoft 0:0a2f634d3324 11 public:
jksoft 0:0a2f634d3324 12 MQTTEthernet()
jksoft 0:0a2f634d3324 13 {
jksoft 0:0a2f634d3324 14 eth.init(); // Use DHCP
jksoft 0:0a2f634d3324 15 eth.connect();
jksoft 0:0a2f634d3324 16 }
jksoft 0:0a2f634d3324 17
jksoft 0:0a2f634d3324 18 EthernetInterface& getEth()
jksoft 0:0a2f634d3324 19 {
jksoft 0:0a2f634d3324 20 return eth;
jksoft 0:0a2f634d3324 21 }
jksoft 0:0a2f634d3324 22
jksoft 0:0a2f634d3324 23 void reconnect()
jksoft 0:0a2f634d3324 24 {
jksoft 0:0a2f634d3324 25 eth.connect(); // nothing I've tried actually works to reconnect
jksoft 0:0a2f634d3324 26 }
jksoft 0:0a2f634d3324 27
jksoft 0:0a2f634d3324 28 private:
jksoft 0:0a2f634d3324 29
jksoft 0:0a2f634d3324 30 EthernetInterface eth;
jksoft 0:0a2f634d3324 31
jksoft 0:0a2f634d3324 32 };
jksoft 0:0a2f634d3324 33
jksoft 0:0a2f634d3324 34
jksoft 0:0a2f634d3324 35 #endif