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

DeviceIntegration.h

Committer:
xinlei
Date:
2016-08-08
Revision:
139:f8ab852e83e7
Parent:
117:5de54f09f754

File content as of revision 139:f8ab852e83e7:

#ifndef DEVICEINTEGRATION_H
#define DEVICEINTEGRATION_H

#include "SmartRest.h"
#include "SmartRestTemplate.h"
#include "DeviceInfo.h"

class DeviceIntegration
{
public:
    DeviceIntegration(SmartRest& c, SmartRestTemplate& t, DeviceInfo& d):
    _init(false), _tpl(t), _client(c), _deviceInfo(d) {}
    bool init();
    bool integrate();

protected:
    bool deviceExisting();
    bool createDevice();
    bool addGlobalIdentifier();
    bool updateDevice();

private:
    bool _init;
    SmartRestTemplate& _tpl;
    SmartRest& _client;
    DeviceInfo& _deviceInfo;
};

#endif