Merge remote-tracking branch 'origin/develop' into feature_move_acs_event_handling_to_system
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-03-10 15:03:55 +01:00
commit 793d6feaaa
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
15 changed files with 147 additions and 80 deletions

View File

@ -16,6 +16,23 @@ will consitute of a breaking change warranting a new major release:
# [unreleased] # [unreleased]
## Fixed
- Fix for heater names: HPA heater (index 7) is now the Syrlinks heater.
## Changed
- More fixes and improvements for SD card handling. Extend SD card setup in core controller to
create full initial state for SD card manager are core controller as early as possible, turn
execution of setup file update blocking. This might solve the issue with the SD card manager
sometimes blocking for a long time.
- Request raw MTM measurement twice for IMTQ, might reduce number of times measurement could not
be retrieved.
# [v1.36.0] 2023-03-08
eive-tmtc: v2.17.2
## Added ## Added
- Star Tracker Assembly - Star Tracker Assembly
@ -33,6 +50,8 @@ will consitute of a breaking change warranting a new major release:
## Fixed ## Fixed
- Command TCS controller off first for TCS subsystem transition to off.
- Health handling for TCS board assembly
- Mode fallback from IDLE mode to SAFE mode due to ACS errors/events now works properly for - Mode fallback from IDLE mode to SAFE mode due to ACS errors/events now works properly for
the ACS subsystem the ACS subsystem
- Bugfix in IDLE transition for system. - Bugfix in IDLE transition for system.

View File

@ -10,8 +10,8 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 1) set(OBSW_VERSION_MAJOR 1)
set(OBSW_VERSION_MINOR 35) set(OBSW_VERSION_MINOR 36)
set(OBSW_VERSION_REVISION 1) set(OBSW_VERSION_REVISION 0)
# set(CMAKE_VERBOSE TRUE) # set(CMAKE_VERBOSE TRUE)

View File

