Heater Handling #325
@ -14,6 +14,7 @@
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "ObjectFactory.h"
|
||||
#include "mission/core/scheduling.h"
|
||||
#include "scheduling.h"
|
||||
|
||||
#ifdef LINUX
|
||||
@ -183,6 +184,10 @@ void scheduling::initTasks() {
|
||||
}
|
||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||
|
||||
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
|
||||
"TCS_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
|
||||
scheduling::scheduleRtdSensors(tcsTask);
|
||||
|
||||
sif::info << "Starting tasks.." << std::endl;
|
||||
tmtcDistributor->startTask();
|
||||
tmtcPollingTask->startTask();
|
||||
@ -195,6 +200,7 @@ void scheduling::initTasks() {
|
||||
|
||||
pstTask->startTask();
|
||||
thermalTask->startTask();
|
||||
tcsTask->startTask();
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||
supvHelperTask->startTask();
|
||||
#endif
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
|
||||
#include "fsfw/tasks/PeriodicTaskIF.h"
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
#include "mission/core/scheduling.h"
|
||||
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
||||
#include "mission/utility/InitMission.h"
|
||||
#include "pollingsequence/pollingSequenceFactory.h"
|
||||
@ -202,32 +203,7 @@ void initmission::initTasks() {
|
||||
|
||||
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
|
||||
"TCS_TASK", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||
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);
|
||||
}
|
||||
scheduling::scheduleTempSensors(tcsTask);
|
||||
#endif
|
||||
|
||||
PeriodicTaskIF* tcsSystemTask = factory->createPeriodicTask(
|
||||
|
@ -32,7 +32,7 @@ ReturnValue_t Max31865Dummy::initializeLocalDataPool(localpool::DataPool &localD
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE),
|
||||
new PoolEntry<uint8_t>({0}));
|
||||
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
|
||||
return DeviceHandlerBase::initializeLocalDataPool(localDataPoolMap, poolManager);
|
||||
return OK;
|
||||
}
|
||||
LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; }
|
||||
Max31865Dummy::Max31865Dummy(object_id_t objectId, CookieIF *cookie)
|
||||
|
@ -1 +1 @@
|
||||
target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp)
|
||||
target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp scheduling.cpp)
|
||||
|
33
mission/core/scheduling.cpp
Normal file
33
mission/core/scheduling.cpp
Normal 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
10
mission/core/scheduling.h
Normal 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
|
Loading…
Reference in New Issue
Block a user