From b8af3b5e3df66e67c8fa7e0e99b6d5b2554deef4 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Sat, 9 Nov 2019 18:15:45 +0100 Subject: [PATCH] debugInterface extended --- devicehandlers/DeviceHandlerBase.cpp | 14 +++++++------- devicehandlers/DeviceHandlerBase.h | 9 +++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/devicehandlers/DeviceHandlerBase.cpp b/devicehandlers/DeviceHandlerBase.cpp index 09c27c87..92232e3d 100644 --- a/devicehandlers/DeviceHandlerBase.cpp +++ b/devicehandlers/DeviceHandlerBase.cpp @@ -33,14 +33,15 @@ DeviceHandlerBase::DeviceHandlerBase(uint32_t logicalAddress_, defaultFDIRUsed(fdirInstance == NULL), switchOffWasReported(false), executingTask(NULL), actionHelper(this, NULL), cookieInfo(), logicalAddress(logicalAddress_), timeoutStart(0), childTransitionDelay(5000), transitionSourceMode(_MODE_POWER_DOWN), - transitionSourceSubMode(SUBMODE_NONE), deviceSwitch(setDeviceSwitch) { - commandQueue = QueueFactory::instance()->createMessageQueue(cmdQueueSize, - CommandMessage::MAX_MESSAGE_SIZE); + transitionSourceSubMode(SUBMODE_NONE), deviceSwitch(setDeviceSwitch) +{ + commandQueue = QueueFactory::instance()-> + createMessageQueue(cmdQueueSize, CommandMessage::MAX_MESSAGE_SIZE); cookieInfo.state = COOKIE_UNUSED; insertInCommandMap(RAW_COMMAND_ID); if (this->fdirInstance == NULL) { - this->fdirInstance = new DeviceHandlerFailureIsolation(setObjectId, - defaultFDIRParentId); + this->fdirInstance = + new DeviceHandlerFailureIsolation(setObjectId, defaultFDIRParentId); } } @@ -468,7 +469,6 @@ void DeviceHandlerBase::doGetWrite() { void DeviceHandlerBase::doSendRead() { ReturnValue_t result; - result = communicationInterface->requestReceiveMessage(cookie); if (result == RETURN_OK) { cookieInfo.state = COOKIE_READ_SENT; @@ -1269,7 +1269,7 @@ void DeviceHandlerBase::setTaskIF(PeriodicTaskIF* 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() { diff --git a/devicehandlers/DeviceHandlerBase.h b/devicehandlers/DeviceHandlerBase.h index 4c83b230..c50823d9 100644 --- a/devicehandlers/DeviceHandlerBase.h +++ b/devicehandlers/DeviceHandlerBase.h @@ -553,12 +553,13 @@ protected: * @brief Can be implemented by child handler to * perform debugging * @details Example: Calling this in performOperation - * to track values like mode. An optional position tracker can be supplied - * to provide the child handler a way to know where the debugInterface was called - * + * to track values like mode. + * @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 ! */ - 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.