
Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
measurement/TemperatureMeasurement.h@90:423177e8a401, 2015-03-20 (annotated)
- Committer:
- xinlei
- Date:
- Fri Mar 20 13:55:21 2015 +0000
- Revision:
- 90:423177e8a401
- Parent:
- 82:ca7430f50b2b
- Child:
- 92:0acd11870c6a
Code refactoring to ease coupling
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 "DeviceIO.h" |
xinlei | 73:313975bfec96 | 8 | #include "DeviceInfo.h" |
xinlei | 82:ca7430f50b2b | 9 | #include "DisplayInfo.h" |
Cumulocity | 41:804f6a0bda26 | 10 | |
Cumulocity | 41:804f6a0bda26 | 11 | class TemperatureMeasurement |
Cumulocity | 41:804f6a0bda26 | 12 | { |
Cumulocity | 41:804f6a0bda26 | 13 | public: |
xinlei | 90:423177e8a401 | 14 | TemperatureMeasurement(AbstractSmartRest&, SmartRestTemplate&, long&, DeviceIO&, DeviceInfo&, DisplayInfo&); |
xinlei | 90:423177e8a401 | 15 | |
Cumulocity | 41:804f6a0bda26 | 16 | bool init(); |
Cumulocity | 41:804f6a0bda26 | 17 | bool run(); |
Cumulocity | 41:804f6a0bda26 | 18 | |
Cumulocity | 41:804f6a0bda26 | 19 | private: |
Cumulocity | 41:804f6a0bda26 | 20 | bool _init, _open; |
Cumulocity | 41:804f6a0bda26 | 21 | long& _deviceId; |
Cumulocity | 41:804f6a0bda26 | 22 | SmartRestTemplate& _tpl; |
vwochnik | 55:a0f7295ed6b6 | 23 | AbstractSmartRest& _client; |
xinlei | 90:423177e8a401 | 24 | LM75B _sensor; |
xinlei | 71:063c45e99578 | 25 | float oldValue; |
xinlei | 71:063c45e99578 | 26 | Timer sendingTimer; |
xinlei | 73:313975bfec96 | 27 | DeviceIO& _io; |
xinlei | 73:313975bfec96 | 28 | DeviceInfo& _deviceInfo; |
xinlei | 82:ca7430f50b2b | 29 | DisplayInfo& _displayInfo; |
Cumulocity | 41:804f6a0bda26 | 30 | }; |
Cumulocity | 41:804f6a0bda26 | 31 | |
Cumulocity | 41:804f6a0bda26 | 32 | #endif |