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) {
|
void PlocSupervisorHandler::disableReply(DeviceCommandId_t replyId) {
|
||||||
DeviceReplyMap::iterator iter = deviceReplyMap.find(replyId);
|
DeviceReplyMap::iterator iter = deviceReplyMap.find(replyId);
|
||||||
|
if (iter == deviceReplyMap.end()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
DeviceReplyInfo* info = &(iter->second);
|
DeviceReplyInfo* info = &(iter->second);
|
||||||
info->delayCycles = 0;
|
info->delayCycles = 0;
|
||||||
info->active = false;
|
info->active = false;
|
||||||
@ -1616,6 +1619,9 @@ void PlocSupervisorHandler::sendFailureReport(DeviceCommandId_t replyId, ReturnV
|
|||||||
|
|
||||||
void PlocSupervisorHandler::disableExeReportReply() {
|
void PlocSupervisorHandler::disableExeReportReply() {
|
||||||
DeviceReplyIter iter = deviceReplyMap.find(supv::EXE_REPORT);
|
DeviceReplyIter iter = deviceReplyMap.find(supv::EXE_REPORT);
|
||||||
|
if (iter == deviceReplyMap.end()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
DeviceReplyInfo* info = &(iter->second);
|
DeviceReplyInfo* info = &(iter->second);
|
||||||
info->delayCycles = 0;
|
info->delayCycles = 0;
|
||||||
info->command = deviceCommandMap.end();
|
info->command = deviceCommandMap.end();
|
||||||
@ -1638,7 +1644,9 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket(DeviceCommandId_t id)
|
|||||||
result = handleMramDumpFile(id);
|
result = handleMramDumpFile(id);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(id);
|
DeviceCommandMap::iterator iter = deviceCommandMap.find(id);
|
||||||
|
if (iter != deviceCommandMap.end()) {
|
||||||
actionHelper.finish(false, iter->second.sendReplyTo, id, result);
|
actionHelper.finish(false, iter->second.sendReplyTo, id, result);
|
||||||
|
}
|
||||||
disableAllReplies();
|
disableAllReplies();
|
||||||
nextReplyId = supv::NONE;
|
nextReplyId = supv::NONE;
|
||||||
return result;
|
return result;
|
||||||
@ -1906,10 +1914,10 @@ ReturnValue_t PlocSupervisorHandler::eventSubscription() {
|
|||||||
ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionReport& report) {
|
ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionReport& report) {
|
||||||
DeviceCommandId_t commandId = getPendingCommand();
|
DeviceCommandId_t commandId = getPendingCommand();
|
||||||
DeviceCommandMap::iterator iter = deviceCommandMap.find(commandId);
|
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);
|
actionHelper.finish(true, iter->second.sendReplyTo, iter->first, returnvalue::OK);
|
||||||
}
|
|
||||||
iter->second.isExecuting = false;
|
iter->second.isExecuting = false;
|
||||||
|
}
|
||||||
commandIsPending = false;
|
commandIsPending = false;
|
||||||
switch (commandId) {
|
switch (commandId) {
|
||||||
case supv::READ_GPIO: {
|
case supv::READ_GPIO: {
|
||||||
@ -1918,7 +1926,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
|
|||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
sif::info << "PlocSupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl;
|
sif::info << "PlocSupervisorHandler: Read GPIO TM, State: " << gpioState << std::endl;
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
#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;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
uint8_t data[sizeof(gpioState)];
|
uint8_t data[sizeof(gpioState)];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user