v1.16.0 #323
@ -20,100 +20,284 @@ auto ACS_TABLE_OFF_TRANS =
|
|||||||
std::make_pair((acs::CtrlModes::OFF << 8) | 2, FixedArrayList<ModeListEntry, 6>());
|
std::make_pair((acs::CtrlModes::OFF << 8) | 2, FixedArrayList<ModeListEntry, 6>());
|
||||||
|
|
||||||
auto ACS_SEQUENCE_DETUMBLE =
|
auto ACS_SEQUENCE_DETUMBLE =
|
||||||
std::make_pair(acs::CtrlModes::DETUMBLE, FixedArrayList<ModeListEntry, 2>());
|
std::make_pair(acs::CtrlModes::DETUMBLE, FixedArrayList<ModeListEntry, 3>());
|
||||||
auto ACS_TABLE_DETUMBLE_TGT =
|
auto ACS_TABLE_DETUMBLE_TGT =
|
||||||
std::make_pair((acs::CtrlModes::DETUMBLE << 8) | 1, FixedArrayList<ModeListEntry, 3>());
|
std::make_pair((acs::CtrlModes::DETUMBLE << 8) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||||
auto ACS_TABLE_DETUMBLE_TRANS_0 =
|
auto ACS_TABLE_DETUMBLE_TRANS_0 =
|
||||||
std::make_pair((acs::CtrlModes::DETUMBLE << 8) | 2, FixedArrayList<ModeListEntry, 5>());
|
std::make_pair((acs::CtrlModes::DETUMBLE << 8) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
auto ACS_TABLE_DETUMBLE_TRANS_1 =
|
auto ACS_TABLE_DETUMBLE_TRANS_1 =
|
||||||
std::make_pair((acs::CtrlModes::DETUMBLE << 8) | 3, FixedArrayList<ModeListEntry, 1>());
|
std::make_pair((acs::CtrlModes::DETUMBLE << 8) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_SAFE =
|
||||||
|
std::make_pair(acs::CtrlModes::SAFE, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_SAFE_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::SAFE << 8) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||||
|
auto ACS_TABLE_SAFE_TRANS_0 =
|
||||||
|
std::make_pair((acs::CtrlModes::SAFE << 8) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_SAFE_TRANS_1 =
|
||||||
|
std::make_pair((acs::CtrlModes::SAFE << 8) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_IDLE =
|
||||||
|
std::make_pair(acs::CtrlModes::IDLE, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_IDLE_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::IDLE << 8) | 1, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_IDLE_TRANS_0 =
|
||||||
|
std::make_pair((acs::CtrlModes::IDLE << 8) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_IDLE_TRANS_1 =
|
||||||
|
std::make_pair((acs::CtrlModes::IDLE << 8) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
auto ACS_SEQUENCE_TARGET_PT =
|
||||||
|
std::make_pair(acs::CtrlModes::TARGET_PT, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto ACS_TABLE_TARGET_PT_TGT =
|
||||||
|
std::make_pair((acs::CtrlModes::TARGET_PT << 8) | 1, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_TARGET_PT_TRANS_0 =
|
||||||
|
std::make_pair((acs::CtrlModes::TARGET_PT << 8) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
auto ACS_TABLE_TARGET_PT_TRANS_1 =
|
||||||
|
std::make_pair((acs::CtrlModes::TARGET_PT << 8) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
|
enum InsertType {
|
||||||
|
TABLE,
|
||||||
|
SEQ
|
||||||
|
};
|
||||||
|
|
||||||
void satsystem::acsSubsystemInit() {
|
void satsystem::acsSubsystemInit() {
|
||||||
ModeListEntry entry;
|
ModeListEntry entry;
|
||||||
Subsystem* acsSubsystem = new Subsystem(objects::ACS_SUBSYSTEM, objects::EIVE_SYSTEM, 20, 20);
|
Subsystem* acsSubsystem = new Subsystem(objects::ACS_SUBSYSTEM, objects::EIVE_SYSTEM, 20, 20);
|
||||||
buildOffSequence(acsSubsystem, entry);
|
buildOffSequence(acsSubsystem, entry);
|
||||||
|
buildSafeSequence(acsSubsystem, entry);
|
||||||
buildDetumbleSequence(acsSubsystem, entry);
|
buildDetumbleSequence(acsSubsystem, entry);
|
||||||
|
buildIdleSequence(acsSubsystem, entry);
|
||||||
|
buildTargetPtSequence(acsSubsystem, entry);
|
||||||
acsSubsystem->setInitialMode(HasModesIF::MODE_OFF);
|
acsSubsystem->setInitialMode(HasModesIF::MODE_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void satsystem::buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
void satsystem::buildOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
std::string context = "satsystem::buildOffSequence";
|
std::string context = "satsystem::buildOffSequence";
|
||||||
auto ctxc = context.c_str();
|
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);
|
||||||
|
CHK(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);
|
||||||
|
CHK(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
|
||||||
auto ih = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
// OFF Target table is empty
|
||||||
|
ss->addTable(&ACS_TABLE_OFF_TGT.second, ACS_TABLE_OFF_TGT.first, false, true);
|
||||||
|
|
||||||
|
// Build OFF transition
|
||||||
|
iht(objects::ACS_CONTROLLER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
||||||
|
ss->addTable(&ACS_TABLE_OFF_TRANS.second, ACS_TABLE_OFF_TRANS.first, false, true);
|
||||||
|
|
||||||
|
// Build OFF sequence
|
||||||
|
ihs(ACS_SEQUENCE_OFF.second, ACS_TABLE_OFF_TGT.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_OFF.second, ACS_TABLE_OFF_TRANS.first, 0, false);
|
||||||
|
ss->addSequence(&ACS_SEQUENCE_OFF.second, ACS_SEQUENCE_OFF.first, ACS_SEQUENCE_OFF.first, false,
|
||||||
|
true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void satsystem::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>& sequence) {
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
eh.setObject(obj);
|
eh.setObject(obj);
|
||||||
eh.setMode(mode);
|
eh.setMode(mode);
|
||||||
eh.setSubmode(submode);
|
eh.setSubmode(submode);
|
||||||
CHK(sequence.insert(eh), ctxc);
|
CHK(sequence.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);
|
||||||
|
CHK(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Build SAFE target
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::SAFE, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
|
ss->addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_OFF_TGT.first, false, true);
|
||||||
|
|
||||||
// Build OFF transition
|
// Build SAFE transition 0
|
||||||
ih(objects::ACS_CONTROLLER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
ih(objects::IMTQ_HANDLER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
ih(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
ih(objects::ACS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
ih(objects::SUS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
ih(objects::RW_ASS, OFF, 0, ACS_TABLE_OFF_TRANS.second);
|
ss->addTable(&ACS_TABLE_SAFE_TRANS_0.second, ACS_TABLE_SAFE_TRANS_0.first, false, true);
|
||||||
|
|
||||||
// Build OFF sequence
|
// Build SAFE transition 1
|
||||||
eh.setTableId(ACS_TABLE_OFF_TGT.first);
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::SAFE, 0, ACS_TABLE_SAFE_TRANS_1.second);
|
||||||
eh.setWaitSeconds(0);
|
ss->addTable(&ACS_TABLE_SAFE_TRANS_1.second, ACS_TABLE_SAFE_TRANS_1.first, false, true);
|
||||||
eh.setCheckSuccess(false);
|
|
||||||
CHK(ACS_SEQUENCE_OFF.second.insert(eh), ctxc);
|
|
||||||
|
|
||||||
eh.setTableId(ACS_TABLE_OFF_TRANS.first);
|
// Build SAFE sequence
|
||||||
eh.setWaitSeconds(0);
|
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TGT.first, 0, false);
|
||||||
eh.setCheckSuccess(false);
|
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TRANS_0.first, 0, false);
|
||||||
CHK(ACS_SEQUENCE_OFF.second.insert(eh), ctxc);
|
ihs(ACS_SEQUENCE_SAFE.second, ACS_TABLE_SAFE_TRANS_1.first, 0, false);
|
||||||
|
ss->addSequence(&ACS_SEQUENCE_SAFE.second, ACS_SEQUENCE_SAFE.first, ACS_SEQUENCE_OFF.first, false,
|
||||||
// Build OFF target
|
|
||||||
ss->addTable(&ACS_TABLE_OFF_TGT.second, ACS_TABLE_OFF_TGT.first, false, true);
|
|
||||||
ss->addTable(&ACS_TABLE_OFF_TRANS.second, ACS_TABLE_OFF_TRANS.first, false, true);
|
|
||||||
ss->addSequence(&ACS_SEQUENCE_OFF.second, ACS_SEQUENCE_OFF.first, ACS_SEQUENCE_OFF.first, false,
|
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void satsystem::buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
void satsystem::buildDetumbleSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
std::string context = "satsystem::buildDetumbleSequence";
|
std::string context = "satsystem::buildDetumbleSequence";
|
||||||
auto ctxc = context.c_str();
|
auto ctxc = context.c_str();
|
||||||
auto ih = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||||
ArrayList<ModeListEntry>& sequence) {
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
eh.setObject(obj);
|
eh.setObject(obj);
|
||||||
eh.setMode(mode);
|
eh.setMode(mode);
|
||||||
eh.setSubmode(submode);
|
eh.setSubmode(submode);
|
||||||
CHK(sequence.insert(eh), ctxc);
|
CHK(sequence.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);
|
||||||
|
CHK(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
// Build DETUMBLE target
|
// Build DETUMBLE target
|
||||||
ih(objects::ACS_CONTROLLER, acs::CtrlModes::DETUMBLE, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::DETUMBLE, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
ih(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
ih(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
ih(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TGT.second);
|
||||||
|
|
||||||
ss->addTable(&ACS_TABLE_DETUMBLE_TGT.second, ACS_TABLE_DETUMBLE_TGT.first, false, true);
|
ss->addTable(&ACS_TABLE_DETUMBLE_TGT.second, ACS_TABLE_DETUMBLE_TGT.first, false, true);
|
||||||
|
|
||||||
// Build DETUMBLE transition 0
|
// Build DETUMBLE transition 0
|
||||||
ih(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
ih(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
ih(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
ih(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
ih(objects::RW_ASS, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
iht(objects::RW_ASS, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
ss->addTable(&ACS_TABLE_DETUMBLE_TRANS_0.second, ACS_TABLE_DETUMBLE_TRANS_0.first, false, true);
|
||||||
|
|
||||||
// Build DETUMBLE transition 1
|
// Build DETUMBLE transition 1
|
||||||
ih(objects::ACS_CONTROLLER, acs::CtrlModes::DETUMBLE, 0, ACS_TABLE_DETUMBLE_TRANS_1.second);
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::DETUMBLE, 0, ACS_TABLE_DETUMBLE_TRANS_1.second);
|
||||||
|
|
||||||
// Build full sequence
|
|
||||||
ss->addTable(&ACS_TABLE_DETUMBLE_TRANS_0.second, ACS_TABLE_DETUMBLE_TRANS_0.first, false, true);
|
|
||||||
ss->addTable(&ACS_TABLE_DETUMBLE_TRANS_1.second, ACS_TABLE_DETUMBLE_TRANS_1.first, false, true);
|
ss->addTable(&ACS_TABLE_DETUMBLE_TRANS_1.second, ACS_TABLE_DETUMBLE_TRANS_1.first, false, true);
|
||||||
|
|
||||||
|
// Build DETUMBLE sequence
|
||||||
|
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TGT.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_0.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_DETUMBLE.second, ACS_TABLE_DETUMBLE_TRANS_1.first, 0, false);
|
||||||
ss->addSequence(&ACS_SEQUENCE_DETUMBLE.second, ACS_SEQUENCE_DETUMBLE.first,
|
ss->addSequence(&ACS_SEQUENCE_DETUMBLE.second, ACS_SEQUENCE_DETUMBLE.first,
|
||||||
ACS_SEQUENCE_DETUMBLE.first, false, true);
|
ACS_SEQUENCE_DETUMBLE.first, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void satsystem::buildSafeSequence(Subsystem* ss, ModeListEntry& eh) {}
|
|
||||||
|
|
||||||
void satsystem::buildIdleSequence(Subsystem* ss, ModeListEntry& eh) {}
|
void satsystem::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>& sequence) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
CHK(sequence.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);
|
||||||
|
CHK(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
// Build IDLE target
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::IDLE, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
|
ss->addTable(&ACS_TABLE_IDLE_TGT.second, ACS_TABLE_IDLE_TGT.first, false, true);
|
||||||
|
|
||||||
void satsystem::buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {}
|
// Build IDLE transition 0
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
iht(objects::STAR_TRACKER, OFF, 0, ACS_TABLE_DETUMBLE_TRANS_0.second);
|
||||||
|
ss->addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true);
|
||||||
|
|
||||||
|
// Build IDLE transition 1
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::IDLE, 0, ACS_TABLE_DETUMBLE_TRANS_1.second);
|
||||||
|
ss->addTable(&ACS_TABLE_IDLE_TRANS_1.second, ACS_TABLE_IDLE_TRANS_1.first, false, true);
|
||||||
|
|
||||||
|
// Build IDLE sequence
|
||||||
|
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TGT.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TRANS_0.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_IDLE.second, ACS_TABLE_IDLE_TRANS_1.first, 0, false);
|
||||||
|
ss->addSequence(&ACS_SEQUENCE_IDLE.second, ACS_SEQUENCE_IDLE.first,
|
||||||
|
ACS_SEQUENCE_IDLE.first, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void satsystem::buildTargetPtSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::buildTargetPtSequence";
|
||||||
|
auto ctxc = context.c_str();
|
||||||
|
// Insert Helper Table
|
||||||
|
auto iht = [&](object_id_t obj, Mode_t mode, Submode_t submode,
|
||||||
|
ArrayList<ModeListEntry>& sequence) {
|
||||||
|
eh.setObject(obj);
|
||||||
|
eh.setMode(mode);
|
||||||
|
eh.setSubmode(submode);
|
||||||
|
CHK(sequence.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);
|
||||||
|
CHK(sequence.insert(eh), ctxc);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Build TARGET PT table
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::TARGET_PT, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_TARGET_PT_TGT.second);
|
||||||
|
ss->addTable(&ACS_TABLE_TARGET_PT_TGT.second, ACS_TABLE_TARGET_PT_TGT.first, false, true);
|
||||||
|
|
||||||
|
// Build TARGET PT transition 0
|
||||||
|
iht(objects::IMTQ_HANDLER, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::RW_ASS, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
iht(objects::STAR_TRACKER, NML, 0, ACS_TABLE_TARGET_PT_TRANS_0.second);
|
||||||
|
ss->addTable(&ACS_TABLE_TARGET_PT_TRANS_0.second, ACS_TABLE_TARGET_PT_TRANS_0.first, false, true);
|
||||||
|
|
||||||
|
// Build TARGET PT transition 1
|
||||||
|
iht(objects::ACS_CONTROLLER, acs::CtrlModes::TARGET_PT, 0, ACS_TABLE_TARGET_PT_TRANS_1.second);
|
||||||
|
ss->addTable(&ACS_TABLE_TARGET_PT_TRANS_1.second, ACS_TABLE_TARGET_PT_TRANS_1.first, false, true);
|
||||||
|
|
||||||
|
// Build IDLE sequence
|
||||||
|
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TGT.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TRANS_0.first, 0, false);
|
||||||
|
ihs(ACS_SEQUENCE_TARGET_PT.second, ACS_TABLE_TARGET_PT_TRANS_1.first, 0, false);
|
||||||
|
ss->addSequence(&ACS_SEQUENCE_TARGET_PT.second, ACS_SEQUENCE_TARGET_PT.first,
|
||||||
|
ACS_SEQUENCE_TARGET_PT.first, false, true);
|
||||||
|
}
|
||||||
|
|
||||||
void satsystem::checkInsert(ReturnValue_t result, const char* ctx) {
|
void satsystem::checkInsert(ReturnValue_t result, const char* ctx) {
|
||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
Loading…
Reference in New Issue
Block a user