and now this is less confusing as well
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Robin Müller 2024-04-17 10:22:25 +02:00
parent 418c501acf
commit d319fcfa03
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 16 additions and 26 deletions

View File

@ -350,26 +350,19 @@ void FreshMpsocHandler::dataReceived(ActionId_t actionId, const uint8_t* data, u
}
void FreshMpsocHandler::completionSuccessfulReceived(ActionId_t actionId) {
if (actionId == supv::ACK_REPORT) {
// I seriously don't know why this happens..
// sif::warning
// << "FreshMpsocHandler::completionSuccessfulReceived: Only received ACK report.
// Consider
// "
// "increasing the MPSoC boot timer."
// << std::endl;
} else if (actionId != supv::EXE_REPORT) {
sif::warning << "FreshMpsocHandler::completionSuccessfulReceived: Did not expect the action "
<< "ID " << actionId << std::endl;
return;
}
switch (powerState) {
case PowerState::PENDING_STARTUP: {
if (actionId != supv::START_MPSOC) {
return;
}
mpsocBootTransitionCd.resetTimer();
powerState = PowerState::DONE;
break;
}
case PowerState::PENDING_SHUTDOWN: {
if (actionId != supv::SHUTDOWN_MPSOC) {
return;
}
powerState = PowerState::DONE;
break;
}
@ -380,21 +373,15 @@ void FreshMpsocHandler::completionSuccessfulReceived(ActionId_t actionId) {
}
void FreshMpsocHandler::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
handleActionCommandFailure(actionId);
handleActionCommandFailure(actionId, returnCode);
}
void FreshMpsocHandler::handleActionCommandFailure(ActionId_t actionId) {
switch (actionId) {
case supv::ACK_REPORT:
case supv::EXE_REPORT:
break;
default:
sif::warning << "PlocMPSoCHandler::handleActionCommandFailure: Did not expect the action ID "
<< actionId << std::endl;
return;
}
void FreshMpsocHandler::handleActionCommandFailure(ActionId_t actionId, ReturnValue_t returnCode) {
switch (powerState) {
case PowerState::PENDING_STARTUP: {
if (actionId != supv::START_MPSOC) {
return;
}
sif::info << "PlocMPSoCHandler::handleActionCommandFailure: MPSoC boot command failed"
<< std::endl;
// This is commonly the case when the MPSoC is already operational. Thus the power state is
@ -404,6 +391,9 @@ void FreshMpsocHandler::handleActionCommandFailure(ActionId_t actionId) {
case PowerState::PENDING_SHUTDOWN: {
// FDIR will intercept event and switch PLOC power off
triggerEvent(mpsoc::MPSOC_SHUTDOWN_FAILED);
if (actionId != supv::SHUTDOWN_MPSOC) {
return;
}
sif::warning << "PlocMPSoCHandler::handleActionCommandFailure: Failed to shutdown MPSoC"
<< std::endl;
break;

View File

@ -162,7 +162,7 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues, uint16_t startAtIndex) override;
void handleActionCommandFailure(ActionId_t actionId);
void handleActionCommandFailure(ActionId_t actionId, ReturnValue_t returnCode);
ReturnValue_t executeRegularCmd(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t dataLen);
void handleTransitionToOn();

View File

@ -1299,7 +1299,7 @@ void FreshSupvHandler::handleExecutionFailureReport(ActiveCmdInfo& info, Executi
triggerEvent(SUPV_EXE_FAILURE, info.commandId, static_cast<uint32_t>(report.getStatusCode()));
}
if (info.commandedBy) {
actionHelper.finish(false, info.commandedBy, info.commandId, report.getStatusCode());
actionHelper.finish(false, info.commandedBy, info.commandId, result::RECEIVED_EXE_FAILURE);
}
info.isPending = false;
}