schedule new COM helper
This commit is contained in:
parent
d85fb18112
commit
fd235488f7
@ -204,12 +204,13 @@ void scheduling::initTasks() {
|
|||||||
scheduling::printAddObjectError("CFDP_STORE_AND_TM", objects::CFDP_STORE_AND_TM_TASK);
|
scheduling::printAddObjectError("CFDP_STORE_AND_TM", objects::CFDP_STORE_AND_TM_TASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Use user priorities for this task.
|
||||||
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
#if OBSW_ADD_CFDP_COMPONENTS == 1
|
||||||
PeriodicTaskIF* cfdpTask = factory->createPeriodicTask(
|
PeriodicTaskIF* cfdpTask = factory->createPeriodicTask(
|
||||||
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
"CFDP", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
scheduling::printAddObjectError("CFDP", objects::CFDP_HANDLER);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -231,7 +232,7 @@ void scheduling::initTasks() {
|
|||||||
|
|
||||||
#if OBSW_ADD_RW == 1
|
#if OBSW_ADD_RW == 1
|
||||||
PeriodicTaskIF* rwPolling = factory->createPeriodicTask(
|
PeriodicTaskIF* rwPolling = factory->createPeriodicTask(
|
||||||
"RW_POLLING_TASK", 85, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
"RW_POLLING_TASK", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
result = rwPolling->addComponent(objects::RW_POLLING_TASK);
|
result = rwPolling->addComponent(objects::RW_POLLING_TASK);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("RW_POLLING_TASK", objects::RW_POLLING_TASK);
|
scheduling::printAddObjectError("RW_POLLING_TASK", objects::RW_POLLING_TASK);
|
||||||
@ -306,6 +307,15 @@ void scheduling::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
|
PeriodicTaskIF* syrlinksCom = factory->createPeriodicTask(
|
||||||
|
"SYRLINKS_COM", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
result = syrlinksCom->addComponent(objects::SYRLINKS_COM_HANDLER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("SYRLINKS_COM", objects::SYRLINKS_COM_HANDLER);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_STAR_TRACKER == 1
|
#if OBSW_ADD_STAR_TRACKER == 1
|
||||||
// Relatively high priority to make sure STR COM works well.
|
// Relatively high priority to make sure STR COM works well.
|
||||||
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
|
||||||
@ -316,6 +326,7 @@ void scheduling::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
|
// TODO: Use regular scheduler for this task
|
||||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
|
||||||
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
@ -325,6 +336,7 @@ void scheduling::initTasks() {
|
|||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_MPSOC */
|
#endif /* OBSW_ADD_PLOC_MPSOC */
|
||||||
|
|
||||||
|
// TODO: Use regular scheduler for this task
|
||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
||||||
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
@ -335,7 +347,7 @@ void scheduling::initTasks() {
|
|||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||||
|
|
||||||
PeriodicTaskIF* plTask = factory->createPeriodicTask(
|
PeriodicTaskIF* plTask = factory->createPeriodicTask(
|
||||||
"PL_TASK", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
plTask->addComponent(objects::CAM_SWITCHER);
|
plTask->addComponent(objects::CAM_SWITCHER);
|
||||||
scheduling::addMpsocSupvHandlers(plTask);
|
scheduling::addMpsocSupvHandlers(plTask);
|
||||||
scheduling::scheduleScexDev(plTask);
|
scheduling::scheduleScexDev(plTask);
|
||||||
@ -402,6 +414,9 @@ void scheduling::initTasks() {
|
|||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
acsBrdPolling->startTask();
|
acsBrdPolling->startTask();
|
||||||
#endif
|
#endif
|
||||||
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
|
syrlinksCom->startTask();
|
||||||
|
#endif
|
||||||
#if OBSW_ADD_MGT == 1
|
#if OBSW_ADD_MGT == 1
|
||||||
imtqPolling->startTask();
|
imtqPolling->startTask();
|
||||||
#endif
|
#endif
|
||||||
@ -487,7 +502,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
|||||||
|
|
||||||
#if OBSW_ADD_I2C_TEST_CODE == 0
|
#if OBSW_ADD_I2C_TEST_CODE == 0
|
||||||
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
|
||||||
"I2C_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.4, missedDeadlineFunc);
|
"I2C_PST", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.4, missedDeadlineFunc);
|
||||||
result = pst::pstI2cProcessingSystem(i2cPst);
|
result = pst::pstI2cProcessingSystem(i2cPst);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
@ -527,11 +542,11 @@ void scheduling::createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
|||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::EVENT_MANAGER);
|
result = pusHighPrio->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
scheduling::printAddObjectError("EVENT_MGMT", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
scheduling::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
|
scheduling::printAddObjectError("PUS_TIME", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusHighPrio);
|
taskVec.push_back(pusHighPrio);
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@ ReturnValue_t SyrlinksComHandler::performOperation(uint8_t opCode) {
|
|||||||
lock->lockMutex();
|
lock->lockMutex();
|
||||||
state = State::SLEEPING;
|
state = State::SLEEPING;
|
||||||
lock->unlockMutex();
|
lock->unlockMutex();
|
||||||
readOneReply();
|
|
||||||
semaphore->acquire();
|
semaphore->acquire();
|
||||||
|
readOneReply();
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,11 @@
|
|||||||
ReturnValue_t pst::pstSyrlinks(FixedTimeslotTaskIF *thisSequence) {
|
ReturnValue_t pst::pstSyrlinks(FixedTimeslotTaskIF *thisSequence) {
|
||||||
uint32_t length = thisSequence->getPeriodMs();
|
uint32_t length = thisSequence->getPeriodMs();
|
||||||
|
|
||||||
#if OBSW_ADD_SYRLINKS == 1
|
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.2, DeviceHandlerIF::SEND_WRITE);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.4, DeviceHandlerIF::GET_WRITE);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0, DeviceHandlerIF::GET_WRITE);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.6, DeviceHandlerIF::SEND_READ);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.5, DeviceHandlerIF::SEND_READ);
|
||||||
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
thisSequence->addSlot(objects::SYRLINKS_HANDLER, length * 0.5, DeviceHandlerIF::GET_READ);
|
||||||
#endif
|
|
||||||
|
|
||||||
static_cast<void>(length);
|
static_cast<void>(length);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user