robustness changes
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
6ae9e12cf9
commit
5be3af3515
@ -1586,6 +1586,9 @@ void PlocSupervisorHandler::disableAllReplies() {
|
||||
|
||||
void PlocSupervisorHandler::disableReply(DeviceCommandId_t replyId) {
|
||||
DeviceReplyMap::iterator iter = deviceReplyMap.find(replyId);
|
||||
if (iter == deviceReplyMap.end()) {
|
||||
return;
|
||||
}
|
||||
DeviceReplyInfo* info = &(iter->second);
|
||||
info->delayCycles = 0;
|
||||
info->active = false;
|
||||
@ -1616,6 +1619,9 @@ void PlocSupervisorHandler::sendFailureReport(DeviceCommandId_t replyId, ReturnV
|
||||
|
||||
void PlocSupervisorHandler::disableExeReportReply() {
|
||||
DeviceReplyIter iter = deviceReplyMap.find(supv::EXE_REPORT);
|
||||
if (iter == deviceReplyMap.end()) {
|
||||
return;
|
||||
}
|
||||
DeviceReplyInfo* info = &(iter->second);
|
||||
info->delayCycles = 0;
|
||||
info->command = deviceCommandMap.end();
|
||||
@ -1638,7 +1644,9 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket(DeviceCommandId_t id)
|
||||
result = handleMramDumpFile(id);
|
||||
if (result != returnvalue::OK) {
|
||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(id);
|
||||
if (iter != deviceCommandMap.end()) {
|
||||
actionHelper.finish(false, iter->second.sendReplyTo, id, result);
|
||||
}
|
||||
disableAllReplies();
|
||||
nextReplyId = supv::NONE;
|
||||
return result;
|
||||
@ -1906,10 +1914,10 @@ ReturnValue_t PlocSupervisorHandler::eventSubscription() {
|
||||
ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionReport& report) {
|
||||
DeviceCommandId_t commandId = getPendingCommand();
|
||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(commandId);
|
||||
if (iter->second.sendReplyTo != NO_COMMANDER) {
|
||||
if (iter != deviceCommandMap.end() and iter->second.sendReplyTo != NO_COMMANDER) {
|
||||
actionHelper.finish(true, iter->second.sendReplyTo, iter->first, returnvalue::OK);
|
||||
}
|
||||
iter->second.isExecuting = false;
|
||||
}
|
||||
commandIsPending = false;
|
||||
switch (commandId) {
|
||||
case supv::READ_GPIO: {
|
||||
@ -1918,7 +1926,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
|
||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||
sif::info << "PlocSupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl;
|
||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||
if (iter->second.sendReplyTo == NO_COMMAND_ID) {
|
||||
if (iter != deviceCommandMap.end() and iter->second.sendReplyTo == NO_COMMAND_ID) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
uint8_t data[sizeof(gpioState)];
|
||||
|
Loading…
x
Reference in New Issue
Block a user