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

Committer:
xinlei
Date:
Mon Apr 20 15:04:23 2015 +0000
Revision:
94:61d44636f020
Parent:
93:0acd11870c6a
Child:
99:e369fc75c000
Integration of new device push code base.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vwochnik 57:4af5f1bec3a6 1 #ifndef OPERATIONSUPPORT_H
vwochnik 57:4af5f1bec3a6 2 #define OPERATIONSUPPORT_H
vwochnik 57:4af5f1bec3a6 3
xinlei 94:61d44636f020 4 #include "Operation.h"
xinlei 94:61d44636f020 5 #include "SmartRest.h"
vwochnik 57:4af5f1bec3a6 6 #include "SmartRestTemplate.h"
vwochnik 57:4af5f1bec3a6 7
vwochnik 57:4af5f1bec3a6 8 class OperationSupport
vwochnik 57:4af5f1bec3a6 9 {
vwochnik 57:4af5f1bec3a6 10 public:
xinlei 94:61d44636f020 11 OperationSupport(SmartRest& client, SmartRestTemplate& tpl,
xinlei 94:61d44636f020 12 long& deviceId, OperationPool& pool):
xinlei 94:61d44636f020 13 _init(false), _firstRun(true), _deviceId(deviceId), _tpl(tpl),
xinlei 94:61d44636f020 14 _client(client), opool(pool) {}
vwochnik 57:4af5f1bec3a6 15 bool init();
vwochnik 57:4af5f1bec3a6 16 bool run();
vwochnik 57:4af5f1bec3a6 17
vwochnik 59:f96be79feccd 18 protected:
vwochnik 63:010bbbb4732a 19 bool requestPendingOperations();
xinlei 93:0acd11870c6a 20 bool executePendingOperation(Operation&);
xinlei 94:61d44636f020 21 bool operationFromRecord(ParsedRecord& record, Operation& op);
vwochnik 60:3c822f97fc73 22
vwochnik 57:4af5f1bec3a6 23 private:
xinlei 94:61d44636f020 24 bool _init;
xinlei 94:61d44636f020 25 bool _firstRun;
vwochnik 57:4af5f1bec3a6 26 long& _deviceId;
vwochnik 57:4af5f1bec3a6 27 SmartRestTemplate& _tpl;
xinlei 94:61d44636f020 28 SmartRest& _client;
xinlei 94:61d44636f020 29 OperationPool& opool;
vwochnik 57:4af5f1bec3a6 30 };
vwochnik 57:4af5f1bec3a6 31
vwochnik 57:4af5f1bec3a6 32 #endif