Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
operation/OperationSupport.h
- Committer:
- xinlei
- Date:
- 2015-04-13
- Revision:
- 93:0acd11870c6a
- Parent:
- 91:423177e8a401
- Child:
- 94:61d44636f020
File content as of revision 93:0acd11870c6a:
#ifndef OPERATIONSUPPORT_H
#define OPERATIONSUPPORT_H
#include "rtos.h"
#include "ConfigurationSynchronization.h"
#include "OperationExecutor.h"
//#include "AbstractSmartRest.h"
#include "RtosSmartRest.h"
#include "SmartRestTemplate.h"
#include "ComposedRecord.h"
#include "CharValue.h"
#include "Operation.h"
#include "ParsedRecord.h"
#include "IntegerValue.h"
#define POOL_SIZE 64
class OperationSupport
{
public:
OperationSupport(RtosSmartRest&, SmartRestTemplate&, long&, ConfigurationSynchronization&, LCDDisplay&);
bool init();
bool run();
protected:
bool requestPendingOperations();
bool operationFromRecord(ParsedRecord&, Operation&);
bool executePendingOperation(Operation&);
// CharValue& operationStateValue(OperationState state) const;
const char * getOperationStateChar(OperationState) const;
void thread2();
void thread3();
static void thread2_func(void const*);
static void thread3_func(void const*);
private:
bool _init, _firstRun;
long& _deviceId;
SmartRestTemplate& _tpl;
RtosSmartRest& _client;
Mail<Operation, POOL_SIZE> opool;
OperationExecutor _executor;
TCPSocketConnection sock;
char buf[300];
char buf2[50];
Thread _thread2;
Thread _thread3;
};
#endif

Cumulocity