change ported to linux and rtems

This commit is contained in:
Robin Müller 2020-05-05 18:32:50 +02:00
parent 5b933dfe3d
commit 736a69795d
2 changed files with 18 additions and 7 deletions

View File

@ -40,8 +40,14 @@ uint32_t FixedTimeslotTask::getPeriodMs() const {
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId, ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
uint32_t slotTimeMs, int8_t executionStep) { uint32_t slotTimeMs, int8_t executionStep) {
if (objectManager->get<ExecutableObjectIF>(componentId) != nullptr) {
pst.addSlot(componentId, slotTimeMs, executionStep, this); pst.addSlot(componentId, slotTimeMs, executionStep, this);
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
}
error << "Component " << std::hex << componentId <<
" not found, not adding it to pst" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
} }
ReturnValue_t FixedTimeslotTask::checkSequence() const { ReturnValue_t FixedTimeslotTask::checkSequence() const {

View File

@ -66,12 +66,17 @@ ReturnValue_t PollingTask::startTask() {
} }
} }
ReturnValue_t PollingTask::addSlot(object_id_t componentId, uint32_t slotTimeMs, ReturnValue_t Polling::addSlot(object_id_t componentId,
int8_t executionStep) { uint32_t slotTimeMs, int8_t executionStep) {
if (objectManager->get<ExecutableObjectIF>(componentId) != nullptr) {
pst.addSlot(componentId, slotTimeMs, executionStep, this); pst.addSlot(componentId, slotTimeMs, executionStep, this);
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
error << "Component " << std::hex << componentId <<
" not found, not adding it to pst" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
uint32_t PollingTask::getPeriodMs() const { uint32_t PollingTask::getPeriodMs() const {
return pst.getLengthMs(); return pst.getLengthMs();
} }