a lot of good stuff
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
target_sources(${OBSW_NAME} PUBLIC scheduling.cpp main.cpp ObjectFactory.cpp)
|
||||
target_sources(${OBSW_NAME} PUBLIC scheduling.cpp main.cpp objectFactory.cpp)
|
||||
|
||||
add_subdirectory(fsfwconfig)
|
||||
add_subdirectory(boardconfig)
|
||||
|
@ -101,7 +101,7 @@
|
||||
/** CMake Defines */
|
||||
/*******************************************************************/
|
||||
|
||||
#define OBSW_ADD_TMTC_UDP_SERVER 1
|
||||
#define OBSW_ADD_TMTC_UDP_SERVER 0
|
||||
#define OBSW_ADD_TMTC_TCP_SERVER 1
|
||||
|
||||
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ObjectFactory.h"
|
||||
#include "objectFactory.h"
|
||||
|
||||
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
||||
@ -61,14 +61,14 @@ void ObjectFactory::produce(void* args) {
|
||||
CfdpTmFunnel* cfdpFunnel;
|
||||
StorageManagerIF* tmStore;
|
||||
StorageManagerIF* ipcStore;
|
||||
PersistentTmStores persistentStores;
|
||||
PersistentTmStores persistentStores{};
|
||||
bool enableHkSets = false;
|
||||
#if OBSW_ENABLE_PERIODIC_HK == 1
|
||||
enableHkSets = true;
|
||||
#endif
|
||||
auto sdcMan = new DummySdCardManager("/tmp");
|
||||
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel, *sdcMan, &ipcStore,
|
||||
&tmStore, persistentStores, 120, enableHkSets);
|
||||
&tmStore, persistentStores, 120, enableHkSets, false);
|
||||
|
||||
new TmFunnelHandler(objects::LIVE_TM_TASK, *pusFunnel, *cfdpFunnel);
|
||||
auto* dummyGpioIF = new DummyGpioIF();
|
@ -13,8 +13,8 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "ObjectFactory.h"
|
||||
#include "mission/scheduling.h"
|
||||
#include "objectFactory.h"
|
||||
#include "scheduling.h"
|
||||
|
||||
#ifdef LINUX
|
||||
@ -69,21 +69,25 @@ void scheduling::initTasks() {
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Adding CFDP distributor failed" << std::endl;
|
||||
}
|
||||
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||
result = tmtcDistributor->addComponent(objects::UDP_TMTC_SERVER);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "adding UDP server failed" << std::endl;
|
||||
}
|
||||
#endif
|
||||
result = tmtcDistributor->addComponent(objects::TCP_TMTC_SERVER);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "adding TCP server failed" << std::endl;
|
||||
}
|
||||
|
||||
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||
PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
|
||||
"UDP_POLLING", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||
result = udpPollingTask->addComponent(objects::UDP_TMTC_POLLING_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::error << "Add component UDP Polling failed" << std::endl;
|
||||
}
|
||||
#endif
|
||||
PeriodicTaskIF* tcpPollingTask = factory->createPeriodicTask(
|
||||
"TCP_POLLING", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||
result = tcpPollingTask->addComponent(objects::TCP_TMTC_POLLING_TASK);
|
||||
@ -92,7 +96,7 @@ void scheduling::initTasks() {
|
||||
}
|
||||
|
||||
PeriodicTaskIF* liveTmTask = factory->createPeriodicTask(
|
||||
"LIVE_TM", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, nullptr, &RR_SCHEDULING);
|
||||
"LIVE_TM", 55, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, nullptr, &RR_SCHEDULING);
|
||||
result = liveTmTask->addComponent(objects::LIVE_TM_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("LIVE_TM", objects::LIVE_TM_TASK);
|
||||
@ -179,6 +183,28 @@ void scheduling::initTasks() {
|
||||
}
|
||||
#endif
|
||||
|
||||
// If those are added at a later stage..
|
||||
/*
|
||||
PeriodicTaskIF* logTmTask = factory->createPeriodicTask(
|
||||
"LOG_PSTORE", 0, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, nullptr);
|
||||
result = logTmTask->addComponent(objects::LOG_STORE_AND_TM_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("LOG_STORE_AND_TM", objects::LOG_STORE_AND_TM_TASK);
|
||||
}
|
||||
PeriodicTaskIF* hkTmTask =
|
||||
factory->createPeriodicTask("HK_PSTORE", 0, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, nullptr);
|
||||
result = hkTmTask->addComponent(objects::HK_STORE_AND_TM_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("HK_STORE_AND_TM", objects::HK_STORE_AND_TM_TASK);
|
||||
}
|
||||
PeriodicTaskIF* cfdpTmTask = factory->createPeriodicTask(
|
||||
"CFDP_PSTORE", 0, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, nullptr);
|
||||
result = cfdpTmTask->addComponent(objects::CFDP_STORE_AND_TM_TASK);
|
||||
if (result != returnvalue::OK) {
|
||||
scheduling::printAddObjectError("CFDP_STORE_AND_TM", objects::CFDP_STORE_AND_TM_TASK);
|
||||
}
|
||||
*/
|
||||
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
||||
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||
@ -218,7 +244,9 @@ void scheduling::initTasks() {
|
||||
|
||||
sif::info << "Starting tasks.." << std::endl;
|
||||
tmtcDistributor->startTask();
|
||||
#if OBSW_ADD_TMTC_UDP_SERVER == 1
|
||||
udpPollingTask->startTask();
|
||||
#endif
|
||||
tcpPollingTask->startTask();
|
||||
liveTmTask->startTask();
|
||||
|
||||
@ -228,6 +256,12 @@ void scheduling::initTasks() {
|
||||
pstTask->startTask();
|
||||
thermalTask->startTask();
|
||||
dummyTask->startTask();
|
||||
|
||||
// If those are added at a later stage..
|
||||
//logTmTask->startTask();
|
||||
//cfdpTmTask->startTask();
|
||||
//hkTmTask->startTask();
|
||||
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||
supvHelperTask->startTask();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user