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
measurement/AnalogMeasurement.h@96:5dfdc8568e9f, 2015-04-27 (annotated)
- Committer:
- xinlei
- Date:
- Mon Apr 27 10:50:21 2015 +0000
- Revision:
- 96:5dfdc8568e9f
- Parent:
- 94:61d44636f020
- Child:
- 100:47ea098f8a47
LCDDisplay now is singleton
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cumulocity | 47:89ae46d5c466 | 1 | #ifndef ANALOGMEASUREMENT_H |
Cumulocity | 47:89ae46d5c466 | 2 | #define ANALOGMEASUREMENT_H |
Cumulocity | 47:89ae46d5c466 | 3 | |
Cumulocity | 47:89ae46d5c466 | 4 | #include "SmartRest.h" |
Cumulocity | 47:89ae46d5c466 | 5 | #include "SmartRestTemplate.h" |
Cumulocity | 47:89ae46d5c466 | 6 | #include "mbed.h" |
xinlei | 73:313975bfec96 | 7 | #include "DeviceInfo.h" |
Cumulocity | 47:89ae46d5c466 | 8 | |
Cumulocity | 47:89ae46d5c466 | 9 | class AnalogMeasurement |
Cumulocity | 47:89ae46d5c466 | 10 | { |
Cumulocity | 47:89ae46d5c466 | 11 | public: |
xinlei | 96:5dfdc8568e9f | 12 | AnalogMeasurement(AbstractSmartRest&, SmartRestTemplate&, long&, DeviceInfo&); |
Cumulocity | 47:89ae46d5c466 | 13 | |
Cumulocity | 47:89ae46d5c466 | 14 | bool init(); |
Cumulocity | 47:89ae46d5c466 | 15 | bool run(); |
Cumulocity | 47:89ae46d5c466 | 16 | |
Cumulocity | 47:89ae46d5c466 | 17 | private: |
Cumulocity | 47:89ae46d5c466 | 18 | bool _init; |
Cumulocity | 47:89ae46d5c466 | 19 | long& _deviceId; |
Cumulocity | 47:89ae46d5c466 | 20 | SmartRestTemplate& _tpl; |
vwochnik | 55:a0f7295ed6b6 | 21 | AbstractSmartRest& _client; |
xinlei | 71:063c45e99578 | 22 | float oldValues[2]; |
xinlei | 94:61d44636f020 | 23 | time_t t_start; |
xinlei | 73:313975bfec96 | 24 | DeviceInfo& _deviceInfo; |
Cumulocity | 47:89ae46d5c466 | 25 | }; |
Cumulocity | 47:89ae46d5c466 | 26 | |
Cumulocity | 47:89ae46d5c466 | 27 | #endif |