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

Dependencies:   MQTT

Dependents:   MilkcocoaSample MilkcocoaSampleESP8266_LED MilkcocoaSampleESP8266 MilkcocoaSample_3G ... more

Revision:
2:9afb66979712
Parent:
1:4a634c06c5dc
diff -r 4a634c06c5dc -r 9afb66979712 MClient.h
--- a/MClient.h	Fri Dec 18 04:30:59 2015 +0000
+++ b/MClient.h	Mon Feb 29 09:18:16 2016 +0000
@@ -1,13 +1,20 @@
 #ifndef _MCLIENT_H_
 #define _MCLIENT_H_
 
+#if defined(TARGET_UBLOX_C027)
+#define USE_MDM
+#elif defined(TARGET_LPC1768) || defined(TARGET_K64F) || defined(TARGET_W7500x)
+#define USE_ETHERNET
+#else 
 #define USE_ESP8266
-//#define USE_ETHERNET
+#endif
 
 #include "mbed.h"
-#ifdef USE_ESP8266
+#if defined(USE_ESP8266)
 #include "MQTTESP8266.h"
-#else
+#elif defined(USE_MDM)
+#include "MQTTMDM.h"
+#else 
 #include "MQTTEthernet.h"
 #endif
 #include "MQTTClient.h"
@@ -18,6 +25,8 @@
     typedef void (*messageHandler)(MQTT::MessageData&);
 #ifdef USE_ESP8266
 	MClient(MQTTESP8266 *ipstack) : client(MQTT::Client<MQTTESP8266, Countdown>(*ipstack))
+#elif defined(USE_MDM)
+	MClient(MQTTMDM *ipstack) : client(MQTT::Client<MQTTMDM, Countdown>(*ipstack))
 #else
 	MClient(MQTTEthernet *ipstack) : client(MQTT::Client<MQTTEthernet, Countdown>(*ipstack))
 #endif
@@ -76,6 +85,9 @@
 #ifdef USE_ESP8266
 	MQTT::Client<MQTTESP8266, Countdown> client;
   	MQTTESP8266 *_ipstack;
+#elif defined(USE_MDM)
+	MQTT::Client<MQTTMDM, Countdown> client;
+  	MQTTMDM *_ipstack;
 #else
 	MQTT::Client<MQTTEthernet, Countdown> client;
   	MQTTEthernet *_ipstack;