u-blox / Mbed 2 deprecated Cellular_m2x-demo-all

Dependencies:   C027_Support M2XStreamClient jsonlite mbed-rtos mbed

Fork of Cellular_m2x-demo-all by Michael Ammann

Revision:
16:5f9a8ea108bb
Parent:
14:fa2f402e4ce8
Child:
17:cad6c0ab9811
--- a/main.cpp	Fri Dec 12 08:04:29 2014 +0000
+++ b/main.cpp	Fri Dec 12 08:19:22 2014 +0000
@@ -33,7 +33,7 @@
 Client client;
 M2XStreamClient m2xClient(&client, m2xKey);
 
-void on_data_point_found(const char* at, const char* value, int index, void* context) {
+void on_data_point_found(const char* at, const char* value, int index, void* context, int type) {
   printf("Found a data point, index: %d\r\n", index);
   printf("At: %s Value: %s\r\n", at, value);
 }
@@ -93,14 +93,14 @@
         MDMParser::NetStatus status;
         if (mdm.checkNetStatus(&status)) {
             sprintf(buf, "%d", status.rssi);
-            response = m2xClient.put(feedId, "rssi", buf);
+            response = m2xClient.updateStreamValue(feedId, "rssi", buf);
             printf("Put response code: %d\r\n", response);
             if (response == -1) while (true) ;
         }
-//#define READING
+#define READING
 #ifdef READING
         // read signal strength
-        response = m2xClient.fetchValues(feedId, "rssi", on_data_point_found, NULL);
+        response = m2xClient.listStreamValues(feedId, "rssi", on_data_point_found, NULL);
         printf("Fetch response code: %d\r\n", response);
         if (response == -1) while (true) ;
 #endif