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@93:0acd11870c6a, 2015-04-13 (annotated)
- Committer:
- xinlei
- Date:
- Mon Apr 13 14:24:58 2015 +0000
- Revision:
- 93:0acd11870c6a
- Parent:
- 91:423177e8a401
- Child:
- 94:61d44636f020
v2.1rc1
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" |
xinlei | 93:0acd11870c6a | 8 | #include "LCDDisplay.h" |
Cumulocity | 47:89ae46d5c466 | 9 | |
Cumulocity | 47:89ae46d5c466 | 10 | class AnalogMeasurement |
Cumulocity | 47:89ae46d5c466 | 11 | { |
Cumulocity | 47:89ae46d5c466 | 12 | public: |
xinlei | 93:0acd11870c6a | 13 | AnalogMeasurement(AbstractSmartRest&, SmartRestTemplate&, long&, DeviceInfo&, LCDDisplay&); |
Cumulocity | 47:89ae46d5c466 | 14 | |
Cumulocity | 47:89ae46d5c466 | 15 | bool init(); |
Cumulocity | 47:89ae46d5c466 | 16 | bool run(); |
Cumulocity | 47:89ae46d5c466 | 17 | |
Cumulocity | 47:89ae46d5c466 | 18 | private: |
Cumulocity | 47:89ae46d5c466 | 19 | bool _init; |
Cumulocity | 47:89ae46d5c466 | 20 | long& _deviceId; |
Cumulocity | 47:89ae46d5c466 | 21 | SmartRestTemplate& _tpl; |
vwochnik | 55:a0f7295ed6b6 | 22 | AbstractSmartRest& _client; |
xinlei | 71:063c45e99578 | 23 | float oldValues[2]; |
xinlei | 71:063c45e99578 | 24 | Timer sendingTimer; |
xinlei | 73:313975bfec96 | 25 | DeviceInfo& _deviceInfo; |
xinlei | 93:0acd11870c6a | 26 | LCDDisplay& _lcdDisplay; |
Cumulocity | 47:89ae46d5c466 | 27 | }; |
Cumulocity | 47:89ae46d5c466 | 28 | |
Cumulocity | 47:89ae46d5c466 | 29 | #endif |