DHB and CommandActionHelper changes #50

Merged
muellerr merged 4 commits from meier/develop into eive/develop 2022-04-01 14:07:06 +02:00
Showing only changes of commit 29cf8c9009 - Show all commits

View File

@ -464,12 +464,21 @@ ReturnValue_t DeviceHandlerBase::insertInCommandMap(DeviceCommandId_t deviceComm
} }
size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId) { size_t DeviceHandlerBase::getNextReplyLength(DeviceCommandId_t commandId) {
DeviceReplyIter iter = deviceReplyMap.find(commandId); DeviceCommandId_t replyId = NO_COMMAND_ID;
if (iter != deviceReplyMap.end()) { DeviceCommandMap::iterator command = cookieInfo.pendingCommand;
return iter->second.replyLen; if (command->second.useAlternativeReplyId) {
} else { replyId = command->second.alternativeReplyId;
return 0;
} }
else {
replyId = commandId;
}
DeviceReplyIter iter = deviceReplyMap.find(replyId);
if (iter != deviceReplyMap.end()) {
if (iter->second.delayCycles != 0) {
return iter->second.replyLen;
}
}
return 0;
} }
ReturnValue_t DeviceHandlerBase::updateReplyMapEntry(DeviceCommandId_t deviceReply, ReturnValue_t DeviceHandlerBase::updateReplyMapEntry(DeviceCommandId_t deviceReply,