renamed rmap to com (more generic)

This commit is contained in:
Robin Müller 2020-03-23 18:05:39 +01:00
parent 7126c19ee0
commit 1ec1d057b8
3 changed files with 73 additions and 74 deletions

View File

@ -67,7 +67,7 @@ ReturnValue_t DeviceHandlerBase::performOperation(uint8_t counter) {
if (mode == MODE_OFF) { if (mode == MODE_OFF) {
return RETURN_OK; return RETURN_OK;
} }
switch (getRmapAction()) { switch (getCommandQueue()) {
case SEND_WRITE: case SEND_WRITE:
if ((cookieInfo.state == COOKIE_UNUSED)) { if ((cookieInfo.state == COOKIE_UNUSED)) {
buildInternalCommand(); buildInternalCommand();
@ -689,8 +689,7 @@ void DeviceHandlerBase::replyRawData(const uint8_t *data, size_t len,
} }
//Default child implementations //Default child implementations
DeviceHandlerIF::CommunicationAction_t DeviceHandlerBase::getComAction() {
DeviceHandlerBase::RmapAction_t DeviceHandlerBase::getRmapAction() {
switch (pstStep) { switch (pstStep) {
case 0: case 0:
return SEND_WRITE; return SEND_WRITE;

View File

@ -3,11 +3,11 @@
#include <framework/objectmanager/SystemObject.h> #include <framework/objectmanager/SystemObject.h>
#include <framework/tasks/ExecutableObjectIF.h> #include <framework/tasks/ExecutableObjectIF.h>
#include <framework/devicehandlers/DeviceHandlerIF.h>
#include <framework/returnvalues/HasReturnvaluesIF.h> #include <framework/returnvalues/HasReturnvaluesIF.h>
#include <framework/action/HasActionsIF.h> #include <framework/action/HasActionsIF.h>
#include <framework/datapool/PoolVariableIF.h> #include <framework/datapool/PoolVariableIF.h>
#include <framework/devicehandlers/DeviceCommunicationIF.h> #include <framework/devicehandlers/DeviceCommunicationIF.h>
#include <framework/devicehandlers/DeviceHandlerIF.h>
#include <framework/modes/HasModesIF.h> #include <framework/modes/HasModesIF.h>
#include <framework/power/PowerSwitchIF.h> #include <framework/power/PowerSwitchIF.h>
#include <framework/ipc/MessageQueueIF.h> #include <framework/ipc/MessageQueueIF.h>
@ -698,7 +698,8 @@ protected:
* *
* @return The Rmap action to execute in this step * @return The Rmap action to execute in this step
*/ */
virtual RmapAction_t getRmapAction();
virtual CommunicationAction_t getComAction();
/** /**
* Build the device command to send for raw mode. * Build the device command to send for raw mode.

View File

@ -85,23 +85,22 @@ public:
MAKE_RETURN_CODE(0xD1); MAKE_RETURN_CODE(0xD1);
/** /**
* RMAP Action that will be executed. * Communication action which will be executed.
* *
* This is used by the child class to tell the base class what to do. * This is used by the child class to tell the base class what to do.
*/ */
enum RmapAction_t { enum CommunicationAction_t {
SEND_WRITE,//!< RMAP send write SEND_WRITE,//!< RMAP send write
GET_WRITE, //!< RMAP get write GET_WRITE, //!< RMAP get write
SEND_READ, //!< RMAP send read SEND_READ, //!< RMAP send read
GET_READ, //!< RMAP get read GET_READ, //!< RMAP get read
NOTHING //!< Do nothing. NOTHING //!< Do nothing.
}; };
/** /**
* Default Destructor * Default Destructor
*/ */
virtual ~DeviceHandlerIF() { virtual ~DeviceHandlerIF() {}
}
/** /**
* This MessageQueue is used to command the device handler. * This MessageQueue is used to command the device handler.