diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index c6b53e68..847cce5f 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -48,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/comModeTree.h" #include "mission/system/tree/payloadModeTree.h" #include "mission/system/tree/tcsModeTree.h" #include "tmtc/pusIds.h" @@ -590,6 +591,7 @@ void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) { pcdu::PDU1_CH1_SYRLINKS_12V, syrlinksFdir); syrlinksHandler->setPowerSwitcher(pwrSwitcher); syrlinksHandler->setStartUpImmediately(); + syrlinksHandler->connectModeTreeParent(satsystem::com::SUBSYSTEM); #if OBSW_DEBUG_SYRLINKS == 1 syrlinksHandler->setDebugMode(true); #endif @@ -800,6 +802,13 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF, vc = new VirtualChannel(ccsds::VC3, config::VC3_QUEUE_SIZE, objects::CCSDS_HANDLER); (*ipCoreHandler)->addVirtualChannel(ccsds::VC3, vc); + ReturnValue_t result = (*ipCoreHandler)->connectModeTreeParent(satsystem::com::SUBSYSTEM); + if (result != returnvalue::OK) { + sif::error + << "ObjectFactory::createCcsdsComponents: Connecting COM subsystem to CCSDS handler failed" + << std::endl; + } + GpioCookie* gpioCookiePdec = new GpioCookie; consumer.str(""); consumer << "0x" << std::hex << objects::PDEC_HANDLER; diff --git a/fsfw b/fsfw index 049e3b43..da124953 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 049e3b431da51ac2069c2d48c5715bb12f3234bc +Subproject commit da124953351d6fc0910f2f14e92dac607c09b827 diff --git a/mission/tmtc/CcsdsIpCoreHandler.cpp b/mission/tmtc/CcsdsIpCoreHandler.cpp index 21966feb..db9a56b3 100644 --- a/mission/tmtc/CcsdsIpCoreHandler.cpp +++ b/mission/tmtc/CcsdsIpCoreHandler.cpp @@ -1,5 +1,6 @@ #include "CcsdsIpCoreHandler.h" +#include #include #include @@ -410,3 +411,15 @@ void CcsdsIpCoreHandler::disableTransmit() { } const char* CcsdsIpCoreHandler::getName() const { return "CCSDS Handler"; } + +const HasHealthIF* CcsdsIpCoreHandler::getOptHealthIF() const { return nullptr; } + +const HasModesIF& CcsdsIpCoreHandler::getModeIF() const { return *this; } + +ReturnValue_t CcsdsIpCoreHandler::connectModeTreeParent(HasModeTreeChildrenIF& parent) { + return modetree::connectModeTreeParent(parent, *this, nullptr, modeHelper); +} + +ModeTreeChildIF& CcsdsIpCoreHandler::getModeTreeChildIF() { return *this; } + +object_id_t CcsdsIpCoreHandler::getObjectId() const { return SystemObject::getObjectId(); } diff --git a/mission/tmtc/CcsdsIpCoreHandler.h b/mission/tmtc/CcsdsIpCoreHandler.h index c9c85033..37212851 100644 --- a/mission/tmtc/CcsdsIpCoreHandler.h +++ b/mission/tmtc/CcsdsIpCoreHandler.h @@ -15,6 +15,7 @@ #include "fsfw/objectmanager/SystemObject.h" #include "fsfw/parameters/ParameterHelper.h" #include "fsfw/returnvalues/returnvalue.h" +#include "fsfw/subsystem/ModeTreeConnectionIF.h" #include "fsfw/tasks/ExecutableObjectIF.h" #include "fsfw/timemanager/Countdown.h" #include "fsfw/tmtcservices/AcceptsTelecommandsIF.h" @@ -35,6 +36,8 @@ */ class CcsdsIpCoreHandler : public SystemObject, public ExecutableObjectIF, + public ModeTreeChildIF, + public ModeTreeConnectionIF, public HasModesIF, public AcceptsTelemetryIF, public AcceptsTelecommandsIF, @@ -91,6 +94,11 @@ class CcsdsIpCoreHandler : public SystemObject, virtual ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, const uint8_t* data, size_t size); + const HasHealthIF* getOptHealthIF() const override; + const HasModesIF& getModeIF() const override; + object_id_t getObjectId() const override; + ReturnValue_t connectModeTreeParent(HasModeTreeChildrenIF& parent) override; + ModeTreeChildIF& getModeTreeChildIF() override; private: static const uint8_t INTERFACE_ID = CLASS_ID::CCSDS_HANDLER;