v1.16.0 #323
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit d61fe7db93b37dd6652dbfee5b7c93f400ac5a11
|
Subproject commit 1c4ea6dd0dbc6e93086c28d8e0ce3bed5be0c73c
|
@ -36,25 +36,41 @@ auto PL_TABLE_MPSOC_STREAM_TGT =
|
|||||||
auto PL_TABLE_MPSOC_STREAM_TRANS_0 =
|
auto PL_TABLE_MPSOC_STREAM_TRANS_0 =
|
||||||
std::make_pair((payload::Modes::MPSOC_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 3>());
|
std::make_pair((payload::Modes::MPSOC_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 3>());
|
||||||
auto PL_TABLE_MPSOC_STREAM_TRANS_1 =
|
auto PL_TABLE_MPSOC_STREAM_TRANS_1 =
|
||||||
std::make_pair((payload::Modes::MPSOC_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 1>());
|
std::make_pair((payload::Modes::MPSOC_STREAM << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
auto PL_SEQUENCE_CAM_STREAM =
|
auto PL_SEQUENCE_CAM_STREAM =
|
||||||
std::make_pair(payload::Modes::CAM_STREAM << 24, FixedArrayList<ModeListEntry, 2>());
|
std::make_pair(payload::Modes::CAM_STREAM << 24, FixedArrayList<ModeListEntry, 2>());
|
||||||
auto PL_TABLE_CAM_STREAM_TGT =
|
auto PL_TABLE_CAM_STREAM_TGT =
|
||||||
std::make_pair((payload::Modes::CAM_STREAM << 24) | 1, FixedArrayList<ModeListEntry, 1>());
|
std::make_pair((payload::Modes::CAM_STREAM << 24) | 1, FixedArrayList<ModeListEntry, 2>());
|
||||||
auto PL_TABLE_CAM_STREAM_TRANS_0 =
|
auto PL_TABLE_CAM_STREAM_TRANS_0 =
|
||||||
std::make_pair((payload::Modes::CAM_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 3>());
|
|
||||||
auto PL_TABLE_CAM_STREAM_TRANS_1 =
|
|
||||||
std::make_pair((payload::Modes::CAM_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 1>());
|
std::make_pair((payload::Modes::CAM_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
auto PL_TABLE_CAM_STREAM_TRANS_1 =
|
||||||
|
std::make_pair((payload::Modes::CAM_STREAM << 24) | 3, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
auto PL_SEQUENCE_SUPV_ONLY =
|
auto PL_SEQUENCE_SUPV_ONLY =
|
||||||
std::make_pair(payload::Modes::CAM_STREAM << 24, FixedArrayList<ModeListEntry, 2>());
|
std::make_pair(payload::Modes::SUPV_ONLY << 24, FixedArrayList<ModeListEntry, 2>());
|
||||||
auto PL_TABLE_SUPV_ONLY_TGT =
|
auto PL_TABLE_SUPV_ONLY_TGT =
|
||||||
std::make_pair((payload::Modes::CAM_STREAM << 24) | 1, FixedArrayList<ModeListEntry, 5>());
|
std::make_pair((payload::Modes::SUPV_ONLY << 24) | 1, FixedArrayList<ModeListEntry, 5>());
|
||||||
auto PL_TABLE_SUPV_ONLY_TRANS_0 =
|
auto PL_TABLE_SUPV_ONLY_TRANS_0 =
|
||||||
std::make_pair((payload::Modes::CAM_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
std::make_pair((payload::Modes::SUPV_ONLY << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
||||||
auto PL_TABLE_SUPV_ONLY_TRANS_1 =
|
auto PL_TABLE_SUPV_ONLY_TRANS_1 =
|
||||||
std::make_pair((payload::Modes::CAM_STREAM << 24) | 2, FixedArrayList<ModeListEntry, 5>());
|
std::make_pair((payload::Modes::SUPV_ONLY << 24) | 3, FixedArrayList<ModeListEntry, 5>());
|
||||||
|
|
||||||
|
auto PL_SEQUENCE_EARTH_OBSV =
|
||||||
|
std::make_pair(payload::Modes::EARTH_OBSV << 24, FixedArrayList<ModeListEntry, 2>());
|
||||||
|
auto PL_TABLE_EARTH_OBSV_TGT =
|
||||||
|
std::make_pair((payload::Modes::EARTH_OBSV << 24) | 1, FixedArrayList<ModeListEntry, 4>());
|
||||||
|
auto PL_TABLE_EARTH_OBSV_TRANS_0 =
|
||||||
|
std::make_pair((payload::Modes::EARTH_OBSV << 24) | 2, FixedArrayList<ModeListEntry, 3>());
|
||||||
|
auto PL_TABLE_EARTH_OBSV_TRANS_1 =
|
||||||
|
std::make_pair((payload::Modes::EARTH_OBSV << 24) | 3, FixedArrayList<ModeListEntry, 2>());
|
||||||
|
|
||||||
|
auto PL_SEQUENCE_SCEX =
|
||||||
|
std::make_pair(payload::Modes::SCEX << 24, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
auto PL_TABLE_SCEX_TGT =
|
||||||
|
std::make_pair((payload::Modes::SCEX << 24) | 1, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
auto PL_TABLE_SCEX_TRANS_0 =
|
||||||
|
std::make_pair((payload::Modes::SCEX << 24) | 2, FixedArrayList<ModeListEntry, 1>());
|
||||||
|
|
||||||
void satsystem::pl::init() {
|
void satsystem::pl::init() {
|
||||||
ModeListEntry entry;
|
ModeListEntry entry;
|
||||||
@ -226,21 +242,102 @@ void initPlSpvSequence(Subsystem* ss, ModeListEntry& eh) {
|
|||||||
// Build Payload Supervisor Only target
|
// Build Payload Supervisor Only target
|
||||||
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_SUPV_ONLY_TGT.second);
|
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_SUPV_ONLY_TGT.second);
|
||||||
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::SUPV_ONLY, PL_TABLE_SUPV_ONLY_TGT.second);
|
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::SUPV_ONLY, PL_TABLE_SUPV_ONLY_TGT.second);
|
||||||
ss->addTable(&PL_TABLE_SUPV_ONLY_TGT.second, PL_TABLE_SUPV_ONLY_TGT.first, false, true);
|
ss->addTable(TableEntry(PL_TABLE_SUPV_ONLY_TGT.first, &PL_TABLE_SUPV_ONLY_TGT.second));
|
||||||
|
|
||||||
// Build Payload Supervisor Only transition 0
|
// Build Payload Supervisor Only transition 0
|
||||||
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_SUPV_ONLY_TRANS_0.second);
|
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_SUPV_ONLY_TRANS_0.second);
|
||||||
ss->addTable(&PL_TABLE_SUPV_ONLY_TRANS_0.second, PL_TABLE_SUPV_ONLY_TRANS_0.first, inStore,
|
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_SUPV_ONLY_TRANS_0.second);
|
||||||
preInit)
|
ss->addTable(TableEntry(PL_TABLE_SUPV_ONLY_TRANS_0.first, &PL_TABLE_SUPV_ONLY_TRANS_0.second));
|
||||||
|
|
||||||
// Build Payload Supervisor Only transition 1
|
// Build Payload Supervisor Only transition 1
|
||||||
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::SUPV_ONLY,
|
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::SUPV_ONLY, PL_TABLE_SUPV_ONLY_TRANS_1.second);
|
||||||
PL_TABLE_SUPV_ONLY_TRANS_1.second);
|
|
||||||
|
// Build Payload Supervisor Only Sequence
|
||||||
|
ihs(PL_SEQUENCE_SUPV_ONLY.second, PL_TABLE_SUPV_ONLY_TGT.first, 0, true);
|
||||||
|
ihs(PL_SEQUENCE_SUPV_ONLY.second, PL_TABLE_SUPV_ONLY_TRANS_0.first, 0, true);
|
||||||
|
ihs(PL_SEQUENCE_SUPV_ONLY.second, PL_TABLE_SUPV_ONLY_TRANS_1.first, 0, false);
|
||||||
|
ss->addSequence(SequenceEntry(PL_SEQUENCE_SUPV_ONLY.first, &PL_SEQUENCE_SUPV_ONLY.second,
|
||||||
|
PL_SEQUENCE_OFF.first));
|
||||||
}
|
}
|
||||||
|
|
||||||
void initEarthObsvSequence(Subsystem* ss, ModeListEntry& eh) {}
|
void initEarthObsvSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::payload::initEarthObsvSequence";
|
||||||
|
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);
|
||||||
|
};
|
||||||
|
|
||||||
void initScexSequence(Subsystem* ss, ModeListEntry& eh) {}
|
// Build Earth Observation target
|
||||||
|
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_EARTH_OBSV_TGT.second);
|
||||||
|
iht(objects::CAM_SWITCHER, ON, 0, PL_TABLE_EARTH_OBSV_TGT.second);
|
||||||
|
iht(objects::PLPCDU_HANDLER, OFF, 0, PL_TABLE_EARTH_OBSV_TGT.second);
|
||||||
|
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::MPSOC_ON, PL_TABLE_EARTH_OBSV_TGT.second);
|
||||||
|
ss->addTable(TableEntry(PL_TABLE_EARTH_OBSV_TGT.first, &PL_TABLE_EARTH_OBSV_TGT.second));
|
||||||
|
|
||||||
|
// Build Earth Observation transition 0
|
||||||
|
iht(objects::PLOC_SWITCHER, ON, 0, PL_TABLE_EARTH_OBSV_TRANS_0.second);
|
||||||
|
iht(objects::CAM_SWITCHER, ON, 0, PL_TABLE_EARTH_OBSV_TRANS_0.second);
|
||||||
|
iht(objects::PLPCDU_HANDLER, OFF, 0, PL_TABLE_EARTH_OBSV_TRANS_0.second);
|
||||||
|
ss->addTable(TableEntry(PL_TABLE_EARTH_OBSV_TRANS_0.first, &PL_TABLE_EARTH_OBSV_TRANS_0.second));
|
||||||
|
|
||||||
|
// Build Earth Observation transition 1
|
||||||
|
iht(objects::PLOC_SUBSYSTEM, NML, payload::ploc::MPSOC_ON, PL_TABLE_EARTH_OBSV_TRANS_1.second);
|
||||||
|
ss->addTable(TableEntry(PL_TABLE_EARTH_OBSV_TRANS_1.first, &PL_TABLE_EARTH_OBSV_TRANS_1.second));
|
||||||
|
|
||||||
|
ihs(PL_SEQUENCE_EARTH_OBSV.second, PL_TABLE_EARTH_OBSV_TGT.first, 0, true);
|
||||||
|
ihs(PL_SEQUENCE_EARTH_OBSV.second, PL_TABLE_EARTH_OBSV_TRANS_0.first, 0, true);
|
||||||
|
ihs(PL_SEQUENCE_EARTH_OBSV.second, PL_TABLE_EARTH_OBSV_TRANS_1.first, 0, false);
|
||||||
|
ss->addSequence(SequenceEntry(PL_SEQUENCE_EARTH_OBSV.first, &PL_SEQUENCE_EARTH_OBSV.second,
|
||||||
|
PL_SEQUENCE_OFF.first));
|
||||||
|
}
|
||||||
|
|
||||||
|
void initScexSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||||
|
std::string context = "satsystem::payload::initScexSequence";
|
||||||
|
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 SCEX target
|
||||||
|
iht(objects::SCEX_HANDLER, NML, 0, PL_TABLE_SCEX_TGT.second);
|
||||||
|
ss->addTable(TableEntry(PL_TABLE_EARTH_OBSV_TGT.first, &PL_TABLE_EARTH_OBSV_TGT.second));
|
||||||
|
|
||||||
|
// Build SCEX transition 0
|
||||||
|
iht(objects::SCEX_HANDLER, NML, 0, PL_TABLE_SCEX_TGT.second);
|
||||||
|
ss->addTable(TableEntry(PL_TABLE_SCEX_TRANS_0.first, &PL_TABLE_SCEX_TRANS_0.second));
|
||||||
|
|
||||||
|
// Build SCEX sequence
|
||||||
|
ihs(PL_SEQUENCE_SCEX.second, PL_TABLE_SCEX_TGT.first, 0, true);
|
||||||
|
ihs(PL_SEQUENCE_SCEX.second, PL_TABLE_SCEX_TRANS_0.first, 0, false);
|
||||||
|
ss->addSequence(
|
||||||
|
SequenceEntry(PL_SEQUENCE_SCEX.first, &PL_SEQUENCE_SCEX.second, PL_SEQUENCE_OFF.first));
|
||||||
|
}
|
||||||
|
|
||||||
void checkInsert(ReturnValue_t result, const char* ctx) {
|
void 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