@ -42,6 +42,12 @@ CoreController::CoreController(object_id_t objectId)
if (not BLOCKING_SD_INIT) { if (not BLOCKING_SD_INIT) {
sdcMan->setBlocking(false); sdcMan->setBlocking(false);
} }
// Set up state of SD card manager and own initial state.
// Stopwatch watch;
sdcMan->updateSdCardStateFile();
sdcMan->updateSdStatePair();
SdCardManager::SdStatePair sdStates;
sdcMan->getSdCardsStatus(sdStates);
auto sdCard = sdcMan->getPreferredSdCard(); auto sdCard = sdcMan->getPreferredSdCard();
if (not sdCard.has_value()) { if (not sdCard.has_value()) {
sif::error << "CoreController::initializeAfterTaskCreation: " sif::error << "CoreController::initializeAfterTaskCreation: "
@ -50,7 +56,11 @@ CoreController::CoreController(object_id_t objectId)
sdCard = sd::SdCard::SLOT_0; sdCard = sd::SdCard::SLOT_0;
} }
sdInfo.active = sdCard.value(); sdInfo.active = sdCard.value();
sdcMan->setActiveSdCard(sdInfo.active); if (sdStates.first == sd::SdState::MOUNTED) {
sdcMan->setActiveSdCard(sd::SdCard::SLOT_0);
} else if (sdStates.second == sd::SdState::MOUNTED) {
sdcMan->setActiveSdCard(sd::SdCard::SLOT_1);
}
currMntPrefix = sdcMan->getCurrentMountPrefix(); currMntPrefix = sdcMan->getCurrentMountPrefix();
getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY); getCurrentBootCopy(CURRENT_CHIP, CURRENT_COPY);
@ -400,7 +410,9 @@ ReturnValue_t CoreController::sdStateMachine() {
sif::warning << "CoreController::sdStateMachine: Updating SD card state file failed" sif::warning << "CoreController::sdStateMachine: Updating SD card state file failed"
<< std::endl; << std::endl;
} }
sdInfo.commandExecuted = true; sdFsmState = SdStates::SET_STATE_SELF;
sdInfo.commandExecuted = false;
sdInfo.cycleCount = 0;
} else { } else {
nonBlockingOpChecking(SdStates::SET_STATE_SELF, 4, "Updating SDC file"); nonBlockingOpChecking(SdStates::SET_STATE_SELF, 4, "Updating SDC file");
} }
@ -543,10 +555,6 @@ ReturnValue_t CoreController::sdStateMachine() {
if (sdFsmState == SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE) { if (sdFsmState == SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE) {
sdFsmState = SdStates::UPDATE_INFO; sdFsmState = SdStates::UPDATE_INFO;
} else if (sdFsmState == SdStates::UPDATE_INFO) { } else if (sdFsmState == SdStates::UPDATE_INFO) {
// It is assumed that all tasks are running by the point this section is reached.
// Therefore, perform this operation in blocking mode because it does not take long
// and the ready state of the SD card is available sooner
sdcMan->setBlocking(true);
// Update status file // Update status file
result = sdcMan->updateSdCardStateFile(); result = sdcMan->updateSdCardStateFile();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {

View File

@ -235,7 +235,6 @@ void scheduling::initTasks() {
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask( PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
"ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc); "ACS_SYS_TASK", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
static_cast<void>(acsSysTask);
result = acsSysTask->addComponent(objects::ACS_SUBSYSTEM); result = acsSysTask->addComponent(objects::ACS_SUBSYSTEM);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
scheduling::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM); scheduling::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);

View File

@ -195,29 +195,9 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
return result; return result;
} }
ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& active) { ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& sdStates) {
using namespace std;
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX); MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
std::error_code e; sdStates = this->sdStates;
if (not filesystem::exists(SD_STATE_FILE, e)) {
return STATUS_FILE_NEXISTS;
}
// Now the file should exist in any case. Still check whether it exists.
fstream sdStatus(SD_STATE_FILE);
if (not sdStatus.good()) {
return STATUS_FILE_NEXISTS;
}
string line;
uint8_t idx = 0;
sd::SdCard currentSd = sd::SdCard::SLOT_0;
// Process status file line by line
while (std::getline(sdStatus, line)) {
processSdStatusLine(active, line, idx, currentSd);
}
if (active.first != sd::SdState::MOUNTED && active.second != sd::SdState::MOUNTED) {
sdCardActive = false;
}
return returnvalue::OK; return returnvalue::OK;
} }
@ -309,10 +289,9 @@ ReturnValue_t SdCardManager::sanitizeState(SdStatePair* statusPair, sd::SdCard p
resetNonBlockingState = true; resetNonBlockingState = true;
} }
if (statusPair == nullptr) { if (statusPair == nullptr) {
sdStatusPtr = std::make_unique<SdStatePair>(); return returnvalue::FAILED;
statusPair = sdStatusPtr.get();
getSdCardsStatus(*statusPair);
} }
getSdCardsStatus(*statusPair);
if (statusPair->first == sd::SdState::ON) { if (statusPair->first == sd::SdState::ON) {
result = mountSdCard(prefSdCard); result = mountSdCard(prefSdCard);
@ -330,8 +309,34 @@ void SdCardManager::resetState() {
currentOp = Operations::IDLE; currentOp = Operations::IDLE;
} }
void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState>& active, ReturnValue_t SdCardManager::updateSdStatePair() {
std::string& line, uint8_t& idx, sd::SdCard& currentSd) { using namespace std;
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
std::error_code e;
if (not filesystem::exists(SD_STATE_FILE, e)) {
return STATUS_FILE_NEXISTS;
}
// Now the file should exist in any case. Still check whether it exists.
fstream sdStatus(SD_STATE_FILE);
if (not sdStatus.good()) {
return STATUS_FILE_NEXISTS;
}
string line;
uint8_t idx = 0;
sd::SdCard currentSd = sd::SdCard::SLOT_0;
// Process status file line by line
while (std::getline(sdStatus, line)) {
processSdStatusLine(line, idx, currentSd);
}
if (sdStates.first != sd::SdState::MOUNTED && sdStates.second != sd::SdState::MOUNTED) {
sdCardActive = false;
}
return returnvalue::OK;
}
void SdCardManager::processSdStatusLine(std::string& line, uint8_t& idx, sd::SdCard& currentSd) {
using namespace std; using namespace std;
istringstream iss(line); istringstream iss(line);
string word; string word;
@ -352,24 +357,24 @@ void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState>& act
if (word == "on") { if (word == "on") {
if (currentSd == sd::SdCard::SLOT_0) { if (currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdState::ON; sdStates.first = sd::SdState::ON;
} else { } else {
active.second = sd::SdState::ON; sdStates.second = sd::SdState::ON;
} }
} else if (word == "off") { } else if (word == "off") {
if (currentSd == sd::SdCard::SLOT_0) { if (currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdState::OFF; sdStates.first = sd::SdState::OFF;
} else { } else {
active.second = sd::SdState::OFF; sdStates.second = sd::SdState::OFF;
} }
} }
} }
if (mountLine) { if (mountLine) {
if (currentSd == sd::SdCard::SLOT_0) { if (currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdState::MOUNTED; sdStates.first = sd::SdState::MOUNTED;
} else { } else {
active.second = sd::SdState::MOUNTED; sdStates.second = sd::SdState::MOUNTED;
} }
} }
@ -407,7 +412,7 @@ ReturnValue_t SdCardManager::updateSdCardStateFile() {
MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX); MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
// Use q7hw utility and pipe the command output into the state file // Use q7hw utility and pipe the command output into the state file
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE); std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
cmdExecutor.load(updateCmd, blocking, printCmdOutput); cmdExecutor.load(updateCmd, true, printCmdOutput);
ReturnValue_t result = cmdExecutor.execute(); ReturnValue_t result = cmdExecutor.execute();
if (blocking and result != returnvalue::OK) { if (blocking and result != returnvalue::OK) {
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard"); utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
@ -475,35 +480,29 @@ bool SdCardManager::isSdCardUsable(std::optional<sd::SdCard> sdCard) {
} }
} }
SdCardManager::SdStatePair active; MutexGuard mg(sdLock, LOCK_TYPE, SD_LOCK_TIMEOUT, LOCK_CTX);
ReturnValue_t result = this->getSdCardsStatus(active);
if (result != returnvalue::OK) {
sif::debug << "SdCardManager::isSdCardMounted: Failed to get SD card active state";
return false;
}
if (not sdCard) { if (not sdCard) {
if (active.first == sd::MOUNTED or active.second == sd::MOUNTED) { if (sdStates.first == sd::MOUNTED or sdStates.second == sd::MOUNTED) {
return true; return true;
} }
return false; return false;
} }
if (sdCard == sd::SLOT_0) { if (sdCard == sd::SLOT_0) {
if (active.first == sd::MOUNTED) { if (sdStates.first == sd::MOUNTED) {
return true; return true;
} else { } else {
return false; return false;
} }
} }
if (sdCard == sd::SLOT_1) { if (sdCard == sd::SLOT_1) {
if (active.second == sd::MOUNTED) { if (sdStates.second == sd::MOUNTED) {
return true; return true;
} else { } else {
return false; return false;
} }
} }
if (sdCard == sd::BOTH) { if (sdCard == sd::BOTH) {
if (active.first == sd::MOUNTED && active.second == sd::MOUNTED) { if (sdStates.first == sd::MOUNTED && sdStates.second == sd::MOUNTED) {
return true; return true;
} }
} }

