|
|
|
@ -70,6 +70,9 @@ void EiveSystem::performChildOperation() {
|
|
|
|
|
}
|
|
|
|
|
pdecRecoveryLogic();
|
|
|
|
|
i2cRecoveryLogic();
|
|
|
|
|
if (forcePlOffState != ForcePlOffState::NONE) {
|
|
|
|
|
forceOffPayload();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReturnValue_t EiveSystem::initialize() {
|
|
|
|
@ -203,10 +206,14 @@ void EiveSystem::handleEventMessages() {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case power::POWER_LEVEL_LOW: {
|
|
|
|
|
forceOffPayload();
|
|
|
|
|
forcePlOffState = ForcePlOffState::FORCE_ALL_EXCEPT_SUPV_OFF;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case power::POWER_LEVEL_CRITICAL:
|
|
|
|
|
case power::POWER_LEVEL_CRITICAL: {
|
|
|
|
|
// Force payload off in any case. It really should not be on when the power level
|
|
|
|
|
// becomes critical, but better be safe than sorry..
|
|
|
|
|
forcePlOffState = ForcePlOffState::FORCE_ALL_EXCEPT_SUPV_OFF;
|
|
|
|
|
// Also set the STR assembly to faulty, which should cause a fallback to SAFE mode.
|
|
|
|
|
CommandMessage msg;
|
|
|
|
|
HealthMessage::setHealthMessage(&msg, HealthMessage::HEALTH_SET, HasHealthIF::FAULTY);
|
|
|
|
|
ReturnValue_t result = MessageQueueSenderIF::sendMessage(
|
|
|
|
@ -216,6 +223,7 @@ void EiveSystem::handleEventMessages() {
|
|
|
|
|
<< std::endl;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -403,37 +411,45 @@ void EiveSystem::pdecRecoveryLogic() {
|
|
|
|
|
|
|
|
|
|
void EiveSystem::forceOffPayload() {
|
|
|
|
|
CommandMessage msg;
|
|
|
|
|
ReturnValue_t result;
|
|
|
|
|
// set PL to faulty
|
|
|
|
|
HealthMessage::setHealthMessage(&msg, HealthMessage::HEALTH_SET, HasHealthIF::FAULTY);
|
|
|
|
|
|
|
|
|
|
ReturnValue_t result = commandQueue->sendMessage(plPcduQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PL PCDU failed" << std::endl;
|
|
|
|
|
if (forcePlOffState == ForcePlOffState::FORCE_ALL_EXCEPT_SUPV_OFF) {
|
|
|
|
|
result = commandQueue->sendMessage(plocMpsocQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PLOC MPSOC failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
result = commandQueue->sendMessage(cameraQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PL CAM failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
result = commandQueue->sendMessage(scexQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to SCEX failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
result = commandQueue->sendMessage(radSensorQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to RAD SENSOR failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
result = commandQueue->sendMessage(plPcduQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PL PCDU failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
forcePlOffState = ForcePlOffState::WAITING;
|
|
|
|
|
supvOffDelay.resetTimer();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = commandQueue->sendMessage(plocMpsocQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PLOC MPSOC failed" << std::endl;
|
|
|
|
|
if (forcePlOffState == ForcePlOffState::WAITING and supvOffDelay.hasTimedOut()) {
|
|
|
|
|
forcePlOffState = ForcePlOffState::FORCE_SUPV_OFF;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = commandQueue->sendMessage(plocSupervisorQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PLOC SUPERVISOR failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = commandQueue->sendMessage(cameraQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PL CAM failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = commandQueue->sendMessage(scexQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to SCEX failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = commandQueue->sendMessage(radSensorQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to RAD SENSOR failed" << std::endl;
|
|
|
|
|
if (forcePlOffState == ForcePlOffState::FORCE_SUPV_OFF) {
|
|
|
|
|
result = commandQueue->sendMessage(plocSupervisorQueueId, &msg);
|
|
|
|
|
if (result != returnvalue::OK) {
|
|
|
|
|
sif::error << "EIVE System: Sending FAULTY command to PLOC SUPERVISOR failed" << std::endl;
|
|
|
|
|
}
|
|
|
|
|
forcePlOffState = ForcePlOffState::NONE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|