diff --git a/CMakeLists.txt b/CMakeLists.txt index eb44bd41..ef87352e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,8 @@ include(EiveHelpers) option(EIVE_ADD_ETL_LIB "Add ETL library" ON) option(EIVE_ADD_JSON_LIB "Add JSON library" ON) +set(OBSW_MAX_SCHEDULED_TCS 500) + if(EIVE_Q7S_EM) set(OBSW_Q7S_EM 1 diff --git a/bsp_q7s/core/InitMission.cpp b/bsp_q7s/core/InitMission.cpp index 1b9cc374..d824bb95 100644 --- a/bsp_q7s/core/InitMission.cpp +++ b/bsp_q7s/core/InitMission.cpp @@ -424,13 +424,22 @@ void initmission::createPusTasks(TaskFactory& factory, PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask( "PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc); + + result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING); + if (result != HasReturnvaluesIF::RETURN_OK) { + initmission::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING); + } result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT); if (result != HasReturnvaluesIF::RETURN_OK) { initmission::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT); } - result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING); + result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER); if (result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Object add component failed" << std::endl; + initmission::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER); + } + result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS); + if (result != HasReturnvaluesIF::RETURN_OK) { + initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS); } result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT); if (result != HasReturnvaluesIF::RETURN_OK) { @@ -440,10 +449,6 @@ void initmission::createPusTasks(TaskFactory& factory, if (result != HasReturnvaluesIF::RETURN_OK) { initmission::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH); } - result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS); - if (result != HasReturnvaluesIF::RETURN_OK) { - initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS); - } taskVec.push_back(pusMedPrio); PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask( diff --git a/common/config/commonConfig.h.in b/common/config/commonConfig.h.in index ad19e135..9581e751 100644 --- a/common/config/commonConfig.h.in +++ b/common/config/commonConfig.h.in @@ -33,6 +33,9 @@ static constexpr uint8_t OBSW_VERSION_REVISION = @OBSW_VERSION_REVISION@; // CST: Commits since tag static const char OBSW_VERSION_CST_GIT_SHA1[] = "@OBSW_VERSION_CST_GIT_SHA1@"; + +static constexpr uint32_t OBSW_MAX_SCHEDULED_TCS = @OBSW_MAX_SCHEDULED_TCS@; + extern const fsfw::Version OBSW_VERSION; extern const uint16_t PUS_PACKET_ID; diff --git a/linux/fsfwconfig/tmtc/pusIds.h b/common/config/tmtc/pusIds.h similarity index 74% rename from linux/fsfwconfig/tmtc/pusIds.h rename to common/config/tmtc/pusIds.h index 37503786..75c40176 100644 --- a/linux/fsfwconfig/tmtc/pusIds.h +++ b/common/config/tmtc/pusIds.h @@ -1,5 +1,5 @@ -#ifndef CONFIG_TMTC_PUSIDS_HPP_ -#define CONFIG_TMTC_PUSIDS_HPP_ +#ifndef CONFIG_TMTC_PUSIDS_H_ +#define CONFIG_TMTC_PUSIDS_H_ namespace pus { enum Ids { @@ -11,6 +11,7 @@ enum Ids { PUS_SERVICE_6 = 6, PUS_SERVICE_8 = 8, PUS_SERVICE_9 = 9, + PUS_SERVICE_11 = 11, PUS_SERVICE_17 = 17, PUS_SERVICE_19 = 19, PUS_SERVICE_20 = 20, @@ -20,4 +21,4 @@ enum Ids { }; }; -#endif /* CONFIG_TMTC_PUSIDS_HPP_ */ +#endif /* CONFIG_TMTC_PUSIDS_H_ */ diff --git a/fsfw b/fsfw index 4b128d24..d11bf5ff 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 4b128d243569e0c87ae8868c545bdd80a354a2e6 +Subproject commit d11bf5ffe3d67525cf681f5592e29d1be130053e diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index 3ab598f3..416ea199 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -13,6 +13,7 @@ #include #include #include +#include "fsfw/pus/Service11TelecommandScheduling.h" #include #include #include @@ -73,7 +74,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) { new PoolManager(objects::IPC_STORE, poolCfg); } - new CCSDSDistributor(apid::EIVE_OBSW, objects::CCSDS_PACKET_DISTRIBUTOR); + auto* ccsdsDistrib = new CCSDSDistributor(apid::EIVE_OBSW, objects::CCSDS_PACKET_DISTRIBUTOR); new PUSDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR, objects::CCSDS_PACKET_DISTRIBUTOR); @@ -96,6 +97,9 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_) { new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, apid::EIVE_OBSW, pus::PUS_SERVICE_8, 3, 60); new Service9TimeManagement(objects::PUS_SERVICE_9_TIME_MGMT, apid::EIVE_OBSW, pus::PUS_SERVICE_9); + + new Service11TelecommandScheduling(objects::PUS_SERVICE_11_TC_SCHEDULER, + apid::EIVE_OBSW, pus::PUS_SERVICE_11, ccsdsDistrib); new Service17Test(objects::PUS_SERVICE_17_TEST, apid::EIVE_OBSW, pus::PUS_SERVICE_17); new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::EIVE_OBSW, pus::PUS_SERVICE_20); diff --git a/tmtc b/tmtc index 9332fb86..4b902ce0 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 9332fb8690de200070e712a70b1fa339d5b6b8d8 +Subproject commit 4b902ce01b444908ae5c0bf47b7eb018bbb10f81