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@71:063c45e99578, 2015-02-16 (annotated)
- Committer:
- xinlei
- Date:
- Mon Feb 16 09:17:30 2015 +0000
- Revision:
- 71:063c45e99578
- Parent:
- 56:4d6e34f1589d
- Child:
- 73:313975bfec96
Various minor bug fixes
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" |
Cumulocity | 47:89ae46d5c466 | 7 | |
Cumulocity | 47:89ae46d5c466 | 8 | class AnalogMeasurement |
Cumulocity | 47:89ae46d5c466 | 9 | { |
Cumulocity | 47:89ae46d5c466 | 10 | public: |
vwochnik | 55:a0f7295ed6b6 | 11 | AnalogMeasurement(AbstractSmartRest&, SmartRestTemplate&, long&, AnalogIn&, AnalogIn&); |
Cumulocity | 47:89ae46d5c466 | 12 | |
Cumulocity | 47:89ae46d5c466 | 13 | bool init(); |
Cumulocity | 47:89ae46d5c466 | 14 | bool run(); |
Cumulocity | 47:89ae46d5c466 | 15 | |
Cumulocity | 47:89ae46d5c466 | 16 | private: |
Cumulocity | 47:89ae46d5c466 | 17 | bool _init; |
Cumulocity | 47:89ae46d5c466 | 18 | long& _deviceId; |
Cumulocity | 47:89ae46d5c466 | 19 | SmartRestTemplate& _tpl; |
vwochnik | 55:a0f7295ed6b6 | 20 | AbstractSmartRest& _client; |
Cumulocity | 47:89ae46d5c466 | 21 | AnalogIn& _analog1; |
Cumulocity | 47:89ae46d5c466 | 22 | AnalogIn& _analog2; |
xinlei | 71:063c45e99578 | 23 | float oldValues[2]; |
xinlei | 71:063c45e99578 | 24 | Timer sendingTimer; |
Cumulocity | 47:89ae46d5c466 | 25 | }; |
Cumulocity | 47:89ae46d5c466 | 26 | |
Cumulocity | 47:89ae46d5c466 | 27 | #endif |