and now this is less confusing as well
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
418c501acf
commit
d319fcfa03
@ -350,26 +350,19 @@ void FreshMpsocHandler::dataReceived(ActionId_t actionId, const uint8_t* data, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FreshMpsocHandler::completionSuccessfulReceived(ActionId_t actionId) {
|
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) {
|
switch (powerState) {
|
||||||
case PowerState::PENDING_STARTUP: {
|
case PowerState::PENDING_STARTUP: {
|
||||||
|
if (actionId != supv::START_MPSOC) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
mpsocBootTransitionCd.resetTimer();
|
mpsocBootTransitionCd.resetTimer();
|
||||||
powerState = PowerState::DONE;
|
powerState = PowerState::DONE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PowerState::PENDING_SHUTDOWN: {
|
case PowerState::PENDING_SHUTDOWN: {
|
||||||
|
if (actionId != supv::SHUTDOWN_MPSOC) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
powerState = PowerState::DONE;
|
powerState = PowerState::DONE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -380,21 +373,15 @@ void FreshMpsocHandler::completionSuccessfulReceived(ActionId_t actionId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FreshMpsocHandler::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
|
void FreshMpsocHandler::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
|
||||||
handleActionCommandFailure(actionId);
|
handleActionCommandFailure(actionId, returnCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FreshMpsocHandler::handleActionCommandFailure(ActionId_t actionId) {
|
void FreshMpsocHandler::handleActionCommandFailure(ActionId_t actionId, ReturnValue_t returnCode) {
|
||||||
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;
|
|
||||||
}
|
|
||||||
switch (powerState) {
|
switch (powerState) {
|
||||||
case PowerState::PENDING_STARTUP: {
|
case PowerState::PENDING_STARTUP: {
|
||||||
|
if (actionId != supv::START_MPSOC) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sif::info << "PlocMPSoCHandler::handleActionCommandFailure: MPSoC boot command failed"
|
sif::info << "PlocMPSoCHandler::handleActionCommandFailure: MPSoC boot command failed"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
// This is commonly the case when the MPSoC is already operational. Thus the power state is
|
// 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: {
|
case PowerState::PENDING_SHUTDOWN: {
|
||||||
// FDIR will intercept event and switch PLOC power off
|
// FDIR will intercept event and switch PLOC power off
|
||||||
triggerEvent(mpsoc::MPSOC_SHUTDOWN_FAILED);
|
triggerEvent(mpsoc::MPSOC_SHUTDOWN_FAILED);
|
||||||
|
if (actionId != supv::SHUTDOWN_MPSOC) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
sif::warning << "PlocMPSoCHandler::handleActionCommandFailure: Failed to shutdown MPSoC"
|
sif::warning << "PlocMPSoCHandler::handleActionCommandFailure: Failed to shutdown MPSoC"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
break;
|
break;
|
||||||
|
@ -162,7 +162,7 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
|
|||||||
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper,
|
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper,
|
||||||
const ParameterWrapper* newValues, uint16_t startAtIndex) override;
|
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,
|
ReturnValue_t executeRegularCmd(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t* data, size_t dataLen);
|
const uint8_t* data, size_t dataLen);
|
||||||
void handleTransitionToOn();
|
void handleTransitionToOn();
|
||||||
|
@ -1299,7 +1299,7 @@ void FreshSupvHandler::handleExecutionFailureReport(ActiveCmdInfo& info, Executi
|
|||||||
triggerEvent(SUPV_EXE_FAILURE, info.commandId, static_cast<uint32_t>(report.getStatusCode()));
|
triggerEvent(SUPV_EXE_FAILURE, info.commandId, static_cast<uint32_t>(report.getStatusCode()));
|
||||||
}
|
}
|
||||||
if (info.commandedBy) {
|
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;
|
info.isPending = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user