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
Diff: MbedAgent.h
- Revision:
- 100:47ea098f8a47
- Parent:
- 99:e369fc75c000
- Child:
- 101:dbcd3bc51758
diff -r e369fc75c000 -r 47ea098f8a47 MbedAgent.h --- a/MbedAgent.h Thu May 07 09:57:55 2015 +0000 +++ b/MbedAgent.h Thu May 07 13:56:19 2015 +0000 @@ -1,23 +1,26 @@ #ifndef MBEDAGENT_H #define MBEDAGENT_H -#include <stddef.h> #include "SmartRest.h" #include "SmartRestTemplate.h" #include "DeviceInfo.h" #include "DeviceBootstrap.h" #include "DeviceIntegration.h" + +#include "Signal.h" +#include "Temperature.h" +#include "Location.h" +#include "Potentiometer.h" +#include "Acceleration.h" #include "ConfigSync.h" -#include "SignalQualityMeasurement.h" -#include "TemperatureMeasurement.h" -#include "AccelerationMeasurement.h" -#include "AnalogMeasurement.h" -#include "LocationUpdate.h" + #include "OperationSupport.h" #include "SmartRestConf.h" #include "PollThread.h" #include "ReportThread.h" +const size_t N = 6; + class MbedAgent { public: @@ -28,17 +31,21 @@ void loop(); private: - long _deviceId; SmartRest _client; - SmartRestTemplate _tpl; + SmartRestTemplate tpl; DeviceBootstrap _bootstrap; DeviceIntegration _integration; - ConfigSync _configSync; - SignalQualityMeasurement _signalQualityMeasurement; - TemperatureMeasurement _temperatureMeasurement; - AccelerationMeasurement _accelerationMeasurement; - AnalogMeasurement _analogMeasurement; - LocationUpdate _locationUpdate; + bool lcdThirdLineBlank; + Signal signal; + Temperature temp; + Potentiometer poti; + Location gps; + Acceleration acc; + ConfigSync conf; + char buf[SMARTREST_SIZE]; + char line[DISPLAY_LEN]; + AbstractReporter *reporters[N]; + SmartRestSock sock; OperationPool pool; OperationSupport _operationSupport; };