From d0904fdaa245397cdd6e6532d63fe69b43c431e1 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Fri, 1 Aug 2025 08:57:08 +0200 Subject: [PATCH] added function to set verification reporter of CommandingServiceBase --- src/fsfw/tmtcservices/CommandingServiceBase.cpp | 6 +++++- src/fsfw/tmtcservices/CommandingServiceBase.h | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/fsfw/tmtcservices/CommandingServiceBase.cpp b/src/fsfw/tmtcservices/CommandingServiceBase.cpp index 0cdcc653..a2e7f1dc 100644 --- a/src/fsfw/tmtcservices/CommandingServiceBase.cpp +++ b/src/fsfw/tmtcservices/CommandingServiceBase.cpp @@ -128,7 +128,7 @@ ReturnValue_t CommandingServiceBase::initialize() { if (verificationReporter == nullptr) { verificationReporter = - ObjectManager::instance()->get(objects::VERIFICATION_REPORTER); + ObjectManager::instance()->get(verificationReporterId); if (verificationReporter == nullptr) { return ObjectManagerIF::CHILD_INIT_FAILED; } @@ -136,6 +136,10 @@ ReturnValue_t CommandingServiceBase::initialize() { return returnvalue::OK; } +void CommandingServiceBase::setVerificationReporter(object_id_t verificationReporterId_) { + verificationReporterId = verificationReporterId_; +} + void CommandingServiceBase::handleCommandQueue() { CommandMessage reply; ReturnValue_t result; diff --git a/src/fsfw/tmtcservices/CommandingServiceBase.h b/src/fsfw/tmtcservices/CommandingServiceBase.h index 92369b58..baf1ba76 100644 --- a/src/fsfw/tmtcservices/CommandingServiceBase.h +++ b/src/fsfw/tmtcservices/CommandingServiceBase.h @@ -126,6 +126,8 @@ class CommandingServiceBase : public SystemObject, ReturnValue_t initialize() override; + void setVerificationReporter(object_id_t verificationReporterId_); + /** * Implementation of ExecutableObjectIF function * @@ -262,6 +264,8 @@ class CommandingServiceBase : public SystemObject, const uint16_t timeoutSeconds; + object_id_t verificationReporterId = objects::VERIFICATION_REPORTER; + PusTcReader tcReader; TmStoreHelper tmStoreHelper; TmSendHelper tmSendHelper;