ioBoardAddress protected instead of private to allow custom initialize
This commit is contained in:
@ -21,7 +21,7 @@ DeviceHandlerBase::DeviceHandlerBase(uint32_t ioBoardAddress,
|
||||
uint8_t setDeviceSwitch, object_id_t deviceCommunication,
|
||||
uint32_t thermalStatePoolId, uint32_t thermalRequestPoolId,
|
||||
FailureIsolationBase* fdirInstance, uint32_t cmdQueueSize) :
|
||||
SystemObject(setObjectId), rawPacket(0), rawPacketLen(0), mode(MODE_OFF),
|
||||
SystemObject(setObjectId),ioBoardAddress(ioBoardAddress), rawPacket(0), rawPacketLen(0), mode(MODE_OFF),
|
||||
submode(SUBMODE_NONE), pstStep(0), maxDeviceReplyLen(maxDeviceReplyLen),
|
||||
wiretappingMode(OFF), defaultRawReceiver(0), storedRawData(StorageManagerIF::INVALID_ADDRESS),
|
||||
requestedRawTraffic(0), powerSwitcher(NULL), IPCStore(NULL),
|
||||
@ -31,7 +31,7 @@ DeviceHandlerBase::DeviceHandlerBase(uint32_t ioBoardAddress,
|
||||
modeHelper(this), parameterHelper(this), childTransitionFailure(RETURN_OK),
|
||||
ignoreMissedRepliesCount(0), fdirInstance(fdirInstance), hkSwitcher(this),
|
||||
defaultFDIRUsed(fdirInstance == NULL), switchOffWasReported(false),
|
||||
executingTask(NULL), actionHelper(this, NULL), cookieInfo(), ioBoardAddress(ioBoardAddress),
|
||||
executingTask(NULL), actionHelper(this, NULL), cookieInfo(),
|
||||
timeoutStart(0), childTransitionDelay(5000), transitionSourceMode(_MODE_POWER_DOWN),
|
||||
transitionSourceSubMode(SUBMODE_NONE), deviceSwitch(setDeviceSwitch) {
|
||||
commandQueue = QueueFactory::instance()->createMessageQueue(cmdQueueSize,
|
||||
|
@ -141,6 +141,11 @@ public:
|
||||
*/
|
||||
virtual void setTaskIF(PeriodicTaskIF* task_);
|
||||
protected:
|
||||
/**
|
||||
* cached from ctor for initialize()
|
||||
*/
|
||||
const uint32_t ioBoardAddress;
|
||||
|
||||
/**
|
||||
* The Returnvalues id of this class, required by HasReturnvaluesIF
|
||||
*/
|
||||
@ -163,6 +168,8 @@ protected:
|
||||
static const DeviceCommandId_t NO_COMMAND_ID = -2;
|
||||
static const MessageQueueId_t NO_COMMANDER = 0;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Pointer to the raw packet that will be sent.
|
||||
*/
|
||||
@ -833,6 +840,9 @@ protected:
|
||||
DeviceCommandMap deviceCommandMap;
|
||||
|
||||
ActionHelper actionHelper;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
@ -865,10 +875,6 @@ private:
|
||||
*/
|
||||
CookieInfo cookieInfo;
|
||||
|
||||
/**
|
||||
* cached from ctor for initialize()
|
||||
*/
|
||||
const uint32_t ioBoardAddress;
|
||||
|
||||
/**
|
||||
* Used for timing out mode transitions.
|
||||
|
@ -22,11 +22,9 @@ 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 and MODE_OFF are included in hasModesIF.h
|
||||
*/
|
||||
// Robin: The first two modes (MODE_ON, MODE_OFF) are specified in hasModesIF.
|
||||
// We could mention in a comment where those modes are located.
|
||||
// The comments for _MODE_TO_ON have been taken from the comments in DeviceHandlerBase.cpp file.
|
||||
// Is the same explanation valid for _MODE_TO_RAW and MODE_TO_NORMAL?
|
||||
|
||||
|
||||
// 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.
|
||||
|
Reference in New Issue
Block a user