Update FSFW #24

Merged
muellerr merged 160 commits from mueller/master into master 2021-09-26 22:54:37 +02:00
2 changed files with 10 additions and 4 deletions
Showing only changes of commit 11a3c8c21f - Show all commits

View File

@ -481,7 +481,7 @@ ReturnValue_t DeviceHandlerBase::updateReplyMapEntry(DeviceCommandId_t deviceRep
}
}
ReturnValue_t DeviceHandlerBase::enablePeriodicReply(DeviceCommandId_t deviceReply) {
ReturnValue_t DeviceHandlerBase::enablePeriodicReply(bool enable, DeviceCommandId_t deviceReply) {
auto replyIter = deviceReplyMap.find(deviceReply);
if (replyIter == deviceReplyMap.end()) {
triggerEvent(INVALID_DEVICE_COMMAND, deviceReply);
@ -491,7 +491,12 @@ ReturnValue_t DeviceHandlerBase::enablePeriodicReply(DeviceCommandId_t deviceRep
if(not info->periodic) {
return COMMAND_NOT_SUPPORTED;
}
info->delayCycles = info->maxDelayCycles;
if(enable) {
info->delayCycles = info->maxDelayCycles;
}
else {
info->delayCycles = 0;
}
}
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -486,10 +486,11 @@ protected:
/**
* Enables a periodic reply for a given command. It sets to delay cycles to the specified
* maximum delay cycles for a given reply ID.
* maximum delay cycles for a given reply ID if enabled or to 0 if disabled.
* @param enable Specify whether to enable or disable a given periodic reply
* @return
*/
ReturnValue_t enablePeriodicReply(DeviceCommandId_t deviceReply);
ReturnValue_t enablePeriodicReply(bool enable, DeviceCommandId_t deviceReply);
/**
* @brief This function returns the reply length of the next reply to read.