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
config/ConfigSync.h
- Committer:
- xinlei
- Date:
- 2015-05-15
- Revision:
- 111:ee9ae4a5e55c
- Parent:
- 108:f1ee3e1eb126
- Child:
- 137:a52821cdb108
File content as of revision 111:ee9ae4a5e55c:
#ifndef CONFIGSYNC_H #define CONFIGSYNC_H #include "AbstractReporter.h" #include "ConfigParser.h" class ConfigSync : public AbstractReporter { private: ConfigSync(): dict(), cp(), changed(true) {} public: virtual ~ConfigSync() {} virtual bool init() { loadConfiguration(); return true; } static ConfigSync& inst() { static ConfigSync _ref; return _ref; } virtual const char* name() const { return "Conf"; } virtual size_t read(char*, size_t, char*, size_t); bool updateConfiguration(const char*); protected: void resetConfiguration(); void loadConfiguration(); void saveConfiguration() const; private: Dict dict; ConfigParser cp; bool changed; }; #endif /* CONFIGSYNC_H */