From 3fff3ba21e1aa9a690cd3c880d00dc020f05ad13 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 24 May 2022 15:21:37 +0200 Subject: [PATCH 1/5] add and schedule PUS11 --- CMakeLists.txt | 2 ++ bsp_q7s/core/InitMission.cpp | 17 +++++++++++------ common/config/commonConfig.h.in | 3 +++ .../fsfwconfig => common/config}/tmtc/pusIds.h | 7 ++++--- fsfw | 2 +- mission/core/GenericFactory.cpp | 6 +++++- tmtc | 2 +- 7 files changed, 27 insertions(+), 12 deletions(-) rename {linux/fsfwconfig => common/config}/tmtc/pusIds.h (74%) 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 From 3eb85254197d52064432f517303895c18ae26fcf Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 24 May 2022 15:22:45 +0200 Subject: [PATCH 2/5] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95ec7400..5d52e2a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ list yields a list of all related PRs for each release. ## Added +- PUS11 TC scheduler + PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/259 - Commands for individual RTD devices PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/84 - `RwAssembly` added to system components. Assembly works in principle, From 59d0d880bb6e4156d44b8508b088f752b6d3d80f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 24 May 2022 15:45:12 +0200 Subject: [PATCH 3/5] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index d11bf5ff..40cc5579 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit d11bf5ffe3d67525cf681f5592e29d1be130053e +Subproject commit 40cc557978de5b50cf51909206620f05b101e5f5 From c0da8aef2ea18514c5df3b8560a6bdc41d90608b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 24 May 2022 15:50:39 +0200 Subject: [PATCH 4/5] delete obsolete folder --- bsp_hosted/fsfwconfig/tmtc/apid.h | 18 ------------------ bsp_hosted/fsfwconfig/tmtc/pusIds.h | 23 ----------------------- common/config/tmtc/pusIds.h | 6 +++--- 3 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 bsp_hosted/fsfwconfig/tmtc/apid.h delete mode 100644 bsp_hosted/fsfwconfig/tmtc/pusIds.h diff --git a/bsp_hosted/fsfwconfig/tmtc/apid.h b/bsp_hosted/fsfwconfig/tmtc/apid.h deleted file mode 100644 index 9d5c9ed5..00000000 --- a/bsp_hosted/fsfwconfig/tmtc/apid.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FSFWCONFIG_TMTC_APID_H_ -#define FSFWCONFIG_TMTC_APID_H_ - -#include - -/** - * Application Process Definition: entity, uniquely identified by an - * application process ID (APID), capable of generating telemetry source - * packets and receiving telecommand packets - * - * SOURCE APID: 0x73 / 115 / s - * APID is a 11 bit number - */ -namespace apid { -static const uint16_t EIVE_OBSW = 0x65; -} - -#endif /* FSFWCONFIG_TMTC_APID_H_ */ diff --git a/bsp_hosted/fsfwconfig/tmtc/pusIds.h b/bsp_hosted/fsfwconfig/tmtc/pusIds.h deleted file mode 100644 index 37503786..00000000 --- a/bsp_hosted/fsfwconfig/tmtc/pusIds.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef CONFIG_TMTC_PUSIDS_HPP_ -#define CONFIG_TMTC_PUSIDS_HPP_ - -namespace pus { -enum Ids { - PUS_SERVICE_1 = 1, - PUS_SERVICE_2 = 2, - PUS_SERVICE_3 = 3, - PUS_SERVICE_3_PSB = 3, - PUS_SERVICE_5 = 5, - PUS_SERVICE_6 = 6, - PUS_SERVICE_8 = 8, - PUS_SERVICE_9 = 9, - PUS_SERVICE_17 = 17, - PUS_SERVICE_19 = 19, - PUS_SERVICE_20 = 20, - PUS_SERVICE_23 = 23, - PUS_SERVICE_200 = 200, - PUS_SERVICE_201 = 201, -}; -}; - -#endif /* CONFIG_TMTC_PUSIDS_HPP_ */ diff --git a/common/config/tmtc/pusIds.h b/common/config/tmtc/pusIds.h index 75c40176..0891992d 100644 --- a/common/config/tmtc/pusIds.h +++ b/common/config/tmtc/pusIds.h @@ -1,5 +1,5 @@ -#ifndef CONFIG_TMTC_PUSIDS_H_ -#define CONFIG_TMTC_PUSIDS_H_ +#ifndef COMMON_CONFIG_TMTC_PUSIDS_H_ +#define COMMON_CONFIG_TMTC_PUSIDS_H_ namespace pus { enum Ids { @@ -21,4 +21,4 @@ enum Ids { }; }; -#endif /* CONFIG_TMTC_PUSIDS_H_ */ +#endif /* COMMON_CONFIG_TMTC_PUSIDS_H_ */ From 88faf8f87d071f0642037205673b401301f3f00b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 24 May 2022 16:23:00 +0200 Subject: [PATCH 5/5] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 40cc5579..24069dfd 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 40cc557978de5b50cf51909206620f05b101e5f5 +Subproject commit 24069dfd78a5905b3e327fab3528baacbc913757