new initializeSequence func
This commit is contained in:
@ -78,8 +78,8 @@ uint32_t FixedTimeslotTask::getPeriodMs() const {
|
||||
return pst.getLengthMs();
|
||||
}
|
||||
|
||||
ReturnValue_t FixedTimeslotTask::checkAndInitializeSequence() const {
|
||||
return pst.checkAndInitializeSequence();
|
||||
ReturnValue_t FixedTimeslotTask::checkSequence() const {
|
||||
return pst.checkSequence();
|
||||
}
|
||||
|
||||
void FixedTimeslotTask::taskFunctionality() {
|
||||
@ -87,6 +87,8 @@ void FixedTimeslotTask::taskFunctionality() {
|
||||
// start time for the first entry.
|
||||
auto slotListIter = pst.current;
|
||||
|
||||
pst.intializeSequenceAfterTaskCreation();
|
||||
|
||||
//The start time for the first entry is read.
|
||||
uint32_t intervalMs = slotListIter->pollingTimeMs;
|
||||
TickType_t interval = pdMS_TO_TICKS(intervalMs);
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
|
||||
uint32_t getPeriodMs() const override;
|
||||
|
||||
ReturnValue_t checkAndInitializeSequence() const override;
|
||||
ReturnValue_t checkSequence() const override;
|
||||
|
||||
ReturnValue_t sleepFor(uint32_t ms) override;
|
||||
|
||||
|
@ -49,7 +49,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
||||
ReturnValue_t FixedTimeslotTask::checkAndInitializeSequence() const {
|
||||
ReturnValue_t FixedTimeslotTask::checkSequence() const {
|
||||
return pst.checkSequence();
|
||||
}
|
||||
|
||||
@ -58,6 +58,8 @@ void FixedTimeslotTask::taskFunctionality() {
|
||||
if (!started) {
|
||||
suspend();
|
||||
}
|
||||
|
||||
pst.intializeSequenceAfterTaskCreation();
|
||||
//The start time for the first entry is read.
|
||||
uint64_t lastWakeTime = getCurrentMonotonicTimeMs();
|
||||
uint64_t interval = pst.getIntervalToNextSlotMs();
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
virtual ReturnValue_t addSlot(object_id_t componentId, uint32_t slotTimeMs,
|
||||
int8_t executionStep);
|
||||
|
||||
virtual ReturnValue_t checkAndInitializeSequence() const;
|
||||
virtual ReturnValue_t checkSequence() const;
|
||||
|
||||
/**
|
||||
* This static function can be used as #deadlineMissedFunc.
|
||||
|
@ -52,6 +52,7 @@ void PeriodicPosixTask::taskFunctionality(void) {
|
||||
if(!started){
|
||||
suspend();
|
||||
}
|
||||
|
||||
uint64_t lastWakeTime = getCurrentMonotonicTimeMs();
|
||||
//The task's "infinite" inner loop is entered.
|
||||
while (1) {
|
||||
|
Reference in New Issue
Block a user