WIP: somethings wrong.. #19
@ -33,14 +33,15 @@ DeviceHandlerBase::DeviceHandlerBase(uint32_t logicalAddress_,
|
|||||||
defaultFDIRUsed(fdirInstance == NULL), switchOffWasReported(false),
|
defaultFDIRUsed(fdirInstance == NULL), switchOffWasReported(false),
|
||||||
executingTask(NULL), actionHelper(this, NULL), cookieInfo(), logicalAddress(logicalAddress_),
|
executingTask(NULL), actionHelper(this, NULL), cookieInfo(), logicalAddress(logicalAddress_),
|
||||||
timeoutStart(0), childTransitionDelay(5000), transitionSourceMode(_MODE_POWER_DOWN),
|
timeoutStart(0), childTransitionDelay(5000), transitionSourceMode(_MODE_POWER_DOWN),
|
||||||
transitionSourceSubMode(SUBMODE_NONE), deviceSwitch(setDeviceSwitch) {
|
transitionSourceSubMode(SUBMODE_NONE), deviceSwitch(setDeviceSwitch)
|
||||||
commandQueue = QueueFactory::instance()->createMessageQueue(cmdQueueSize,
|
{
|
||||||
CommandMessage::MAX_MESSAGE_SIZE);
|
commandQueue = QueueFactory::instance()->
|
||||||
|
createMessageQueue(cmdQueueSize, CommandMessage::MAX_MESSAGE_SIZE);
|
||||||
cookieInfo.state = COOKIE_UNUSED;
|
cookieInfo.state = COOKIE_UNUSED;
|
||||||
insertInCommandMap(RAW_COMMAND_ID);
|
insertInCommandMap(RAW_COMMAND_ID);
|
||||||
if (this->fdirInstance == NULL) {
|
if (this->fdirInstance == NULL) {
|
||||||
this->fdirInstance = new DeviceHandlerFailureIsolation(setObjectId,
|
this->fdirInstance =
|
||||||
defaultFDIRParentId);
|
new DeviceHandlerFailureIsolation(setObjectId, defaultFDIRParentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -468,7 +469,6 @@ void DeviceHandlerBase::doGetWrite() {
|
|||||||
|
|
||||||
void DeviceHandlerBase::doSendRead() {
|
void DeviceHandlerBase::doSendRead() {
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
|
|
||||||
result = communicationInterface->requestReceiveMessage(cookie);
|
result = communicationInterface->requestReceiveMessage(cookie);
|
||||||
if (result == RETURN_OK) {
|
if (result == RETURN_OK) {
|
||||||
cookieInfo.state = COOKIE_READ_SENT;
|
cookieInfo.state = COOKIE_READ_SENT;
|
||||||
@ -1269,7 +1269,7 @@ void DeviceHandlerBase::setTaskIF(PeriodicTaskIF* task_){
|
|||||||
executingTask = task_;
|
executingTask = task_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceHandlerBase::debugInterface(uint8_t positionTracker) {
|
void DeviceHandlerBase::debugInterface(uint8_t positionTracker, object_id_t objectId, uint32_t parameter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t DeviceHandlerBase::getLogicalAddress() {
|
uint32_t DeviceHandlerBase::getLogicalAddress() {
|
||||||
|
@ -553,12 +553,13 @@ protected:
|
|||||||
* @brief Can be implemented by child handler to
|
* @brief Can be implemented by child handler to
|
||||||
* perform debugging
|
* perform debugging
|
||||||
* @details Example: Calling this in performOperation
|
* @details Example: Calling this in performOperation
|
||||||
* to track values like mode. An optional position tracker can be supplied
|
* to track values like mode.
|
||||||
* to provide the child handler a way to know where the debugInterface was called
|
* @param positionTracker Provide the child handler a way to know where the debugInterface was called
|
||||||
*
|
* @param objectId Provide the child handler object Id to specify actions for spefic devices
|
||||||
|
* @param parameter Supply a parameter of interest
|
||||||
* Please delete all debugInterface calls in DHB after debugging is finished !
|
* Please delete all debugInterface calls in DHB after debugging is finished !
|
||||||
*/
|
*/
|
||||||
virtual void debugInterface(uint8_t positionTracker = 0);
|
virtual void debugInterface(uint8_t positionTracker = 0, object_id_t objectId = 0, uint32_t parameter = 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a helper method to facilitate inserting entries in the command map.
|
* This is a helper method to facilitate inserting entries in the command map.
|
||||||
|
Loading…
Reference in New Issue
Block a user