#include "../../bsp_linux/core/ObjectFactory.h" #include #include #include #include #include #include #include #include #include #include #include "../../bsp_linux/fsfwconfig/datapool/dataPoolInit.h" #include "../../bsp_linux/fsfwconfig/objects/systemObjectList.h" #include "../../bsp_linux/fsfwconfig/OBSWConfig.h" #include "../../bsp_linux/fsfwconfig/tmtc/apid.h" #include "../../bsp_linux/fsfwconfig/tmtc/pusIds.h" #if OBSW_ADD_TEST_CODE == 1 #include #endif void Factory::setStaticFrameworkObjectIds(){ MonitoringReportContent::timeStamperId = objects::TIME_STAMPER; MonitoringReportContent::timeStamperId = objects::TIME_STAMPER; MonitoringReportContent::timeStamperId = objects::TIME_STAMPER; MonitoringReportContent::timeStamperId = objects::TIME_STAMPER; MonitoringReportContent::timeStamperId = objects::TIME_STAMPER; MonitoringReportContent::timeStamperId = objects::TIME_STAMPER; TmFunnel::downlinkDestination = objects::UDP_BRIDGE; // No storage object for now. TmFunnel::storageDestination = objects::NO_OBJECT; PusServiceBase::packetSource = objects::PUS_DISTRIBUTOR; PusServiceBase::packetDestination = objects::TM_FUNNEL; CommandingServiceBase::defaultPacketSource = objects::PUS_DISTRIBUTOR; CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL; VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION; TmPacketStored::timeStamperId = objects::TIME_STAMPER; } void ObjectFactory::produce(){ Factory::setStaticFrameworkObjectIds(); { static constexpr uint8_t NUMBER_OF_POOLS = 5; const uint16_t element_sizes[NUMBER_OF_POOLS] = {16, 32, 64, 128, 1024}; const uint16_t n_elements[NUMBER_OF_POOLS] = {100, 50, 25, 15, 5}; new PoolManager(objects::TC_STORE, element_sizes, n_elements); } { static constexpr uint8_t NUMBER_OF_POOLS = 5; const uint16_t element_sizes[NUMBER_OF_POOLS] = {16, 32, 64, 128, 1024}; const uint16_t n_elements[NUMBER_OF_POOLS] = {100, 50, 25, 15, 5}; new PoolManager(objects::TM_STORE, element_sizes, n_elements); } { static constexpr uint8_t NUMBER_OF_POOLS = 6; const uint16_t element_sizes[NUMBER_OF_POOLS] = {32, 64, 512, 1024, 2048, 4096}; const uint16_t n_elements[NUMBER_OF_POOLS] = {200, 100, 50, 25, 15, 5}; new PoolManager(objects::IPC_STORE, element_sizes, n_elements); } ObjectFactory::produceGenericObjects(); /* TMTC Reception via UDP socket */ new TmTcUnixUdpBridge(objects::UDP_BRIDGE, objects::CCSDS_DISTRIBUTOR, objects::TM_STORE, objects::TC_STORE); new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); #if OBSW_ADD_TEST_CODE == 1 new TestTask(objects::TEST_TASK, false); #endif }