Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

operation/OperationExecutor.cpp

Committer:
vwochnik
Date:
2014-10-29
Revision:
62:86a04c5bda18
Child:
63:010bbbb4732a

File content as of revision 62:86a04c5bda18:

#include "OperationExecutor.h"
#include "ComposedRecord.h"
#include "CharValue.h"
#include "IntegerValue.h"

OperationExecutor::OperationExecutor(AbstractSmartRest& client, SmartRestTemplate& tpl, long& deviceId) :
    _client(client),
    _tpl(tpl),
    _deviceId(deviceId)
{
    _init = false;
}

bool OperationExecutor::init()
{
    if (_init)
        return false;
    
    // Get operation
    // USAGE: 110,<OPERATION/ID>,<STATE>
    if (!_tpl.add("10,112,GET,/devicecontrol/operations/%%,,application/vnd.com.nsn.cumulocity.operation+json,%%,UNSIGNED,\r\n"))
        return false;

    _init = true;
    return true;
}

bool OperationExecutor::executeOperation(OperationStore::Operation& op)
{
}