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
operation/OperationSupport.h@99:e369fc75c000, 2015-05-07 (annotated)
- Committer:
- xinlei
- Date:
- Thu May 07 09:57:55 2015 +0000
- Revision:
- 99:e369fc75c000
- Parent:
- 94:61d44636f020
- Child:
- 107:fc5f25f0e0d5
prepare for v2.1rc3.
Who changed what in which revision?
User | Revision | Line number | New 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 | 99:e369fc75c000 | 11 | OperationSupport(SmartRest& client, SmartRestTemplate& tpl, OperationPool& pool): |
xinlei | 99:e369fc75c000 | 12 | _init(false), _firstRun(true), _tpl(tpl), |
xinlei | 94:61d44636f020 | 13 | _client(client), opool(pool) {} |
vwochnik | 57:4af5f1bec3a6 | 14 | bool init(); |
vwochnik | 57:4af5f1bec3a6 | 15 | bool run(); |
vwochnik | 57:4af5f1bec3a6 | 16 | |
vwochnik | 59:f96be79feccd | 17 | protected: |
vwochnik | 63:010bbbb4732a | 18 | bool requestPendingOperations(); |
xinlei | 93:0acd11870c6a | 19 | bool executePendingOperation(Operation&); |
xinlei | 94:61d44636f020 | 20 | bool operationFromRecord(ParsedRecord& record, Operation& op); |
vwochnik | 60:3c822f97fc73 | 21 | |
vwochnik | 57:4af5f1bec3a6 | 22 | private: |
xinlei | 94:61d44636f020 | 23 | bool _init; |
xinlei | 94:61d44636f020 | 24 | bool _firstRun; |
vwochnik | 57:4af5f1bec3a6 | 25 | SmartRestTemplate& _tpl; |
xinlei | 94:61d44636f020 | 26 | SmartRest& _client; |
xinlei | 94:61d44636f020 | 27 | OperationPool& opool; |
vwochnik | 57:4af5f1bec3a6 | 28 | }; |
vwochnik | 57:4af5f1bec3a6 | 29 | |
vwochnik | 57:4af5f1bec3a6 | 30 | #endif |