ACS Update scheduling
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2023-02-02 17:06:26 +01:00
parent 2b00d3a565
commit c2fb224fea
4 changed files with 462 additions and 452 deletions

View File

@ -144,11 +144,25 @@ void scheduling::initTasks() {
#endif
PeriodicTaskIF* comTask = factory->createPeriodicTask(
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
"COM_TASK", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = comTask->addComponent(objects::COM_SUBSYSTEM);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("COM subsystem", objects::COM_SUBSYSTEM);
}
#if OBSW_ADD_SYRLINKS == 1
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::PERFORM_OPERATION);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_WRITE);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_WRITE);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_READ);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_READ);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::PERFORM_OPERATION);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_WRITE);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_WRITE);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::SEND_READ);
comTask->addComponent(objects::SYRLINKS_HANDLER, DeviceHandlerIF::GET_READ);
#endif
#if OBSW_ADD_CCSDS_IP_CORES == 1
result = comTask->addComponent(objects::CCSDS_HANDLER);
if (result != returnvalue::OK) {
@ -182,12 +196,6 @@ void scheduling::initTasks() {
}
#endif /* OBSW_ADD_GPS_CTRL */
#if OBSW_ADD_ACS_CTRL == 1
acsCtrlTask->addComponent(objects::ACS_CONTROLLER);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
}
#endif
#if OBSW_Q7S_EM == 1
acsCtrlTask->addComponent(objects::MGM_0_LIS3_HANDLER);
acsCtrlTask->addComponent(objects::MGM_1_RM3100_HANDLER);
@ -438,10 +446,24 @@ void scheduling::initTasks() {
void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = returnvalue::OK;
FixedTimeslotTaskIF* acsPst = factory.createFixedTimeslotTask(
"ACS_PST", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
result = pst::pstAcs(acsPst);
if (result != returnvalue::OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "scheduling::initTasks: ACS PST is empty" << std::endl;
} else {
sif::error << "scheduling::initTasks: Creating ACS PST failed!" << std::endl;
}
} else {
taskVec.push_back(acsPst);
}
/* Polling Sequence Table Default */
#if OBSW_ADD_SPI_TEST_CODE == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"MAIN_SPI", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
"MAIN_SPI", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
result = pst::pstSpi(spiPst);
if (result != returnvalue::OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
@ -454,37 +476,9 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
}
#endif
#if OBSW_ADD_RW == 1
FixedTimeslotTaskIF* rwPstTask = factory.createFixedTimeslotTask(
"RW_SPI", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 1.0, missedDeadlineFunc);
result = pst::pstSpiRw(rwPstTask);
if (result != returnvalue::OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "scheduling::initTasks: SPI PST is empty" << std::endl;
} else {
sif::error << "scheduling::initTasks: Creating SPI PST failed!" << std::endl;
}
} else {
taskVec.push_back(rwPstTask);
}
#endif
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
"UART_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstUart(uartPst);
if (result != returnvalue::OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "scheduling::initTasks: UART PST is empty" << std::endl;
} else {
sif::error << "scheduling::initTasks: Creating UART PST failed!" << std::endl;
}
} else {
taskVec.push_back(uartPst);
}
#if OBSW_ADD_I2C_TEST_CODE == 0
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
"I2C_PST", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
"I2C_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstI2c(i2cPst);
if (result != returnvalue::OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
@ -499,7 +493,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
#if OBSW_ADD_GOMSPACE_PCDU == 1
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
"GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
"GS_PST_TASK", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
result = pst::pstGompaceCan(gomSpacePstTask);
if (result != returnvalue::OK) {
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {