Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Revision:
98:9f2de96941c4
Parent:
96:5dfdc8568e9f
Child:
101:dbcd3bc51758
--- a/DeviceBootstrap.cpp	Mon Apr 27 13:02:50 2015 +0000
+++ b/DeviceBootstrap.cpp	Mon Apr 27 13:30:21 2015 +0000
@@ -3,6 +3,7 @@
 #include <string.h>
 #include "DeviceBootstrap.h"
 #include "rtos.h"
+#include "DeviceMemory.h"
 #include "LCDDisplay.h"
 #include "ComposedRecord.h"
 #include "CharValue.h"
@@ -12,10 +13,9 @@
 #include "logging.h"
 
 DeviceBootstrap::DeviceBootstrap(AbstractSmartRest& client,
-    DeviceInfo& deviceInfo, DeviceMemory& deviceMemory) :
+    DeviceInfo& deviceInfo) :
     _client(client),
-    _deviceInfo(deviceInfo),
-    _deviceMemory(deviceMemory)
+    _deviceInfo(deviceInfo)
 {
     *_username = *_password = '\0';
 }
@@ -44,7 +44,7 @@
 
 bool DeviceBootstrap::obtainFromStorage()
 {
-    return _deviceMemory.loadPlatformCredentials(_username, _password, DEVICE_BOOTSTRAP_CREDENTIALS_LENGTH);
+    return loadPlatformCredentials(_username, _password, DEVICE_BOOTSTRAP_CREDENTIALS_LENGTH);
 }
 
 bool DeviceBootstrap::obtainFromPlatform()
@@ -99,7 +99,7 @@
 
 bool DeviceBootstrap::writeToStorage()
 {
-    return _deviceMemory.savePlatformCredentials(_username, _password, DEVICE_BOOTSTRAP_CREDENTIALS_LENGTH);
+    return savePlatformCredentials(_username, _password, DEVICE_BOOTSTRAP_CREDENTIALS_LENGTH);
 }
 
 void DeviceBootstrap::setCredentials(const char *tenant, const char *username, const char *password)