generic scheduler function
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
2022-11-25 10:37:10 +01:00
parent 073ebb4afe
commit 35cd18240c
6 changed files with 53 additions and 28 deletions

View File

@ -1 +1 @@
target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp)
target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp scheduling.cpp)

View File

@ -0,0 +1,33 @@
#include "scheduling.h"
#include "fsfw/tasks/PeriodicTaskIF.h"
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
void scheduling::scheduleRtdSensors(PeriodicTaskIF* tcsTask) {
std::array<object_id_t, EiveMax31855::NUM_RTDS> rtdIds = {
objects::RTD_0_IC3_PLOC_HEATSPREADER,
objects::RTD_1_IC4_PLOC_MISSIONBOARD,
objects::RTD_2_IC5_4K_CAMERA,
objects::RTD_3_IC6_DAC_HEATSPREADER,
objects::RTD_4_IC7_STARTRACKER,
objects::RTD_5_IC8_RW1_MX_MY,
objects::RTD_6_IC9_DRO,
objects::RTD_7_IC10_SCEX,
objects::RTD_8_IC11_X8,
objects::RTD_9_IC12_HPA,
objects::RTD_10_IC13_PL_TX,
objects::RTD_11_IC14_MPA,
objects::RTD_12_IC15_ACU,
objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
objects::RTD_14_IC17_TCS_BOARD,
objects::RTD_15_IC18_IMTQ,
};
for (const auto& rtd : rtdIds) {
tcsTask->addComponent(rtd, DeviceHandlerIF::PERFORM_OPERATION);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_WRITE);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_WRITE);
tcsTask->addComponent(rtd, DeviceHandlerIF::SEND_READ);
tcsTask->addComponent(rtd, DeviceHandlerIF::GET_READ);
}
}

10
mission/core/scheduling.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef EIVE_OBSW_SCHEDULING_H
#define EIVE_OBSW_SCHEDULING_H
class PeriodicTaskIF;
namespace scheduling {
void scheduleRtdSensors(PeriodicTaskIF* periodicTask);
}
#endif // EIVE_OBSW_SCHEDULING_H