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:
vwochnik
Date:
Fri Oct 24 15:00:36 2014 +0000
Revision:
60:3c822f97fc73
Parent:
59:f96be79feccd
Child:
62:86a04c5bda18
operation thread + funcs

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
vwochnik 60:3c822f97fc73 4 #include "rtos.h"
vwochnik 57:4af5f1bec3a6 5 #include "AbstractSmartRest.h"
vwochnik 57:4af5f1bec3a6 6 #include "SmartRestTemplate.h"
vwochnik 59:f96be79feccd 7 #include "ComposedRecord.h"
vwochnik 59:f96be79feccd 8 #include "CharValue.h"
vwochnik 59:f96be79feccd 9 #include "OperationStore.h"
vwochnik 59:f96be79feccd 10 #include "ParsedRecord.h"
vwochnik 57:4af5f1bec3a6 11
vwochnik 57:4af5f1bec3a6 12 class OperationSupport
vwochnik 57:4af5f1bec3a6 13 {
vwochnik 57:4af5f1bec3a6 14 public:
vwochnik 57:4af5f1bec3a6 15 OperationSupport(AbstractSmartRest&, SmartRestTemplate&, long&);
vwochnik 57:4af5f1bec3a6 16
vwochnik 57:4af5f1bec3a6 17 bool init();
vwochnik 57:4af5f1bec3a6 18 bool run();
vwochnik 57:4af5f1bec3a6 19
vwochnik 59:f96be79feccd 20 protected:
vwochnik 59:f96be79feccd 21 bool operationFromRecord(ParsedRecord&, OperationStore::Operation&);
vwochnik 59:f96be79feccd 22 bool updateOperation(OperationStore::Operation&);
vwochnik 59:f96be79feccd 23 CharValue& operationStateValue(OperationStore::Operation&);
vwochnik 59:f96be79feccd 24
vwochnik 60:3c822f97fc73 25 void thread();
vwochnik 60:3c822f97fc73 26 static void thread_func(void const*);
vwochnik 60:3c822f97fc73 27
vwochnik 57:4af5f1bec3a6 28 private:
vwochnik 57:4af5f1bec3a6 29 bool _init;
vwochnik 57:4af5f1bec3a6 30 long& _deviceId;
vwochnik 57:4af5f1bec3a6 31 SmartRestTemplate& _tpl;
vwochnik 57:4af5f1bec3a6 32 AbstractSmartRest& _client;
vwochnik 60:3c822f97fc73 33 Thread _thread;
vwochnik 57:4af5f1bec3a6 34 };
vwochnik 57:4af5f1bec3a6 35
vwochnik 59:f96be79feccd 36 extern CharValue aOperationStatePending;
vwochnik 59:f96be79feccd 37 extern CharValue aOperationStateExecuting;
vwochnik 59:f96be79feccd 38 extern CharValue aOperationStateSuccessful;
vwochnik 59:f96be79feccd 39 extern CharValue aOperationStateFailed;
vwochnik 59:f96be79feccd 40
vwochnik 57:4af5f1bec3a6 41 #endif