Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Revision:
99:47ea098f8a47
Parent:
98:e369fc75c000
Child:
100:dbcd3bc51758
diff -r e369fc75c000 -r 47ea098f8a47 MbedAgent.cpp
--- a/MbedAgent.cpp	Thu May 07 09:57:55 2015 +0000
+++ b/MbedAgent.cpp	Thu May 07 13:56:19 2015 +0000
@@ -4,19 +4,17 @@
 #include "watchdog.h"
 
 MbedAgent::MbedAgent(DeviceInfo& deviceInfo):
-    _deviceId(0),
-    _client(),
-    _bootstrap(_client, deviceInfo),
-    _integration(_client, _tpl, _deviceId, deviceInfo),
-    _configSync(_client, _tpl, _deviceId),
-    _signalQualityMeasurement(_client, _tpl, _deviceId, deviceInfo),
-    _temperatureMeasurement(_client, _tpl, _deviceId, deviceInfo),
-    _accelerationMeasurement(_client, _tpl, _deviceId, deviceInfo),
-    _analogMeasurement(_client, _tpl, _deviceId, deviceInfo),
-    _locationUpdate(_client, _tpl, _deviceId, deviceInfo),
-    pool(),
-    _operationSupport(_client, _tpl, _deviceId, pool)
+    _client(), tpl(), _bootstrap(_client, deviceInfo), 
+    _integration(_client, _tpl, deviceInfo), lcdThirdLineBlank(true), 
+    signal(), temp(), poti(), gps(), acc(), conf(), sock(),
+    pool(), _operationSupport(_client, _tpl, pool)
 {
+    reporters[0] = &signal;
+    reporters[1] = &temp;
+    reporters[2] = &poti;
+    reporters[3] = &gps;
+    reporters[4] = &acc;
+    reporters[5] = &conf;
 }
 
 bool MbedAgent::init()
@@ -26,30 +24,6 @@
         LCDDisplay::inst().setLines("Integrate init fail");
         flag = false;
     }
-    if (!_configSync.init()) {
-        LCDDisplay::inst().setLines("ConfigSync init fail");
-        flag = false;
-    }
-    if (!_signalQualityMeasurement.init()) {
-        LCDDisplay::inst().setLines("Signal init fail");
-        flag = false;
-    }
-    if (!_temperatureMeasurement.init()) {
-        LCDDisplay::inst().setLines("Temp init fail");
-        flag = false;
-    }
-    if (!_accelerationMeasurement.init()) {
-        LCDDisplay::inst().setLines("Acc init fail");
-        flag = false;
-    }
-    if (!_analogMeasurement.init()) {
-        LCDDisplay::inst().setLines("Analog init fail");
-        flag = false;
-    }
-    if (!_locationUpdate.init()) {
-        LCDDisplay::inst().setLines("Location init fail");
-        flag = false;
-    }
     if (!_operationSupport.init()) {
         LCDDisplay::inst().setLines("Operation init fail");
         flag = false;