From dbfa98021c932a8a68b012eaefaaee0ea48cbad5 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Fri, 20 Nov 2020 18:27:07 +0100 Subject: [PATCH] repaired other build --- bsp_linux/ObjectFactory.cpp | 97 +++++-------------------------------- bsp_linux/main.cpp | 4 +- hosted/ObjectFactory.cpp | 8 +-- 3 files changed, 17 insertions(+), 92 deletions(-) diff --git a/bsp_linux/ObjectFactory.cpp b/bsp_linux/ObjectFactory.cpp index d08912bb..a0f82887 100644 --- a/bsp_linux/ObjectFactory.cpp +++ b/bsp_linux/ObjectFactory.cpp @@ -1,37 +1,20 @@ #include "ObjectFactory.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include #include +#include +#include +#include -#if OBSW_ADD_TEST_CODE == 1 -#include -#endif - -void Factory::setStaticFrameworkObjectIds(){ +void Factory::setStaticFrameworkObjectIds() { PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR; PusServiceBase::packetDestination = objects::TM_FUNNEL; @@ -50,68 +33,10 @@ void Factory::setStaticFrameworkObjectIds(){ void ObjectFactory::produce(){ Factory::setStaticFrameworkObjectIds(); + ObjectFactory::produceGenericObjects(); - /* Framework objects */ - new EventManager(objects::EVENT_MANAGER); - new HealthTable(objects::HEALTH_TABLE); - new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER, 0, 0, 0); - new TimeStamper(objects::TIME_STAMPER); - - { - 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); - } - - new CCSDSDistributor(apid::EIVE_OBSW, objects::CCSDS_PACKET_DISTRIBUTOR); - new PUSDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR, - objects::CCSDS_PACKET_DISTRIBUTOR); - - - /* TMTC Reception via UDP socket */ - new TmFunnel(objects::TM_FUNNEL); new TmTcUnixUdpBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR, objects::TM_STORE, objects::TC_STORE); new TcUnixUdpPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE); - - /* PUS stack */ - new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, - apid::EIVE_OBSW, pus::PUS_SERVICE_1, objects::TM_FUNNEL); - new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, - apid::EIVE_OBSW, pus::PUS_SERVICE_2, 3, 10); - new Service5EventReporting(objects::PUS_SERVICE_5_EVENT_REPORTING, - apid::EIVE_OBSW, pus::PUS_SERVICE_5, 50); - new Service8FunctionManagement(objects::PUS_SERVICE_8_FUNCTION_MGMT, - apid::EIVE_OBSW, pus::PUS_SERVICE_8, 3, 10); - new Service9TimeManagement(objects::PUS_SERVICE_9_TIME_MGMT, - apid::EIVE_OBSW, pus::PUS_SERVICE_9); - new Service17Test(objects::PUS_SERVICE_17_TEST, apid::EIVE_OBSW, - pus::PUS_SERVICE_17); - new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, - apid::EIVE_OBSW, pus::PUS_SERVICE_200); - - /* Test Device Handler */ -#if OBSW_ADD_TEST_CODE == 1 - new TestTask(objects::TEST_TASK); -#endif } diff --git a/bsp_linux/main.cpp b/bsp_linux/main.cpp index a8e34769..cd8a0bc6 100644 --- a/bsp_linux/main.cpp +++ b/bsp_linux/main.cpp @@ -19,8 +19,8 @@ int main(void) { std::cout << "-- EIVE OBSW --" << std::endl; std::cout << "-- Compiled for Linux " << " --" << std::endl; - std::cout << "-- Software version v" << SW_VERSION << "." << SW_SUBVERSION - << "." << SW_SUBSUBVERSION << " -- " << std::endl; + std::cout << "-- Software version " << SW_NAME << " v" << SW_VERSION << "." + << SW_SUBVERSION << "." << SW_SUBSUBVERSION << " -- " << std::endl; std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl; InitMission::initMission(); diff --git a/hosted/ObjectFactory.cpp b/hosted/ObjectFactory.cpp index dbdb42fa..09c69082 100644 --- a/hosted/ObjectFactory.cpp +++ b/hosted/ObjectFactory.cpp @@ -1,9 +1,9 @@ #include "ObjectFactory.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include