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) {
return RETURN_OK;
}
switch (getRmapAction()) {
switch (getCommandQueue()) {
case SEND_WRITE:
if ((cookieInfo.state == COOKIE_UNUSED)) {
buildInternalCommand();
@ -689,8 +689,7 @@ void DeviceHandlerBase::replyRawData(const uint8_t *data, size_t len,
}
//Default child implementations
DeviceHandlerBase::RmapAction_t DeviceHandlerBase::getRmapAction() {
DeviceHandlerIF::CommunicationAction_t DeviceHandlerBase::getComAction() {
switch (pstStep) {
case 0:
return SEND_WRITE;

View File

@ -3,11 +3,11 @@
#include <framework/objectmanager/SystemObject.h>
#include <framework/tasks/ExecutableObjectIF.h>
#include <framework/devicehandlers/DeviceHandlerIF.h>
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include <framework/action/HasActionsIF.h>
#include <framework/datapool/PoolVariableIF.h>
#include <framework/devicehandlers/DeviceCommunicationIF.h>
#include <framework/devicehandlers/DeviceHandlerIF.h>
#include <framework/modes/HasModesIF.h>
#include <framework/power/PowerSwitchIF.h>
#include <framework/ipc/MessageQueueIF.h>
@ -698,7 +698,8 @@ protected:
*
* @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.

View File

@ -85,23 +85,22 @@ public:
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.
*/
enum RmapAction_t {
enum CommunicationAction_t {
SEND_WRITE,//!< RMAP send write
GET_WRITE, //!< RMAP get write
SEND_READ, //!< RMAP send read
GET_READ, //!< RMAP get read
NOTHING //!< Do nothing.
};
/**
* Default Destructor
*/
virtual ~DeviceHandlerIF() {
}
virtual ~DeviceHandlerIF() {}
/**
* This MessageQueue is used to command the device handler.