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:
- 2016-08-08
- Revision:
- 139:f8ab852e83e7
- Parent:
- 137:a52821cdb108
File content as of revision 139:f8ab852e83e7:
#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 int 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 */