View File

@ -25,7 +25,7 @@ class MutexIF;
* state * state
*/ */
class SdCardManager : public SystemObject, public SdCardMountedIF { class SdCardManager : public SystemObject, public SdCardMountedIF {
friend class SdCardAccess; friend class CoreController;
public: public:
using mountInitCb = ReturnValue_t (*)(void* args); using mountInitCb = ReturnValue_t (*)(void* args);
@ -218,6 +218,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
private: private:
CommandExecutor cmdExecutor; CommandExecutor cmdExecutor;
SdStatePair sdStates;
Operations currentOp = Operations::IDLE; Operations currentOp = Operations::IDLE;
bool blocking = false; bool blocking = false;
bool sdCardActive = true; bool sdCardActive = true;
@ -233,10 +234,11 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
SdCardManager(); SdCardManager();
ReturnValue_t updateSdStatePair();
ReturnValue_t setSdCardState(sd::SdCard sdCard, bool on); ReturnValue_t setSdCardState(sd::SdCard sdCard, bool on);
void processSdStatusLine(SdStatePair& active, std::string& line, uint8_t& idx, void processSdStatusLine(std::string& line, uint8_t& idx, sd::SdCard& currentSd);
sd::SdCard& currentSd);
std::optional<std::string> currentPrefix; std::optional<std::string> currentPrefix;

View File

@ -136,7 +136,7 @@ enum commonObjects : uint32_t {
HEATER_4_CAMERA = 0x60000004, HEATER_4_CAMERA = 0x60000004,
HEATER_5_STR = 0x60000005, HEATER_5_STR = 0x60000005,
HEATER_6_DRO = 0x60000006, HEATER_6_DRO = 0x60000006,
HEATER_7_HPA = 0x60000007, HEATER_7_SYRLINKS = 0x60000007,
// 0x73 ('s') for assemblies and system/subsystem components // 0x73 ('s') for assemblies and system/subsystem components
ACS_BOARD_ASS = 0x73000001, ACS_BOARD_ASS = 0x73000001,

2
fsfw

@ -1 +1 @@
Subproject commit 26e4445189b676eaee11840e5a9d0ede25cf3896 Subproject commit 4d6f6e6b23b5c0486dad6be8abba7681114a05fe

View File

@ -120,6 +120,11 @@ void ImtqPollingTask::handleMeasureStep() {
} }
} }
// The I2C IP core on EIVE sometimes glitches out. Send start MTM measurement twice.
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecMeasure(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return;
}
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT; cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecMeasure(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) { if (i2cCmdExecMeasure(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return; return;
@ -177,6 +182,11 @@ void ImtqPollingTask::handleActuateStep() {
TaskFactory::delayTask(10); TaskFactory::delayTask(10);
cmdLen = 1; cmdLen = 1;
// The I2C IP core on EIVE sometimes glitches out. Send start MTM measurement twice.
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecActuate(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return;
}
cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT; cmdBuf[0] = imtq::CC::START_MTM_MEASUREMENT;
if (i2cCmdExecActuate(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) { if (i2cCmdExecActuate(imtq::CC::START_MTM_MEASUREMENT) != returnvalue::OK) {
return; return;

View File

@ -224,7 +224,7 @@ void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF&
{new HealthDevice(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4}, {new HealthDevice(objects::HEATER_4_CAMERA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_4},
{new HealthDevice(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5}, {new HealthDevice(objects::HEATER_5_STR, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_5},
{new HealthDevice(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6}, {new HealthDevice(objects::HEATER_6_DRO, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_6},
{new HealthDevice(objects::HEATER_7_HPA, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7}, {new HealthDevice(objects::HEATER_7_SYRLINKS, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7},
}}); }});
heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher, heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher,
pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V); pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);

View File

@ -40,6 +40,12 @@ ReturnValue_t TcsBoardAssembly::commandChildren(Mode_t mode, Submode_t submode)
modeTable[idx].setMode(MODE_OFF); modeTable[idx].setMode(MODE_OFF);
modeTable[idx].setSubmode(SUBMODE_NONE); modeTable[idx].setSubmode(SUBMODE_NONE);
} }
if (recoveryState == RecoveryState::RECOVERY_IDLE) {
result = checkAndHandleHealthStates(mode, submode);
if (result == NEED_TO_CHANGE_HEALTH) {
return returnvalue::OK;
}
}
if (recoveryState != RecoveryState::RECOVERY_STARTED) { if (recoveryState != RecoveryState::RECOVERY_STARTED) {
if (mode == DeviceHandlerIF::MODE_NORMAL or mode == MODE_ON) { if (mode == DeviceHandlerIF::MODE_NORMAL or mode == MODE_ON) {
result = handleNormalOrOnModeCmd(mode, submode); result = handleNormalOrOnModeCmd(mode, submode);
@ -61,10 +67,10 @@ ReturnValue_t TcsBoardAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_
} catch (const std::out_of_range& e) { } catch (const std::out_of_range& e) {
sif::error << "TcsBoardAssembly: Invalid children map: " << e.what() << std::endl; sif::error << "TcsBoardAssembly: Invalid children map: " << e.what() << std::endl;
} }
if (devsInWrongMode >= 3) { if (devsInWrongMode == NUMBER_RTDS) {
if (warningSwitch) { if (warningSwitch) {
sif::warning << "TcsBoardAssembly::checkChildrenStateOn: " << devsInWrongMode << " devices in" sif::warning << "TcsBoardAssembly::checkChildrenStateOn: All devices in wrong mode"
<< " wrong mode" << std::endl; << std::endl;
warningSwitch = false; warningSwitch = false;
} }
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE; return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
@ -179,9 +185,29 @@ void TcsBoardAssembly::handleModeReached() {
} }
void TcsBoardAssembly::handleChildrenLostMode(ReturnValue_t result) { void TcsBoardAssembly::handleChildrenLostMode(ReturnValue_t result) {
// TODO: Maybe try a reboot once here?
triggerEvent(CHILDREN_LOST_MODE, result); triggerEvent(CHILDREN_LOST_MODE, result);
return; startTransition(mode, submode);
}
ReturnValue_t TcsBoardAssembly::checkAndHandleHealthStates(Mode_t deviceMode,
Submode_t deviceSubmode) {
ReturnValue_t status = returnvalue::OK;
for (const auto& dev : helper.rtdInfos) {
HealthState health = healthHelper.healthTable->getHealth(dev.first);
if (health == HealthState::HEALTHY) {
return returnvalue::OK;
}
}
for (const auto& dev : helper.rtdInfos) {
HealthState health = healthHelper.healthTable->getHealth(dev.first);
if (health == FAULTY or health == PERMANENT_FAULTY) {
status = NEED_TO_CHANGE_HEALTH;
} else if (health == EXTERNAL_CONTROL) {
modeHelper.setForced(true);
}
}
return status;
} }
void TcsBoardAssembly::handleModeTransitionFailed(ReturnValue_t result) { void TcsBoardAssembly::handleModeTransitionFailed(ReturnValue_t result) {

View File

@ -52,6 +52,7 @@ class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override; ReturnValue_t isModeCombinationValid(Mode_t mode, Submode_t submode) override;
void startTransition(Mode_t mode, Submode_t submode) override; void startTransition(Mode_t mode, Submode_t submode) override;
void handleModeReached() override; void handleModeReached() override;
ReturnValue_t checkAndHandleHealthStates(Mode_t deviceMode, Submode_t deviceSubmode);
// These two overrides prevent a transition of the whole assembly back to off just because // These two overrides prevent a transition of the whole assembly back to off just because
// some devices are not working // some devices are not working

View File

@ -35,6 +35,7 @@ void satsystem::init() {
ModeListEntry entry; ModeListEntry entry;
buildSafeSequence(EIVE_SYSTEM, entry); buildSafeSequence(EIVE_SYSTEM, entry);
buildIdleSequence(EIVE_SYSTEM, entry); buildIdleSequence(EIVE_SYSTEM, entry);
EIVE_SYSTEM.setInitialMode(HasModesIF::MODE_OFF, 0);
} }
EiveSystem satsystem::EIVE_SYSTEM = EiveSystem(objects::EIVE_SYSTEM, 12, 24); EiveSystem satsystem::EIVE_SYSTEM = EiveSystem(objects::EIVE_SYSTEM, 12, 24);
@ -83,6 +84,8 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
// Do no track ACS for now because it might jump to detumble mode and back to safe as part of // Do no track ACS for now because it might jump to detumble mode and back to safe as part of
// normal operations. // normal operations.
// UPDATE: This could be re-enabled as soon as the detumble mode is a submode of
// ACS CTRL safe mode.
// iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second, true); // iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second, true);
iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_SAFE_TGT.second); iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_SAFE_TGT.second);
check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TGT.first, &EIVE_TABLE_SAFE_TGT.second)), ctxc); check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TGT.first, &EIVE_TABLE_SAFE_TGT.second)), ctxc);

View File

@ -19,8 +19,8 @@ static const auto NML = DeviceHandlerIF::MODE_NORMAL;
auto TCS_SEQUENCE_OFF = std::make_pair(OFF, FixedArrayList<ModeListEntry, 3>()); auto TCS_SEQUENCE_OFF = std::make_pair(OFF, FixedArrayList<ModeListEntry, 3>());
auto TCS_TABLE_OFF_TGT = std::make_pair((OFF << 24) | 1, FixedArrayList<ModeListEntry, 2>()); auto TCS_TABLE_OFF_TGT = std::make_pair((OFF << 24) | 1, FixedArrayList<ModeListEntry, 2>());
auto TCS_TABLE_OFF_TRANS_0 = std::make_pair((OFF << 24) | 2, FixedArrayList<ModeListEntry, 7>()); auto TCS_TABLE_OFF_TRANS_0 = std::make_pair((OFF << 24) | 2, FixedArrayList<ModeListEntry, 2>());
auto TCS_TABLE_OFF_TRANS_1 = std::make_pair((OFF << 24) | 3, FixedArrayList<ModeListEntry, 2>()); auto TCS_TABLE_OFF_TRANS_1 = std::make_pair((OFF << 24) | 3, FixedArrayList<ModeListEntry, 7>());
auto TCS_SEQUENCE_NORMAL = std::make_pair(NML, FixedArrayList<ModeListEntry, 3>()); auto TCS_SEQUENCE_NORMAL = std::make_pair(NML, FixedArrayList<ModeListEntry, 3>());
auto TCS_TABLE_NORMAL_TGT = std::make_pair((NML << 24) | 1, FixedArrayList<ModeListEntry, 2>()); auto TCS_TABLE_NORMAL_TGT = std::make_pair((NML << 24) | 1, FixedArrayList<ModeListEntry, 2>());
@ -59,16 +59,16 @@ void buildOffSequence(Subsystem& ss, ModeListEntry& eh) {
// OFF target table is empty // OFF target table is empty
check(ss.addTable(TableEntry(TCS_TABLE_OFF_TGT.first, &TCS_TABLE_OFF_TGT.second)), ctxc); check(ss.addTable(TableEntry(TCS_TABLE_OFF_TGT.first, &TCS_TABLE_OFF_TGT.second)), ctxc);
iht(objects::TCS_BOARD_ASS, OFF, 0, TCS_TABLE_OFF_TRANS_0.second); // Transition 1
iht(objects::TMP1075_HANDLER_TCS_0, OFF, 0, TCS_TABLE_OFF_TRANS_0.second); iht(objects::THERMAL_CONTROLLER, OFF, 0, TCS_TABLE_OFF_TRANS_0.second);
iht(objects::TMP1075_HANDLER_TCS_1, OFF, 0, TCS_TABLE_OFF_TRANS_0.second);
iht(objects::TMP1075_HANDLER_PLPCDU_0, OFF, 0, TCS_TABLE_OFF_TRANS_0.second);
// damaged
// iht(objects::TMP1075_HANDLER_PLPCDU_1, OFF, 0, TCS_TABLE_OFF_TRANS_0.second);
iht(objects::TMP1075_HANDLER_IF_BOARD, OFF, 0, TCS_TABLE_OFF_TRANS_0.second);
check(ss.addTable(TableEntry(TCS_TABLE_OFF_TRANS_0.first, &TCS_TABLE_OFF_TRANS_0.second)), ctxc); check(ss.addTable(TableEntry(TCS_TABLE_OFF_TRANS_0.first, &TCS_TABLE_OFF_TRANS_0.second)), ctxc);
iht(objects::THERMAL_CONTROLLER, OFF, 0, TCS_TABLE_OFF_TRANS_0.second); iht(objects::TCS_BOARD_ASS, OFF, 0, TCS_TABLE_OFF_TRANS_1.second);
iht(objects::TMP1075_HANDLER_TCS_0, OFF, 0, TCS_TABLE_OFF_TRANS_1.second);
iht(objects::TMP1075_HANDLER_TCS_1, OFF, 0, TCS_TABLE_OFF_TRANS_1.second);
iht(objects::TMP1075_HANDLER_PLPCDU_0, OFF, 0, TCS_TABLE_OFF_TRANS_1.second);
// TMP PL PCDU 1 is damaged
iht(objects::TMP1075_HANDLER_IF_BOARD, OFF, 0, TCS_TABLE_OFF_TRANS_1.second);
check(ss.addTable(TableEntry(TCS_TABLE_OFF_TRANS_1.first, &TCS_TABLE_OFF_TRANS_1.second)), ctxc); check(ss.addTable(TableEntry(TCS_TABLE_OFF_TRANS_1.first, &TCS_TABLE_OFF_TRANS_1.second)), ctxc);
ihs(TCS_SEQUENCE_OFF.second, TCS_TABLE_OFF_TGT.first, 0, false); ihs(TCS_SEQUENCE_OFF.second, TCS_TABLE_OFF_TGT.first, 0, false);
@ -98,20 +98,20 @@ void buildNormalSequence(Subsystem& ss, ModeListEntry& eh) {
check(sequence.insert(eh), ctxc); check(sequence.insert(eh), ctxc);
}; };
// OFF target table is empty // Normal target table is empty
check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TGT.first, &TCS_TABLE_NORMAL_TGT.second)), ctxc); check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TGT.first, &TCS_TABLE_NORMAL_TGT.second)), ctxc);
iht(objects::TCS_BOARD_ASS, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TCS_BOARD_ASS, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second);
iht(objects::TMP1075_HANDLER_TCS_0, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TMP1075_HANDLER_TCS_0, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second);
iht(objects::TMP1075_HANDLER_TCS_1, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TMP1075_HANDLER_TCS_1, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second);
iht(objects::TMP1075_HANDLER_PLPCDU_0, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TMP1075_HANDLER_PLPCDU_0, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second);
// damaged // TMP PL PCDU 1 is damaged
// iht(objects::TMP1075_HANDLER_PLPCDU_1, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second);
iht(objects::TMP1075_HANDLER_IF_BOARD, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); iht(objects::TMP1075_HANDLER_IF_BOARD, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second);
check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TRANS_0.first, &TCS_TABLE_NORMAL_TRANS_0.second)), check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TRANS_0.first, &TCS_TABLE_NORMAL_TRANS_0.second)),
ctxc); ctxc);
iht(objects::THERMAL_CONTROLLER, NML, 0, TCS_TABLE_NORMAL_TRANS_0.second); // Transition 1
iht(objects::THERMAL_CONTROLLER, NML, 0, TCS_TABLE_NORMAL_TRANS_1.second);
check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TRANS_1.first, &TCS_TABLE_NORMAL_TRANS_1.second)), check(ss.addTable(TableEntry(TCS_TABLE_NORMAL_TRANS_1.first, &TCS_TABLE_NORMAL_TRANS_1.second)),
ctxc); ctxc);

2
tmtc

@ -1 +1 @@
Subproject commit af17e30676b3c4e364b6969873519951453181e2 Subproject commit 0add5c6ac5eda7e6b37e966e84d3122d0d44b80d