rename scheduling file
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
c731418b65
commit
f771fefbc9
@ -1,4 +1,4 @@
|
||||
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp InitMission.cpp
|
||||
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp scheduling.cpp
|
||||
ObjectFactory.cpp)
|
||||
|
||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE InitMission.cpp)
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "bsp_q7s/core/InitMission.h"
|
||||
#include "scheduling.h"
|
||||
|
||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||
#include <linux/scheduling.h>
|
||||
@ -35,13 +35,13 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
||||
|
||||
ObjectManagerIF* objectManager = nullptr;
|
||||
|
||||
void initmission::initMission() {
|
||||
void scheduling::initMission() {
|
||||
sif::info << "Building global objects.." << std::endl;
|
||||
try {
|
||||
/* Instantiate global object manager and also create all objects */
|
||||
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||
} catch (const std::invalid_argument& e) {
|
||||
sif::error << "initmission::initMission: Object Construction failed with an "
|
||||
sif::error << "scheduling::initMission: Object Construction failed with an "
|
||||
"invalid argument: "
|
||||
<< e.what();
|
||||
std::exit(1);
|
||||
@ -54,7 +54,7 @@ void initmission::initMission() {
|
||||
initTasks();
|
||||
}
|
||||
|
||||
void initmission::initTasks() {
|
||||
void scheduling::initTasks() {
|
||||
TaskFactory* factory = TaskFactory::instance();
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
if (factory == nullptr) {
|
||||
@ -373,8 +373,7 @@ void initmission::initTasks() {
|
||||
sif::info << "Tasks started.." << std::endl;
|
||||
}
|
||||
|
||||
void initmission::createPstTasks(TaskFactory& factory,
|
||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||
void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
/* Polling Sequence Table Default */
|
||||
@ -384,9 +383,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
||||
result = pst::pstSpi(spiPst);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
||||
sif::warning << "scheduling::initTasks: SPI PST is empty" << std::endl;
|
||||
} else {
|
||||
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
|
||||
sif::error << "scheduling::initTasks: Creating SPI PST failed!" << std::endl;
|
||||
}
|
||||
} else {
|
||||
taskVec.push_back(spiPst);
|
||||
@ -399,9 +398,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
||||
result = pst::pstSpiRw(rwPstTask);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
||||
sif::warning << "scheduling::initTasks: SPI PST is empty" << std::endl;
|
||||
} else {
|
||||
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
|
||||
sif::error << "scheduling::initTasks: Creating SPI PST failed!" << std::endl;
|
||||
}
|
||||
} else {
|
||||
taskVec.push_back(rwPstTask);
|
||||
@ -413,9 +412,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
||||
result = pst::pstUart(uartPst);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::warning << "InitMission::initTasks: UART PST is empty" << std::endl;
|
||||
sif::warning << "scheduling::initTasks: UART PST is empty" << std::endl;
|
||||
} else {
|
||||
sif::error << "InitMission::initTasks: Creating UART PST failed!" << std::endl;
|
||||
sif::error << "scheduling::initTasks: Creating UART PST failed!" << std::endl;
|
||||
}
|
||||
} else {
|
||||
taskVec.push_back(uartPst);
|
||||
@ -427,9 +426,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
||||
result = pst::pstI2c(i2cPst);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::warning << "InitMission::initTasks: I2C PST is empty" << std::endl;
|
||||
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;
|
||||
} else {
|
||||
sif::error << "InitMission::initTasks: Creating I2C PST failed!" << std::endl;
|
||||
sif::error << "scheduling::initTasks: Creating I2C PST failed!" << std::endl;
|
||||
}
|
||||
} else {
|
||||
taskVec.push_back(i2cPst);
|
||||
@ -442,15 +441,14 @@ void initmission::createPstTasks(TaskFactory& factory,
|
||||
result = pst::pstGompaceCan(gomSpacePstTask);
|
||||
if (result != returnvalue::OK) {
|
||||
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
|
||||
sif::error << "scheduling::initTasks: GomSpace PST initialization failed!" << std::endl;
|
||||
}
|
||||
}
|
||||
taskVec.push_back(gomSpacePstTask);
|
||||
#endif
|
||||
}
|
||||
|
||||
void initmission::createPusTasks(TaskFactory& factory,
|
||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||
void scheduling::createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
/* PUS Services */
|
||||
@ -530,7 +528,7 @@ void initmission::createPusTasks(TaskFactory& factory,
|
||||
taskVec.push_back(pusLowPrio);
|
||||
}
|
||||
|
||||
void initmission::createTestTasks(TaskFactory& factory,
|
||||
void scheduling::createTestTasks(TaskFactory& factory,
|
||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
@ -8,7 +8,7 @@
|
||||
class PeriodicTaskIF;
|
||||
class TaskFactory;
|
||||
|
||||
namespace initmission {
|
||||
namespace scheduling {
|
||||
void initMission();
|
||||
void initTasks();
|
||||
|
||||
@ -18,6 +18,6 @@ void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadl
|
||||
std::vector<PeriodicTaskIF*>& taskVec);
|
||||
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||
std::vector<PeriodicTaskIF*>& taskVec);
|
||||
}; // namespace initmission
|
||||
}; // namespace scheduling
|
||||
|
||||
#endif /* BSP_Q7S_INITMISSION_H_ */
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "commonConfig.h"
|
||||
#include "core/InitMission.h"
|
||||
#include "core/scheduling.h"
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
#include "fsfw/version.h"
|
||||
#include "q7sConfig.h"
|
||||
@ -36,7 +36,7 @@ int obsw::obsw() {
|
||||
return OBSW_ALREADY_RUNNING;
|
||||
}
|
||||
#endif
|
||||
initmission::initMission();
|
||||
scheduling::initMission();
|
||||
|
||||
for (;;) {
|
||||
/* Suspend main thread by sleeping it. */
|
||||
|
Loading…
Reference in New Issue
Block a user