COM Subsystem #358

Merged
muellerr merged 19 commits from com_subsystem into develop 2023-01-28 14:58:08 +01:00
4 changed files with 17 additions and 10 deletions
Showing only changes of commit 9ad34aa395 - Show all commits

View File

@ -142,10 +142,14 @@ void scheduling::initTasks() {
#endif #endif
#endif #endif
#if OBSW_ADD_CCSDS_IP_CORES == 1 PeriodicTaskIF* comTask = factory->createPeriodicTask(
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc); "CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER); result = comTask->addComponent(objects::COM_SUBSYSTEM);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("COM subsystem", objects::COM_SUBSYSTEM);
}
#if OBSW_ADD_CCSDS_IP_CORES == 1
result = comTask->addComponent(objects::CCSDS_HANDLER);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
scheduling::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER); scheduling::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
} }
@ -380,8 +384,8 @@ void scheduling::initTasks() {
#endif #endif
#endif #endif
comTask->startTask();
#if OBSW_ADD_CCSDS_IP_CORES == 1 #if OBSW_ADD_CCSDS_IP_CORES == 1
ccsdsHandlerTask->startTask();
pdecHandlerTask->startTask(); pdecHandlerTask->startTask();
#endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */ #endif /* OBSW_ADD_CCSDS_IP_CORES == 1 */

View File

@ -118,7 +118,8 @@ enum commonObjects : uint32_t {
SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043, SUS_11_R_LOC_XBYMZB_PT_ZB = 0x44120043,
SYRLINKS_HANDLER = 0x445300A3, SYRLINKS_HANDLER = 0x445300A3,
CCSDS_IP_CORE_BRIDGE = 0x73500000, // might be obsolete, was not used in Q7S FM SW
// CCSDS_IP_CORE_BRIDGE = 0x73500000,
/* 0x49 ('I') for Communication Interfaces */ /* 0x49 ('I') for Communication Interfaces */
SPI_RTD_COM_IF = 0x49020006, SPI_RTD_COM_IF = 0x49020006,

View File

@ -87,7 +87,7 @@ void buildRxOnlySequence(Subsystem& ss, ModeListEntry& eh) {
ctxc); ctxc);
// Build RX Only transition 1 // Build RX Only transition 1
iht(objects::CCSDS_IP_CORE_BRIDGE, OFF, 0, COM_TABLE_RX_ONLY_TRANS_1.second); iht(objects::CCSDS_HANDLER, OFF, 0, COM_TABLE_RX_ONLY_TRANS_1.second);
check(ss.addTable(TableEntry(COM_TABLE_RX_ONLY_TRANS_1.first, &COM_TABLE_RX_ONLY_TRANS_1.second)), check(ss.addTable(TableEntry(COM_TABLE_RX_ONLY_TRANS_1.first, &COM_TABLE_RX_ONLY_TRANS_1.second)),
ctxc); ctxc);
@ -122,14 +122,14 @@ void buildTxAndRxLowRateSequence(Subsystem& ss, ModeListEntry& eh) {
// Build RX and TX low datarate table. // Build RX and TX low datarate table.
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_LOW_DATARATE, iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_LOW_DATARATE,
COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second); COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second);
iht(objects::CCSDS_IP_CORE_BRIDGE, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_LOW), iht(objects::CCSDS_HANDLER, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_LOW),
COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second); COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second);
check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_LOW_RATE_TGT.first, check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_LOW_RATE_TGT.first,
&COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second)), &COM_TABLE_RX_AND_TX_LOW_RATE_TGT.second)),
ctxc); ctxc);
// Build TX and RX low datarate transition 0, switch CCSDS handler first // Build TX and RX low datarate transition 0, switch CCSDS handler first
iht(objects::CCSDS_IP_CORE_BRIDGE, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_LOW), iht(objects::CCSDS_HANDLER, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_LOW),
COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0.second); COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0.second);
check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0.first, check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0.first,
&COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0.second)), &COM_TABLE_RX_AND_TX_LOW_RATE_TRANS_0.second)),
@ -174,14 +174,14 @@ void buildTxAndRxHighRateSequence(Subsystem& ss, ModeListEntry& eh) {
// Build RX and TX low datarate table. // Build RX and TX low datarate table.
iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_HIGH_DATARATE, iht(objects::SYRLINKS_HANDLER, NML, ::com::Submode::RX_AND_TX_HIGH_DATARATE,
COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second); COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second);
iht(objects::CCSDS_IP_CORE_BRIDGE, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_HIGH), iht(objects::CCSDS_HANDLER, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_HIGH),
COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second); COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second);
check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.first, check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.first,
&COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second)), &COM_TABLE_RX_AND_TX_HIGH_RATE_TGT.second)),
ctxc); ctxc);
// Build TX and RX low datarate transition 0, switch CCSDS handler first // Build TX and RX low datarate transition 0, switch CCSDS handler first
iht(objects::CCSDS_IP_CORE_BRIDGE, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_HIGH), iht(objects::CCSDS_HANDLER, ON, static_cast<Submode_t>(::com::CcsdsSubmode::DATARATE_HIGH),
COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0.second); COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0.second);
check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0.first, check(ss.addTable(TableEntry(COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0.first,
&COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0.second)), &COM_TABLE_RX_AND_TX_HIGH_RATE_TRANS_0.second)),

View File

@ -1,6 +1,7 @@
#include "system.h" #include "system.h"
#include "acsModeTree.h" #include "acsModeTree.h"
#include "comModeTree.h"
#include "payloadModeTree.h" #include "payloadModeTree.h"
#include "tcsModeTree.h" #include "tcsModeTree.h"
@ -8,4 +9,5 @@ void satsystem::init() {
acs::init(); acs::init();
pl::init(); pl::init();
tcs::init(); tcs::init();
com::init();
} }