From 3358192053a6b20064418aa92aaefb1961fca33a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 2 Nov 2020 14:20:15 +0100 Subject: [PATCH] old init mission deleted --- bsp_linux/InitMission.cpp | 168 ------------------------------ config/cdatapool/dataPoolInit.cpp | 2 +- config/cdatapool/dataPoolInit.h | 2 +- fsfw | 2 +- mission/core/InitMission.cpp | 2 - 5 files changed, 3 insertions(+), 173 deletions(-) delete mode 100644 bsp_linux/InitMission.cpp diff --git a/bsp_linux/InitMission.cpp b/bsp_linux/InitMission.cpp deleted file mode 100644 index 30f0f8fc..00000000 --- a/bsp_linux/InitMission.cpp +++ /dev/null @@ -1,168 +0,0 @@ -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -/* Declare global object manager */ -ObjectManagerIF* objectManager; - -/* Initialize Data Pool */ -DataPool dataPool(datapool::dataPoolInit); - -/* Set up output streams */ -namespace sif { -ServiceInterfaceStream debug("DEBUG"); -ServiceInterfaceStream info("INFO"); -ServiceInterfaceStream warning("WARNING"); -ServiceInterfaceStream error("ERROR", false, true, true); -} - - -void initTask(); - - -void initMission() { - sif::info << "Initiating mission specific code." << std::endl; - // Allocate object manager here, as global constructors might not be - // executed, depending on buildchain - sif::info << "Creating objects" << std::endl; - objectManager = new ObjectManager(Factory::produce); - objectManager -> initialize(); - - initTask(); - -} - -void initTask() { - ReturnValue_t result = HasReturnvaluesIF::RETURN_OK; - - /* Packet Distributor Taks */ - PeriodicTaskIF* PacketDistributorTask = - TaskFactory::instance()-> createPeriodicTask( - "PACKET_DIST_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.4, nullptr); - result = PacketDistributorTask-> - addComponent(objects::CCSDS_PACKET_DISTRIBUTOR); - if(result != HasReturnvaluesIF::RETURN_OK){ - sif::error << "Add component CCSDS Packet Distributor failed" - << std::endl; - } - result = PacketDistributorTask-> - addComponent(objects::PUS_PACKET_DISTRIBUTOR); - if(result != HasReturnvaluesIF::RETURN_OK){ - sif::error << "Add component PUS Packet Distributor failed" - << std::endl; - } - result = PacketDistributorTask->addComponent(objects::PUS_FUNNEL); - if(result != HasReturnvaluesIF::RETURN_OK){ - sif::error << "Add component PUS Funnel failed" << std::endl; - } - - /* UDP bridge */ - PeriodicTaskIF* UdpBridgeTask = TaskFactory::instance()->createPeriodicTask( - "UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.2, nullptr); - result = UdpBridgeTask->addComponent(objects::UDP_BRIDGE); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component UDP Unix Bridge failed" << std::endl; - } - - PeriodicTaskIF* UdpPollingTask = TaskFactory::instance()-> - createPeriodicTask("UDP_POLLING", 80, - PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, nullptr); - result = UdpPollingTask->addComponent(objects::UDP_POLLING_TASK); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component UDP Polling failed" << std::endl; - } - - /* PUS Services */ - PeriodicTaskIF* PusService1 = TaskFactory::instance()->createPeriodicTask( - "PUS_SRV_1", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.4, nullptr); - result = PusService1->addComponent(objects::PUS_SERVICE_1); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component Verification Reporter failed" << std::endl; - } - - PeriodicTaskIF* PusService2 = TaskFactory::instance()->createPeriodicTask( - "PUS_SRV_2", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.2, nullptr); - result = PusService2->addComponent(objects::PUS_SERVICE_2); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component Device Access failed" << std::endl; - } - - PeriodicTaskIF* PusService5 = TaskFactory::instance()->createPeriodicTask( - "PUS_SRV_5", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.4, nullptr); - result = PusService5->addComponent(objects::PUS_SERVICE_5); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component Event Service failed" << std::endl; - } - - PeriodicTaskIF* PusService8 = TaskFactory::instance()->createPeriodicTask( - "PUS_SRV_8", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.4, nullptr); - result = PusService2->addComponent(objects::PUS_SERVICE_8); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component Function MGMT failed" << std::endl; - } - - PeriodicTaskIF* PusService17 = TaskFactory::instance()->createPeriodicTask( - "PUS_SRV_17", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.4, nullptr); - result = PusService17->addComponent(objects::PUS_SERVICE_17); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component Test Service failed" << std::endl; - } - - PeriodicTaskIF* PusService200 = TaskFactory::instance()->createPeriodicTask( - "PUS_SRV_200", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, - 0.4, nullptr); - result = PusService200->addComponent(objects::PUS_SERVICE_200); - if(result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component Mode MGMT failed" << std::endl; - } - - - /* Test Task */ - PeriodicTaskIF* TestTask = TaskFactory::instance()-> - createPeriodicTask("TEST_TASK", 80, - PeriodicTaskIF::MINIMUM_STACK_SIZE, 5.0, nullptr); - result = TestTask->addComponent(objects::TEST_TASK); - if (result != HasReturnvaluesIF::RETURN_OK) { - sif::error << "Add component Test Task failed" << std::endl; - } - - - /* Polling Sequence Table Default */ -// FixedTimeslotTaskIF * PollingSequenceTableTaskDefault = -// TaskFactory::instance()-> createFixedTimeslotTask( -// "PST_DEFAULT", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, -// nullptr); -// result = pst::pollingSequenceInitDefault(PollingSequenceTableTaskDefault); -// if (result != HasReturnvaluesIF::RETURN_OK) { -// sif::error << "creating PST failed" << std::endl; -// } - - TestTask->startTask(); - PacketDistributorTask->startTask(); - //PollingSequenceTableTaskDefault->startTask(); - UdpBridgeTask->startTask(); - UdpPollingTask->startTask(); - - PusService1->startTask(); - PusService2->startTask(); - PusService5->startTask(); - PusService8->startTask(); - PusService17->startTask(); - PusService200->startTask(); -} diff --git a/config/cdatapool/dataPoolInit.cpp b/config/cdatapool/dataPoolInit.cpp index bba2a041..80840724 100644 --- a/config/cdatapool/dataPoolInit.cpp +++ b/config/cdatapool/dataPoolInit.cpp @@ -1,5 +1,5 @@ #include "dataPoolInit.h" -void datapool::dataPoolInit(std::map** poolMap) { +void datapool::dataPoolInit(std::map* poolMap) { } diff --git a/config/cdatapool/dataPoolInit.h b/config/cdatapool/dataPoolInit.h index 31e0bc58..915bd11f 100644 --- a/config/cdatapool/dataPoolInit.h +++ b/config/cdatapool/dataPoolInit.h @@ -4,7 +4,7 @@ #include namespace datapool{ - void dataPoolInit(std::map* * poolMap); + void dataPoolInit(std::map* poolMap); enum datapoolvariables { NO_PARAMETER = 0, diff --git a/fsfw b/fsfw index 11a351a2..508f31a3 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 11a351a202464990641c4840569d2beff33a7b8c +Subproject commit 508f31a359bd7cb5652f5e260bcd7ead6cb78e9a diff --git a/mission/core/InitMission.cpp b/mission/core/InitMission.cpp index be2973a5..be16750d 100644 --- a/mission/core/InitMission.cpp +++ b/mission/core/InitMission.cpp @@ -158,5 +158,3 @@ void InitMission::initTasks(){ #endif sif::info << "Tasks started.." << std::endl; } - -