renamed rmap to com (more generic)
This commit is contained in:
parent
7126c19ee0
commit
1ec1d057b8
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -23,8 +23,8 @@ public:
|
||||
* @details The mode of the device handler must not be confused with the mode the device is in.
|
||||
* The mode of the device itself is transparent to the user but related to the mode of the handler.
|
||||
*/
|
||||
// MODE_ON = 0, //!< The device is powered and ready to perform operations. In this mode, no commands are sent by the device handler itself, but direct commands van be commanded and will be interpreted
|
||||
// MODE_OFF = 1, //!< The device is powered off. The only command accepted in this mode is a mode change to on.
|
||||
// MODE_ON = 0, //!< The device is powered and ready to perform operations. In this mode, no commands are sent by the device handler itself, but direct commands van be commanded and will be interpreted
|
||||
// MODE_OFF = 1, //!< The device is powered off. The only command accepted in this mode is a mode change to on.
|
||||
static const Mode_t MODE_NORMAL = 2; //!< The device is powered on and the device handler periodically sends commands. The commands to be sent are selected by the handler according to the submode.
|
||||
static const Mode_t MODE_RAW = 3; //!< The device is powered on and ready to perform operations. In this mode, raw commands can be sent. The device handler will send all replies received from the command back to the commanding object.
|
||||
static const Mode_t MODE_ERROR_ON = 4; //!4< The device is shut down but the switch could not be turned off, so the device still is powered. In this mode, only a mode change to @c MODE_OFF can be commanded, which tries to switch off the device again.
|
||||
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user