|
|
|
@ -22,6 +22,10 @@ const auto check = subsystem::checkInsert;
|
|
|
|
|
void buildBootSequence(Subsystem& ss, ModeListEntry& eh);
|
|
|
|
|
void buildSafeSequence(Subsystem& ss, ModeListEntry& eh);
|
|
|
|
|
void buildIdleSequence(Subsystem& ss, ModeListEntry& eh);
|
|
|
|
|
void buildPtgNadirSequence(Subsystem& ss, ModeListEntry& eh);
|
|
|
|
|
void buildPtgTargetSequence(Subsystem& ss, ModeListEntry& eh);
|
|
|
|
|
void buildPtgTargetGsSequence(Subsystem& ss, ModeListEntry& eh);
|
|
|
|
|
void buildPtgInertialSequence(Subsystem& ss, ModeListEntry& eh);
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
static const auto OFF = HasModesIF::MODE_OFF;
|
|
|
|
@ -40,6 +44,10 @@ void satsystem::init() {
|
|
|
|
|
buildBootSequence(EIVE_SYSTEM, entry);
|
|
|
|
|
buildSafeSequence(EIVE_SYSTEM, entry);
|
|
|
|
|
buildIdleSequence(EIVE_SYSTEM, entry);
|
|
|
|
|
buildPtgNadirSequence(EIVE_SYSTEM, entry);
|
|
|
|
|
buildPtgTargetSequence(EIVE_SYSTEM, entry);
|
|
|
|
|
buildPtgTargetGsSequence(EIVE_SYSTEM, entry);
|
|
|
|
|
buildPtgInertialSequence(EIVE_SYSTEM, entry);
|
|
|
|
|
EIVE_SYSTEM.setInitialMode(satsystem::Mode::BOOT, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -68,88 +76,44 @@ auto EIVE_TABLE_IDLE_TRANS_0 =
|
|
|
|
|
auto EIVE_TABLE_IDLE_TRANS_1 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_IDLE << 24) | 3, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
|
|
|
|
|
auto EIVE_SEQUENCE_PTG_NADIR =
|
|
|
|
|
std::make_pair(satsystem::Mode::PTG_NADIR, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_NADIR_TGT =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_NADIR << 24) | 1, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_NADIR_TRANS_0 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_NADIR << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_NADIR_TRANS_1 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_NADIR << 24) | 3, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
|
|
|
|
|
auto EIVE_SEQUENCE_PTG_TARGET =
|
|
|
|
|
std::make_pair(satsystem::Mode::PTG_TARGET, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_TARGET_TGT =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_TARGET << 24) | 1, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_TARGET_TRANS_0 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_TARGET << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_TARGET_TRANS_1 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_TARGET << 24) | 3, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
|
|
|
|
|
auto EIVE_SEQUENCE_PTG_TARGET_GS =
|
|
|
|
|
std::make_pair(satsystem::Mode::PTG_TARGET_GS, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_TARGET_GS_TGT =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_TARGET_GS << 24) | 1, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_TARGET_GS_TRANS_0 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_TARGET_GS << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_TARGET_GS_TRANS_1 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_TARGET_GS << 24) | 3, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
|
|
|
|
|
auto EIVE_SEQUENCE_PTG_INERTIAL =
|
|
|
|
|
std::make_pair(satsystem::Mode::PTG_INERTIAL, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_INERTIAL_TGT =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_INERTIAL << 24) | 1, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_INERTIAL_TRANS_0 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_INERTIAL << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
auto EIVE_TABLE_PTG_INERTIAL_TRANS_1 =
|
|
|
|
|
std::make_pair((satsystem::Mode::PTG_INERTIAL << 24) | 3, FixedArrayList<ModeListEntry, 5>());
|
|
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
|
|
void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildSafeSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table,
|
|
|
|
|
bool allowAllSubmodes = false) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
if (allowAllSubmodes) {
|
|
|
|
|
eh.allowAllSubmodes();
|
|
|
|
|
}
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Do no track submode to allow transitions to DETUMBLE submode.
|
|
|
|
|
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);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TGT.first, &EIVE_TABLE_SAFE_TGT.second)), ctxc);
|
|
|
|
|
|
|
|
|
|
// Build SAFE transition 0.
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_SAFE_TRANS_0.second);
|
|
|
|
|
iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_SAFE_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TRANS_0.second, true);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TRANS_0.first, &EIVE_TABLE_SAFE_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build Safe sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_SAFE.second, EIVE_TABLE_SAFE_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_SAFE.second, EIVE_TABLE_SAFE_TRANS_0.first, 0, false);
|
|
|
|
|
check(ss.addSequence(SequenceEntry(EIVE_SEQUENCE_SAFE.first, &EIVE_SEQUENCE_SAFE.second,
|
|
|
|
|
EIVE_SEQUENCE_SAFE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildIdleSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_IDLE, 0, EIVE_TABLE_IDLE_TGT.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_IDLE_TGT.first, &EIVE_TABLE_IDLE_TGT.second)), ctxc);
|
|
|
|
|
|
|
|
|
|
// Build IDLE transition 0
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_IDLE_TRANS_0.second);
|
|
|
|
|
iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_IDLE_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_IDLE, 0, EIVE_TABLE_IDLE_TRANS_0.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_IDLE_TRANS_0.first, &EIVE_TABLE_IDLE_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build IDLE sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_IDLE.second, EIVE_TABLE_IDLE_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_IDLE.second, EIVE_TABLE_IDLE_TRANS_0.first, 0, false);
|
|
|
|
|
check(ss.addSequence(SequenceEntry(EIVE_SEQUENCE_IDLE.first, &EIVE_SEQUENCE_IDLE.second,
|
|
|
|
|
EIVE_SEQUENCE_SAFE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildBootSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildBootSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
@ -194,4 +158,240 @@ void buildBootSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
EIVE_SEQUENCE_SAFE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildSafeSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table,
|
|
|
|
|
bool allowAllSubmodes = false) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
if (allowAllSubmodes) {
|
|
|
|
|
eh.allowAllSubmodes();
|
|
|
|
|
}
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Do no track submode to allow transitions to DETUMBLE submode.
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TGT.second, true);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TGT.first, &EIVE_TABLE_SAFE_TGT.second)), ctxc);
|
|
|
|
|
|
|
|
|
|
// Build SAFE transition 0.
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_SAFE_TRANS_0.second);
|
|
|
|
|
iht(objects::PL_SUBSYSTEM, OFF, 0, EIVE_TABLE_SAFE_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::SAFE, 0, EIVE_TABLE_SAFE_TRANS_0.second, true);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_SAFE_TRANS_0.first, &EIVE_TABLE_SAFE_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build Safe sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_SAFE.second, EIVE_TABLE_SAFE_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_SAFE.second, EIVE_TABLE_SAFE_TRANS_0.first, 0, false);
|
|
|
|
|
check(ss.addSequence(SequenceEntry(EIVE_SEQUENCE_SAFE.first, &EIVE_SEQUENCE_SAFE.second,
|
|
|
|
|
EIVE_SEQUENCE_SAFE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildIdleSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_IDLE, 0, EIVE_TABLE_IDLE_TGT.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_IDLE_TGT.first, &EIVE_TABLE_IDLE_TGT.second)), ctxc);
|
|
|
|
|
|
|
|
|
|
// Build IDLE transition 0
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_IDLE_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_IDLE, 0, EIVE_TABLE_IDLE_TRANS_0.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_IDLE_TRANS_0.first, &EIVE_TABLE_IDLE_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build IDLE sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_IDLE.second, EIVE_TABLE_IDLE_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_IDLE.second, EIVE_TABLE_IDLE_TRANS_0.first, 0, false);
|
|
|
|
|
check(ss.addSequence(SequenceEntry(EIVE_SEQUENCE_IDLE.first, &EIVE_SEQUENCE_IDLE.second,
|
|
|
|
|
EIVE_SEQUENCE_SAFE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildPtgNadirSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildPtgNadirSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_NADIR, 0, EIVE_TABLE_PTG_NADIR_TGT.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_PTG_NADIR_TGT.first, &EIVE_TABLE_PTG_NADIR_TGT.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_NADIR transition 0
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_PTG_NADIR_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_NADIR, 0, EIVE_TABLE_PTG_NADIR_TRANS_0.second);
|
|
|
|
|
check(ss.addTable(
|
|
|
|
|
TableEntry(EIVE_TABLE_PTG_NADIR_TRANS_0.first, &EIVE_TABLE_PTG_NADIR_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_NADIR sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_NADIR.second, EIVE_TABLE_PTG_NADIR_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_NADIR.second, EIVE_TABLE_PTG_NADIR_TRANS_0.first, 0, false);
|
|
|
|
|
check(ss.addSequence(SequenceEntry(EIVE_SEQUENCE_PTG_NADIR.first, &EIVE_SEQUENCE_PTG_NADIR.second,
|
|
|
|
|
EIVE_SEQUENCE_IDLE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildPtgTargetSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildPtgTargetSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_TARGET, 0, EIVE_TABLE_PTG_TARGET_TGT.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_PTG_TARGET_TGT.first, &EIVE_TABLE_PTG_TARGET_TGT.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_TARGET transition 0
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_PTG_TARGET_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_TARGET, 0, EIVE_TABLE_PTG_TARGET_TRANS_0.second);
|
|
|
|
|
check(ss.addTable(
|
|
|
|
|
TableEntry(EIVE_TABLE_PTG_TARGET_TRANS_0.first, &EIVE_TABLE_PTG_TARGET_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_TARGET sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_TARGET.second, EIVE_TABLE_PTG_TARGET_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_TARGET.second, EIVE_TABLE_PTG_TARGET_TRANS_0.first, 0, false);
|
|
|
|
|
check(ss.addSequence(SequenceEntry(EIVE_SEQUENCE_PTG_TARGET.first,
|
|
|
|
|
&EIVE_SEQUENCE_PTG_TARGET.second, EIVE_SEQUENCE_IDLE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildPtgTargetGsSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildPtgTargetGsSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_TARGET_GS, 0, EIVE_TABLE_PTG_TARGET_GS_TGT.second);
|
|
|
|
|
check(ss.addTable(
|
|
|
|
|
TableEntry(EIVE_TABLE_PTG_TARGET_GS_TGT.first, &EIVE_TABLE_PTG_TARGET_GS_TGT.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_TARGET_GS transition 0
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_PTG_TARGET_GS_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_TARGET_GS, 0,
|
|
|
|
|
EIVE_TABLE_PTG_TARGET_GS_TRANS_0.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_PTG_TARGET_GS_TRANS_0.first,
|
|
|
|
|
&EIVE_TABLE_PTG_TARGET_GS_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_TARGET_GS sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_TARGET_GS.second, EIVE_TABLE_PTG_TARGET_GS_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_TARGET_GS.second, EIVE_TABLE_PTG_TARGET_GS_TRANS_0.first, 0, false);
|
|
|
|
|
check(
|
|
|
|
|
ss.addSequence(SequenceEntry(EIVE_SEQUENCE_PTG_TARGET_GS.first,
|
|
|
|
|
&EIVE_SEQUENCE_PTG_TARGET_GS.second, EIVE_SEQUENCE_IDLE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void buildPtgInertialSequence(Subsystem& ss, ModeListEntry& eh) {
|
|
|
|
|
std::string context = "satsystem::buildPtgInertialSequence";
|
|
|
|
|
auto ctxc = context.c_str();
|
|
|
|
|
// Insert Helper Table
|
|
|
|
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode, ArrayList<ModeListEntry>& table) {
|
|
|
|
|
eh.setObject(obj);
|
|
|
|
|
eh.setMode(mode);
|
|
|
|
|
eh.setSubmode(submode);
|
|
|
|
|
check(table.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
// Insert Helper Sequence
|
|
|
|
|
auto ihs = [&](ArrayList<ModeListEntry>& sequence, Mode_t tableId, uint32_t waitSeconds,
|
|
|
|
|
bool checkSuccess) {
|
|
|
|
|
eh.setTableId(tableId);
|
|
|
|
|
eh.setWaitSeconds(waitSeconds);
|
|
|
|
|
eh.setCheckSuccess(checkSuccess);
|
|
|
|
|
check(sequence.insert(eh), ctxc);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_INERTIAL, 0, EIVE_TABLE_PTG_INERTIAL_TGT.second);
|
|
|
|
|
check(ss.addTable(
|
|
|
|
|
TableEntry(EIVE_TABLE_PTG_INERTIAL_TGT.first, &EIVE_TABLE_PTG_INERTIAL_TGT.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_INERTIAL transition 0
|
|
|
|
|
iht(objects::TCS_SUBSYSTEM, NML, 0, EIVE_TABLE_PTG_INERTIAL_TRANS_0.second);
|
|
|
|
|
iht(objects::ACS_SUBSYSTEM, acs::AcsMode::PTG_INERTIAL, 0,
|
|
|
|
|
EIVE_TABLE_PTG_INERTIAL_TRANS_0.second);
|
|
|
|
|
check(ss.addTable(TableEntry(EIVE_TABLE_PTG_INERTIAL_TRANS_0.first,
|
|
|
|
|
&EIVE_TABLE_PTG_INERTIAL_TRANS_0.second)),
|
|
|
|
|
ctxc);
|
|
|
|
|
|
|
|
|
|
// Build PTG_INERTIAL sequence
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_INERTIAL.second, EIVE_TABLE_PTG_INERTIAL_TGT.first, 0, false);
|
|
|
|
|
ihs(EIVE_SEQUENCE_PTG_INERTIAL.second, EIVE_TABLE_PTG_INERTIAL_TRANS_0.first, 0, false);
|
|
|
|
|
check(ss.addSequence(SequenceEntry(EIVE_SEQUENCE_PTG_INERTIAL.first,
|
|
|
|
|
&EIVE_SEQUENCE_PTG_INERTIAL.second, EIVE_SEQUENCE_IDLE.first)),
|
|
|
|
|
ctxc);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|