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) {
DeviceReplyIter iter = deviceReplyMap.find(commandId);
if (iter != deviceReplyMap.end()) {
return iter->second.replyLen;
} else {
return 0;
DeviceCommandId_t replyId = NO_COMMAND_ID;
DeviceCommandMap::iterator command = cookieInfo.pendingCommand;
if (command->second.useAlternativeReplyId) {
replyId = command->second.alternativeReplyId;
}
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,