debugInterface extended

This commit is contained in:
Robin Müller 2019-11-09 18:15:45 +01:00
parent 537e2ceb18
commit b8af3b5e3d
2 changed files with 12 additions and 11 deletions

View File

@ -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() {

View File

@ -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.