Cumulocity Official / Mbed 2 deprecated MbedSmartRestMain Featured

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Revision:
98:9f2de96941c4
Parent:
96:5dfdc8568e9f
--- a/config/ConfigurationSynchronization.cpp	Mon Apr 27 13:02:50 2015 +0000
+++ b/config/ConfigurationSynchronization.cpp	Mon Apr 27 13:30:21 2015 +0000
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include "ConfigurationSynchronization.h"
+#include "DeviceMemory.h"
 #include "ComposedRecord.h"
 #include "CharValue.h"
 #include "IntegerValue.h"
@@ -7,12 +8,11 @@
 
 ConfigurationSynchronization::ConfigurationSynchronization(
     AbstractSmartRest& client, SmartRestTemplate& tpl,
-    long& deviceId, DeviceMemory& deviceMemory) :
+    long& deviceId) :
     _init (false),
     _changed (false),
     _tpl(tpl),
     _client(client),
-    _deviceMemory(deviceMemory),
     _deviceId(deviceId),
     _deviceConfiguration(),
     _configurationProperties(_deviceConfiguration)
@@ -119,7 +119,7 @@
 {
     char buf[256];
     
-    if (!_deviceMemory.loadConfiguration(buf, sizeof(buf))) {
+    if (!::loadConfiguration(buf, sizeof(buf))) {
         aError("Load device config.\n");
         return false;
     }
@@ -138,7 +138,7 @@
         aError("Write device config.\n");
         return false;
     }
-    if (!_deviceMemory.saveConfiguration(buf)) {
+    if (!::saveConfiguration(buf)) {
         aError("Save device config.\n");
         return false;
     }