
Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
config/ConfigSync.h@98:e369fc75c000, 2015-05-07 (annotated)
- Committer:
- xinlei
- Date:
- Thu May 07 09:57:55 2015 +0000
- Revision:
- 98:e369fc75c000
- Child:
- 99:47ea098f8a47
prepare for v2.1rc3.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
xinlei | 98:e369fc75c000 | 1 | #ifndef CONFIGURATIONSYNCHRONIZATION_H |
xinlei | 98:e369fc75c000 | 2 | #define CONFIGURATIONSYNCHRONIZATION_H |
xinlei | 98:e369fc75c000 | 3 | |
xinlei | 98:e369fc75c000 | 4 | #include "AbstractSmartRest.h" |
xinlei | 98:e369fc75c000 | 5 | #include "SmartRestTemplate.h" |
xinlei | 98:e369fc75c000 | 6 | #include "ConfigurationProperties.h" |
xinlei | 98:e369fc75c000 | 7 | |
xinlei | 98:e369fc75c000 | 8 | class ConfigSync |
xinlei | 98:e369fc75c000 | 9 | { |
xinlei | 98:e369fc75c000 | 10 | public: |
xinlei | 98:e369fc75c000 | 11 | ConfigSync(AbstractSmartRest&, SmartRestTemplate&, long&); |
xinlei | 98:e369fc75c000 | 12 | |
xinlei | 98:e369fc75c000 | 13 | bool init(); |
xinlei | 98:e369fc75c000 | 14 | bool integrate(); |
xinlei | 98:e369fc75c000 | 15 | bool run(); |
xinlei | 98:e369fc75c000 | 16 | |
xinlei | 98:e369fc75c000 | 17 | bool updateConfiguration(const char*); |
xinlei | 98:e369fc75c000 | 18 | |
xinlei | 98:e369fc75c000 | 19 | protected: |
xinlei | 98:e369fc75c000 | 20 | bool updateDeviceObject(); |
xinlei | 98:e369fc75c000 | 21 | bool loadConfiguration(); |
xinlei | 98:e369fc75c000 | 22 | bool saveConfiguration(); |
xinlei | 98:e369fc75c000 | 23 | |
xinlei | 98:e369fc75c000 | 24 | private: |
xinlei | 98:e369fc75c000 | 25 | bool _init; |
xinlei | 98:e369fc75c000 | 26 | bool _changed; |
xinlei | 98:e369fc75c000 | 27 | SmartRestTemplate& _tpl; |
xinlei | 98:e369fc75c000 | 28 | AbstractSmartRest& _client; |
xinlei | 98:e369fc75c000 | 29 | long& _deviceId; |
xinlei | 98:e369fc75c000 | 30 | DeviceConfiguration _deviceConfiguration; |
xinlei | 98:e369fc75c000 | 31 | ConfigurationProperties _configurationProperties; |
xinlei | 98:e369fc75c000 | 32 | }; |
xinlei | 98:e369fc75c000 | 33 | |
xinlei | 98:e369fc75c000 | 34 | #endif |