connect payload children to subsystem
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
f90120191f
commit
d690a54005
@ -1,5 +1,6 @@
|
||||
#include "ObjectFactory.h"
|
||||
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
#include <mission/system/objects/CamSwitcher.h>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
@ -47,6 +48,7 @@
|
||||
#include "mission/system/objects/RwAssembly.h"
|
||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||
#include "mission/system/tree/acsModeTree.h"
|
||||
#include "mission/system/tree/payloadModeTree.h"
|
||||
#include "tmtc/pusIds.h"
|
||||
#if OBSW_TEST_LIBGPIOD == 1
|
||||
#include "linux/boardtest/LibgpiodTest.h"
|
||||
@ -588,7 +590,10 @@ void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitch) {
|
||||
using namespace gpio;
|
||||
std::stringstream consumer;
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
auto* camSwitcher =
|
||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
|
||||
camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||
// camSwitcher->
|
||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
|
||||
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,
|
||||
@ -601,9 +606,10 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
||||
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||
mpsocCookie->setNoFixedSizeReply();
|
||||
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
|
||||
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie,
|
||||
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF),
|
||||
objects::PLOC_SUPERVISOR_HANDLER);
|
||||
auto* mpsocHandler = new PlocMPSoCHandler(
|
||||
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie, plocMpsocHelper,
|
||||
Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF), objects::PLOC_SUPERVISOR_HANDLER);
|
||||
mpsocHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||
consumer << "0x" << std::hex << objects::PLOC_SUPERVISOR_HANDLER;
|
||||
@ -617,9 +623,10 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
||||
uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||
supervisorCookie->setNoFixedSizeReply();
|
||||
auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
|
||||
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
|
||||
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||
pcdu::PDU1_CH6_PLOC_12V, supvHelper);
|
||||
auto* supvHandler = new PlocSupervisorHandler(
|
||||
objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF, supervisorCookie,
|
||||
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF), pcdu::PDU1_CH6_PLOC_12V, supvHelper);
|
||||
supvHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||
static_cast<void>(consumer);
|
||||
}
|
||||
@ -880,6 +887,7 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
|
||||
plPcduHandler->setToGoToNormalModeImmediately(true);
|
||||
plPcduHandler->enablePeriodicPrintout(true, 10);
|
||||
#endif
|
||||
plPcduHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||
}
|
||||
|
||||
void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 530a261e142ae4ab2c7726303e4d571d03200e47
|
||||
Subproject commit 177c39dd53198a1b05e2f40fc3c5e88e7f7c2e0b
|
@ -27,6 +27,7 @@
|
||||
#include "mission/system/objects/SusAssembly.h"
|
||||
#include "mission/system/objects/TcsBoardAssembly.h"
|
||||
#include "mission/system/tree/acsModeTree.h"
|
||||
#include "mission/system/tree/payloadModeTree.h"
|
||||
|
||||
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
PowerSwitchIF* pwrSwitcher, std::string spiDev) {
|
||||
@ -336,6 +337,7 @@ void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwr
|
||||
if (switchId) {
|
||||
scexHandler->setPowerSwitcher(*pwrSwitcher, switchId.value());
|
||||
}
|
||||
scexHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||
}
|
||||
|
||||
void ObjectFactory::createThermalController() {
|
||||
|
@ -12,14 +12,16 @@
|
||||
#include "util.h"
|
||||
|
||||
namespace {
|
||||
void initOffSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void initPlMpsocStreamSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void initPlCamStreamSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void initPlSpvSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void initEarthObsvSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void initScexSequence(Subsystem* ss, ModeListEntry& eh);
|
||||
void initOffSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
void initPlMpsocStreamSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
void initPlCamStreamSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
void initPlSpvSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
void initEarthObsvSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
void initScexSequence(Subsystem& ss, ModeListEntry& eh);
|
||||
} // namespace
|
||||
|
||||
Subsystem satsystem::pl::SUBSYSTEM = Subsystem(objects::PL_SUBSYSTEM, 12, 24);
|
||||
|
||||
const auto check = subsystem::checkInsert;
|
||||
static const auto OFF = HasModesIF::MODE_OFF;
|
||||
static const auto ON = HasModesIF::MODE_ON;
|
||||
@ -75,19 +77,18 @@ auto PL_TABLE_SCEX_TRANS_0 =
|
||||
|
||||
void satsystem::pl::init() {
|
||||
ModeListEntry entry;
|
||||
Subsystem* plSubsystem = new Subsystem(objects::PL_SUBSYSTEM, 12, 24);
|
||||
initOffSequence(plSubsystem, entry);
|
||||
initPlMpsocStreamSequence(plSubsystem, entry);
|
||||
initPlCamStreamSequence(plSubsystem, entry);
|
||||
initPlSpvSequence(plSubsystem, entry);
|
||||
initEarthObsvSequence(plSubsystem, entry);
|
||||
initScexSequence(plSubsystem, entry);
|
||||
plSubsystem->setInitialMode(OFF);
|
||||
initOffSequence(SUBSYSTEM, entry);
|
||||
initPlMpsocStreamSequence(SUBSYSTEM, entry);
|
||||
initPlCamStreamSequence(SUBSYSTEM, entry);
|
||||
initPlSpvSequence(SUBSYSTEM, entry);
|
||||
initEarthObsvSequence(SUBSYSTEM, entry);
|
||||
initScexSequence(SUBSYSTEM, entry);
|
||||
SUBSYSTEM.setInitialMode(OFF);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void initOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void initOffSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::payload::buildOffSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -108,29 +109,29 @@ void initOffSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
};
|
||||
|
||||
// Build OFF target. Is empty
|
||||
check(ss->addTable(TableEntry(PL_TABLE_OFF_TGT.first, &PL_TABLE_OFF_TGT.second)), ctxc);
|
||||
check(ss.addTable(TableEntry(PL_TABLE_OFF_TGT.first, &PL_TABLE_OFF_TGT.second)), ctxc);
|
||||
|
||||
// Build OFF transition 0
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
iht(objects::SCEX, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
iht(objects::PLPCDU_HANDLER, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
iht(objects::PLOC_MPSOC_HANDLER, OFF, 0, PL_TABLE_OFF_TRANS_0.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_OFF_TRANS_0.first, &PL_TABLE_OFF_TRANS_0.second)), ctxc);
|
||||
check(ss.addTable(TableEntry(PL_TABLE_OFF_TRANS_0.first, &PL_TABLE_OFF_TRANS_0.second)), ctxc);
|
||||
|
||||
// Build OFF transition 1
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, OFF, 0, PL_TABLE_OFF_TRANS_1.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_OFF_TRANS_1.first, &PL_TABLE_OFF_TRANS_1.second)), ctxc);
|
||||
check(ss.addTable(TableEntry(PL_TABLE_OFF_TRANS_1.first, &PL_TABLE_OFF_TRANS_1.second)), ctxc);
|
||||
|
||||
// Build OFF sequence
|
||||
ihs(PL_SEQUENCE_OFF.second, PL_TABLE_OFF_TGT.first, 0, false);
|
||||
ihs(PL_SEQUENCE_OFF.second, PL_TABLE_OFF_TRANS_0.first, 0, false);
|
||||
ihs(PL_SEQUENCE_OFF.second, PL_TABLE_OFF_TRANS_1.first, 0, false);
|
||||
check(ss->addSequence(
|
||||
check(ss.addSequence(
|
||||
SequenceEntry(PL_SEQUENCE_OFF.first, &PL_SEQUENCE_OFF.second, PL_SEQUENCE_OFF.first)),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void initPlMpsocStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void initPlMpsocStreamSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::payload::initPlMpsocStreamSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -158,21 +159,20 @@ void initPlMpsocStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
iht(objects::PLOC_MPSOC_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TGT.second);
|
||||
check(
|
||||
ss->addTable(TableEntry(PL_TABLE_MPSOC_STREAM_TGT.first, &PL_TABLE_MPSOC_STREAM_TGT.second)),
|
||||
ctxc);
|
||||
check(ss.addTable(TableEntry(PL_TABLE_MPSOC_STREAM_TGT.first, &PL_TABLE_MPSOC_STREAM_TGT.second)),
|
||||
ctxc);
|
||||
|
||||
// Build MPSoC stream transition 0
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_MPSOC_STREAM_TRANS_0.second);
|
||||
iht(objects::SCEX, OFF, 0, PL_TABLE_MPSOC_STREAM_TRANS_0.second);
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TRANS_0.second);
|
||||
check(ss->addTable(
|
||||
check(ss.addTable(
|
||||
TableEntry(PL_TABLE_MPSOC_STREAM_TRANS_0.first, &PL_TABLE_MPSOC_STREAM_TRANS_0.second)),
|
||||
ctxc);
|
||||
|
||||
// Build MPSoC stream transition 1
|
||||
iht(objects::PLOC_MPSOC_HANDLER, NML, 0, PL_TABLE_MPSOC_STREAM_TRANS_1.second);
|
||||
check(ss->addTable(
|
||||
check(ss.addTable(
|
||||
TableEntry(PL_TABLE_MPSOC_STREAM_TRANS_1.first, &PL_TABLE_MPSOC_STREAM_TRANS_1.second)),
|
||||
ctxc);
|
||||
|
||||
@ -180,12 +180,12 @@ void initPlMpsocStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
ihs(PL_SEQUENCE_MPSOC_STREAM.second, PL_TABLE_MPSOC_STREAM_TGT.first, 0, true);
|
||||
ihs(PL_SEQUENCE_MPSOC_STREAM.second, PL_TABLE_MPSOC_STREAM_TRANS_0.first, 0, true);
|
||||
ihs(PL_SEQUENCE_MPSOC_STREAM.second, PL_TABLE_MPSOC_STREAM_TRANS_1.first, 0, false);
|
||||
check(ss->addSequence(SequenceEntry(PL_SEQUENCE_MPSOC_STREAM.first,
|
||||
&PL_SEQUENCE_MPSOC_STREAM.second, PL_SEQUENCE_OFF.first)),
|
||||
check(ss.addSequence(SequenceEntry(PL_SEQUENCE_MPSOC_STREAM.first,
|
||||
&PL_SEQUENCE_MPSOC_STREAM.second, PL_SEQUENCE_OFF.first)),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void initPlCamStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void initPlCamStreamSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::payload::initPlCamStreamSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -209,7 +209,7 @@ void initPlCamStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
// Only check that the PL PCDU is on for now. It might later become necessary to switch on
|
||||
// the PLOC, so we ignore its state.
|
||||
iht(objects::PLPCDU_HANDLER, NML, plpcdu::ALL_ON_SUBMODE, PL_TABLE_CAM_STREAM_TGT.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_CAM_STREAM_TGT.first, &PL_TABLE_CAM_STREAM_TGT.second)),
|
||||
check(ss.addTable(TableEntry(PL_TABLE_CAM_STREAM_TGT.first, &PL_TABLE_CAM_STREAM_TGT.second)),
|
||||
ctxc);
|
||||
|
||||
// Build CAM transition 0
|
||||
@ -217,13 +217,13 @@ void initPlCamStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
iht(objects::PLOC_MPSOC_HANDLER, OFF, 0, PL_TABLE_CAM_STREAM_TRANS_0.second);
|
||||
iht(objects::CAM_SWITCHER, ON, 0, PL_TABLE_CAM_STREAM_TRANS_0.second);
|
||||
iht(objects::SCEX, OFF, 0, PL_TABLE_CAM_STREAM_TRANS_0.second);
|
||||
check(ss->addTable(
|
||||
check(ss.addTable(
|
||||
TableEntry(PL_TABLE_CAM_STREAM_TRANS_0.first, &PL_TABLE_CAM_STREAM_TRANS_0.second)),
|
||||
ctxc);
|
||||
|
||||
// Build CAM transition 1
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, OFF, 0, PL_TABLE_CAM_STREAM_TRANS_1.second);
|
||||
check(ss->addTable(
|
||||
check(ss.addTable(
|
||||
TableEntry(PL_TABLE_CAM_STREAM_TRANS_1.first, &PL_TABLE_CAM_STREAM_TRANS_1.second)),
|
||||
ctxc);
|
||||
|
||||
@ -231,12 +231,12 @@ void initPlCamStreamSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
ihs(PL_SEQUENCE_CAM_STREAM.second, PL_TABLE_CAM_STREAM_TGT.first, 0, true);
|
||||
ihs(PL_SEQUENCE_CAM_STREAM.second, PL_TABLE_CAM_STREAM_TRANS_0.first, 0, true);
|
||||
ihs(PL_SEQUENCE_CAM_STREAM.second, PL_TABLE_CAM_STREAM_TRANS_1.first, 0, false);
|
||||
check(ss->addSequence(SequenceEntry(PL_SEQUENCE_CAM_STREAM.first, &PL_SEQUENCE_CAM_STREAM.second,
|
||||
PL_SEQUENCE_OFF.first)),
|
||||
check(ss.addSequence(SequenceEntry(PL_SEQUENCE_CAM_STREAM.first, &PL_SEQUENCE_CAM_STREAM.second,
|
||||
PL_SEQUENCE_OFF.first)),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void initPlSpvSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void initPlSpvSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::payload::initPlSupvSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -258,32 +258,32 @@ void initPlSpvSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
|
||||
// Build Payload Supervisor Only target
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 0, PL_TABLE_SUPV_ONLY_TGT.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_SUPV_ONLY_TGT.first, &PL_TABLE_SUPV_ONLY_TGT.second)),
|
||||
check(ss.addTable(TableEntry(PL_TABLE_SUPV_ONLY_TGT.first, &PL_TABLE_SUPV_ONLY_TGT.second)),
|
||||
ctxc);
|
||||
|
||||
// Build Payload Supervisor Only transition 0
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 0, PL_TABLE_SUPV_ONLY_TRANS_0.second);
|
||||
iht(objects::CAM_SWITCHER, OFF, 0, PL_TABLE_SUPV_ONLY_TRANS_0.second);
|
||||
check(ss->addTable(
|
||||
TableEntry(PL_TABLE_SUPV_ONLY_TRANS_0.first, &PL_TABLE_SUPV_ONLY_TRANS_0.second)),
|
||||
ctxc);
|
||||
check(
|
||||
ss.addTable(TableEntry(PL_TABLE_SUPV_ONLY_TRANS_0.first, &PL_TABLE_SUPV_ONLY_TRANS_0.second)),
|
||||
ctxc);
|
||||
|
||||
// Build Payload Supervisor Only transition 1
|
||||
iht(objects::PLOC_MPSOC_HANDLER, OFF, 0, PL_TABLE_SUPV_ONLY_TRANS_1.second);
|
||||
check(ss->addTable(
|
||||
TableEntry(PL_TABLE_SUPV_ONLY_TRANS_1.first, &PL_TABLE_SUPV_ONLY_TRANS_1.second)),
|
||||
ctxc);
|
||||
check(
|
||||
ss.addTable(TableEntry(PL_TABLE_SUPV_ONLY_TRANS_1.first, &PL_TABLE_SUPV_ONLY_TRANS_1.second)),
|
||||
ctxc);
|
||||
|
||||
// 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);
|
||||
check(ss->addSequence(SequenceEntry(PL_SEQUENCE_SUPV_ONLY.first, &PL_SEQUENCE_SUPV_ONLY.second,
|
||||
PL_SEQUENCE_OFF.first)),
|
||||
check(ss.addSequence(SequenceEntry(PL_SEQUENCE_SUPV_ONLY.first, &PL_SEQUENCE_SUPV_ONLY.second,
|
||||
PL_SEQUENCE_OFF.first)),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
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
|
||||
@ -308,32 +308,32 @@ void initEarthObsvSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 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);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_EARTH_OBSV_TGT.first, &PL_TABLE_EARTH_OBSV_TGT.second)),
|
||||
check(ss.addTable(TableEntry(PL_TABLE_EARTH_OBSV_TGT.first, &PL_TABLE_EARTH_OBSV_TGT.second)),
|
||||
ctxc);
|
||||
|
||||
// Build Earth Observation transition 0
|
||||
iht(objects::PLOC_SUPERVISOR_HANDLER, NML, 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);
|
||||
check(ss->addTable(
|
||||
check(ss.addTable(
|
||||
TableEntry(PL_TABLE_EARTH_OBSV_TRANS_0.first, &PL_TABLE_EARTH_OBSV_TRANS_0.second)),
|
||||
ctxc);
|
||||
|
||||
// Build Earth Observation transition 1
|
||||
iht(objects::PLOC_MPSOC_HANDLER, NML, 0, PL_TABLE_CAM_STREAM_TRANS_1.second);
|
||||
check(ss->addTable(
|
||||
check(ss.addTable(
|
||||
TableEntry(PL_TABLE_EARTH_OBSV_TRANS_1.first, &PL_TABLE_EARTH_OBSV_TRANS_1.second)),
|
||||
ctxc);
|
||||
|
||||
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);
|
||||
check(ss->addSequence(SequenceEntry(PL_SEQUENCE_EARTH_OBSV.first, &PL_SEQUENCE_EARTH_OBSV.second,
|
||||
PL_SEQUENCE_OFF.first)),
|
||||
check(ss.addSequence(SequenceEntry(PL_SEQUENCE_EARTH_OBSV.first, &PL_SEQUENCE_EARTH_OBSV.second,
|
||||
PL_SEQUENCE_OFF.first)),
|
||||
ctxc);
|
||||
}
|
||||
|
||||
void initScexSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
void initScexSequence(Subsystem& ss, ModeListEntry& eh) {
|
||||
std::string context = "satsystem::payload::initScexSequence";
|
||||
auto ctxc = context.c_str();
|
||||
// Insert Helper Table
|
||||
@ -355,17 +355,16 @@ void initScexSequence(Subsystem* ss, ModeListEntry& eh) {
|
||||
|
||||
// Build SCEX target
|
||||
iht(objects::SCEX, NML, 0, PL_TABLE_SCEX_TGT.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_EARTH_OBSV_TGT.first, &PL_TABLE_EARTH_OBSV_TGT.second)),
|
||||
ctxc);
|
||||
check(ss.addTable(TableEntry(PL_TABLE_SCEX_TGT.first, &PL_TABLE_SCEX_TGT.second)), ctxc);
|
||||
|
||||
// Build SCEX transition 0
|
||||
iht(objects::SCEX, NML, 0, PL_TABLE_SCEX_TGT.second);
|
||||
check(ss->addTable(TableEntry(PL_TABLE_SCEX_TRANS_0.first, &PL_TABLE_SCEX_TRANS_0.second)), ctxc);
|
||||
iht(objects::SCEX, NML, 0, PL_TABLE_SCEX_TRANS_0.second);
|
||||
check(ss.addTable(TableEntry(PL_TABLE_SCEX_TRANS_0.first, &PL_TABLE_SCEX_TRANS_0.second)), ctxc);
|
||||
|
||||
// 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);
|
||||
check(ss->addSequence(
|
||||
check(ss.addSequence(
|
||||
SequenceEntry(PL_SEQUENCE_SCEX.first, &PL_SEQUENCE_SCEX.second, PL_SEQUENCE_OFF.first)),
|
||||
ctxc);
|
||||
}
|
||||
|
@ -1,11 +1,16 @@
|
||||
#ifndef MISSION_SYSTEM_TREE_PAYLOADMODETREE_H_
|
||||
#define MISSION_SYSTEM_TREE_PAYLOADMODETREE_H_
|
||||
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
|
||||
namespace satsystem {
|
||||
|
||||
namespace pl {
|
||||
|
||||
extern Subsystem SUBSYSTEM;
|
||||
|
||||
void init();
|
||||
}
|
||||
} // namespace pl
|
||||
|
||||
} // namespace satsystem
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user