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 Vincent Wochnik

config/ConfigurationSynchronization.h

Committer:
vwochnik
Date:
2014-12-06
Revision:
68:0dc778a16d0d
Child:
96:5dfdc8568e9f

File content as of revision 68:0dc778a16d0d:

#ifndef CONFIGURATIONSYNCHRONIZATION_H
#define CONFIGURATIONSYNCHRONIZATION_H

#include "AbstractSmartRest.h"
#include "SmartRestTemplate.h"
#include "DeviceConfiguration.h"
#include "ConfigurationProperties.h"
#include "DeviceMemory.h"

class ConfigurationSynchronization
{
public:
    ConfigurationSynchronization(AbstractSmartRest&, SmartRestTemplate&, long&, DeviceMemory&, DeviceConfiguration&, ConfigurationProperties&);
    
    bool init();
    bool integrate();
    bool run();
    
    bool updateConfiguration(const char*);

protected:
    bool updateDeviceObject();
    bool loadConfiguration();
    bool saveConfiguration();

private:
    bool _init;
    long& _deviceId;
    bool _changed;
    SmartRestTemplate& _tpl;
    AbstractSmartRest& _client;
    DeviceMemory& _deviceMemory;
    DeviceConfiguration& _deviceConfiguration;
    ConfigurationProperties& _configurationProperties;
};

#endif