comntinued scex handler
This commit is contained in:
@ -81,37 +81,31 @@ void initmission::initTasks() {
|
||||
#if OBSW_ADD_SCEX == 1
|
||||
PeriodicTaskIF* scexDevHandler = factory->createPeriodicTask(
|
||||
"SCEX_DEV", 35, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
|
||||
result = tmtcPollingTask->addComponent(objects::SCEX, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::PERFORM_OPERATION);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||
}
|
||||
result = tmtcPollingTask->addComponent(objects::SCEX, DeviceHandlerIF::SEND_WRITE);
|
||||
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::SEND_WRITE);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||
}
|
||||
result = tmtcPollingTask->addComponent(objects::SCEX, DeviceHandlerIF::GET_WRITE);
|
||||
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_WRITE);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||
}
|
||||
result = tmtcPollingTask->addComponent(objects::SCEX, DeviceHandlerIF::SEND_READ);
|
||||
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::SEND_READ);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||
}
|
||||
result = tmtcPollingTask->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ);
|
||||
|
||||
#if OBSW_ADD_SCEX_READER == 1
|
||||
result = HasReturnvaluesIF::RETURN_OK;
|
||||
PeriodicTaskIF* scexReaderTask = factory->createPeriodicTask(
|
||||
"SCEX_UART_READER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||
result = scexReaderTask->addComponent(objects::SCEX_UART_READER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("SCEX_UART_READER", objects::SCEX_UART_READER);
|
||||
}
|
||||
sif::info << "Starting tasks.." << std::endl;
|
||||
tmTcDistributor->startTask();
|
||||
tmtcBridgeTask->startTask();
|
||||
tmtcPollingTask->startTask();
|
||||
PeriodicTaskIF* scexReaderTask = factory->createPeriodicTask(
|
||||
"SCEX_UART_READER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||
result = scexReaderTask->addComponent(objects::SCEX_UART_READER);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
initmission::printAddObjectError("SCEX_UART_READER", objects::SCEX_UART_READER);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* PUS Services */
|
||||
@ -148,6 +142,7 @@ void initmission::initTasks() {
|
||||
|
||||
#if OBSW_ADD_SCEX == 1
|
||||
scexDevHandler->startTask();
|
||||
scexReaderTask->startTask();
|
||||
#endif
|
||||
#if OBSW_ADD_TEST_PST == 1
|
||||
if (startTestPst) {
|
||||
@ -235,9 +230,12 @@ void initmission::createPstTasks(TaskFactory& factory,
|
||||
"SPI_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
|
||||
result = pst::pstSpi(spiPst);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
||||
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
||||
}
|
||||
} else {
|
||||
taskVec.push_back(spiPst);
|
||||
}
|
||||
taskVec.push_back(spiPst);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user