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/TemperatureMeasurement.h@94:61d44636f020, 2015-04-20 (annotated)
- Committer:
- xinlei
- Date:
- Mon Apr 20 15:04:23 2015 +0000
- Revision:
- 94:61d44636f020
- Parent:
- 93:0acd11870c6a
- Child:
- 96:5dfdc8568e9f
Integration of new device push code base.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Cumulocity | 41:804f6a0bda26 | 1 | #ifndef TEMPERATUREMEASUREMENT_H |
Cumulocity | 41:804f6a0bda26 | 2 | #define TEMPERATUREMEASUREMENT_H |
Cumulocity | 41:804f6a0bda26 | 3 | |
vwochnik | 55:a0f7295ed6b6 | 4 | #include "AbstractSmartRest.h" |
Cumulocity | 41:804f6a0bda26 | 5 | #include "SmartRestTemplate.h" |
Cumulocity | 41:804f6a0bda26 | 6 | #include "LM75B.h" |
xinlei | 73:313975bfec96 | 7 | #include "DeviceInfo.h" |
xinlei | 93:0acd11870c6a | 8 | #include "LCDDisplay.h" |
Cumulocity | 41:804f6a0bda26 | 9 | |
Cumulocity | 41:804f6a0bda26 | 10 | class TemperatureMeasurement |
Cumulocity | 41:804f6a0bda26 | 11 | { |
Cumulocity | 41:804f6a0bda26 | 12 | public: |
xinlei | 93:0acd11870c6a | 13 | TemperatureMeasurement(AbstractSmartRest&, SmartRestTemplate&, long&, DeviceInfo&, LCDDisplay&); |
xinlei | 91:423177e8a401 | 14 | |
Cumulocity | 41:804f6a0bda26 | 15 | bool init(); |
Cumulocity | 41:804f6a0bda26 | 16 | bool run(); |
Cumulocity | 41:804f6a0bda26 | 17 | |
Cumulocity | 41:804f6a0bda26 | 18 | private: |
Cumulocity | 41:804f6a0bda26 | 19 | bool _init, _open; |
Cumulocity | 41:804f6a0bda26 | 20 | long& _deviceId; |
Cumulocity | 41:804f6a0bda26 | 21 | SmartRestTemplate& _tpl; |
vwochnik | 55:a0f7295ed6b6 | 22 | AbstractSmartRest& _client; |
xinlei | 91:423177e8a401 | 23 | LM75B _sensor; |
xinlei | 71:063c45e99578 | 24 | float oldValue; |
xinlei | 94:61d44636f020 | 25 | time_t t_start; |
xinlei | 73:313975bfec96 | 26 | DeviceInfo& _deviceInfo; |
xinlei | 93:0acd11870c6a | 27 | LCDDisplay& _lcdDisplay; |
Cumulocity | 41:804f6a0bda26 | 28 | }; |
Cumulocity | 41:804f6a0bda26 | 29 | |
Cumulocity | 41:804f6a0bda26 | 30 | #endif |