diff --git a/src/fsfw/osal/host/FixedTimeslotTask.cpp b/src/fsfw/osal/host/FixedTimeslotTask.cpp index 07853938..bb3ffe35 100644 --- a/src/fsfw/osal/host/FixedTimeslotTask.cpp +++ b/src/fsfw/osal/host/FixedTimeslotTask.cpp @@ -133,7 +133,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId, uint32_t slotT return HasReturnvaluesIF::RETURN_FAILED; } -ReturnValue_t FixedTimeslotTask::checkSequence() const { return pollingSeqTable.checkSequence(); } +ReturnValue_t FixedTimeslotTask::checkSequence() { return pollingSeqTable.checkSequence(); } uint32_t FixedTimeslotTask::getPeriodMs() const { return period * 1000; } @@ -176,3 +176,5 @@ bool FixedTimeslotTask::delayForInterval(chron_ms* previousWakeTimeMs, const chr (*previousWakeTimeMs) = currentStartTime; return false; } + +bool FixedTimeslotTask::isEmpty() const { return pollingSeqTable.isEmpty(); } diff --git a/src/fsfw/osal/host/FixedTimeslotTask.h b/src/fsfw/osal/host/FixedTimeslotTask.h index cdbc6f23..dac33871 100644 --- a/src/fsfw/osal/host/FixedTimeslotTask.h +++ b/src/fsfw/osal/host/FixedTimeslotTask.h @@ -59,12 +59,14 @@ class FixedTimeslotTask : public FixedTimeslotTaskIF { */ ReturnValue_t addSlot(object_id_t componentId, uint32_t slotTimeMs, int8_t executionStep); - ReturnValue_t checkSequence() const override; + ReturnValue_t checkSequence() override; uint32_t getPeriodMs() const; ReturnValue_t sleepFor(uint32_t ms); + bool isEmpty() const override; + protected: using chron_ms = std::chrono::milliseconds; diff --git a/src/fsfw/osal/host/PeriodicTask.cpp b/src/fsfw/osal/host/PeriodicTask.cpp index cdcfafa6..23736b96 100644 --- a/src/fsfw/osal/host/PeriodicTask.cpp +++ b/src/fsfw/osal/host/PeriodicTask.cpp @@ -156,3 +156,5 @@ bool PeriodicTask::delayForInterval(chron_ms* previousWakeTimeMs, const chron_ms (*previousWakeTimeMs) = currentStartTime; return false; } + +bool PeriodicTask::isEmpty() const { return objectList.empty(); } diff --git a/src/fsfw/osal/host/PeriodicTask.h b/src/fsfw/osal/host/PeriodicTask.h index 6c4d5e8b..463ab379 100644 --- a/src/fsfw/osal/host/PeriodicTask.h +++ b/src/fsfw/osal/host/PeriodicTask.h @@ -73,6 +73,7 @@ class PeriodicTask : public PeriodicTaskIF { ReturnValue_t sleepFor(uint32_t ms); + bool isEmpty() const override; protected: using chron_ms = std::chrono::milliseconds; bool started;