From d62e092be6c57ccfad63d61cc5dea3e785ddad98 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Dec 2020 11:49:30 +0100 Subject: [PATCH 1/2] task convergence --- tasks/FixedTimeslotTaskIF.h | 21 ++++++++++++++++++--- tasks/TaskFactory.h | 14 ++++++++------ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/tasks/FixedTimeslotTaskIF.h b/tasks/FixedTimeslotTaskIF.h index 421978f0..a138db4e 100644 --- a/tasks/FixedTimeslotTaskIF.h +++ b/tasks/FixedTimeslotTaskIF.h @@ -1,16 +1,31 @@ #ifndef FRAMEWORK_TASKS_FIXEDTIMESLOTTASKIF_H_ #define FRAMEWORK_TASKS_FIXEDTIMESLOTTASKIF_H_ -#include "../objectmanager/ObjectManagerIF.h" #include "PeriodicTaskIF.h" +#include "../objectmanager/ObjectManagerIF.h" /** - * Following the same principle as the base class IF. This is the interface for a Fixed timeslot task + * @brief Following the same principle as the base class IF. + * This is the interface for a Fixed timeslot task */ class FixedTimeslotTaskIF : public PeriodicTaskIF { public: virtual ~FixedTimeslotTaskIF() {} - virtual ReturnValue_t addSlot(object_id_t componentId, uint32_t slotTimeMs, int8_t executionStep) = 0; + + /** + * Add an object with a slot time and the execution step to the task. + * The execution step shall be passed to the object. + * @param componentId + * @param slotTimeMs + * @param executionStep + * @return + */ + virtual ReturnValue_t addSlot(object_id_t componentId, uint32_t slotTimeMs, + int8_t executionStep) = 0; + /** + * Check whether the sequence is valid and perform all other required + * initialization steps which are needed after task creation + */ virtual ReturnValue_t checkSequence() const = 0; }; diff --git a/tasks/TaskFactory.h b/tasks/TaskFactory.h index cbf2272c..85cdda90 100644 --- a/tasks/TaskFactory.h +++ b/tasks/TaskFactory.h @@ -1,10 +1,11 @@ -#ifndef FRAMEWORK_TASKS_TASKFACTORY_H_ -#define FRAMEWORK_TASKS_TASKFACTORY_H_ +#ifndef FSFW_TASKS_TASKFACTORY_H_ +#define FSFW_TASKS_TASKFACTORY_H_ -#include #include "FixedTimeslotTaskIF.h" #include "Typedef.h" +#include + /** * Singleton Class that produces Tasks. */ @@ -48,10 +49,11 @@ public: /** * Function to be called to delete a task - * @param task The pointer to the task that shall be deleted, NULL specifies current Task + * @param task The pointer to the task that shall be deleted, + * nullptr specifies current Task * @return Success of deletion */ - static ReturnValue_t deleteTask(PeriodicTaskIF* task = NULL); + static ReturnValue_t deleteTask(PeriodicTaskIF* task = nullptr); /** * Function to be called to delay current task @@ -69,4 +71,4 @@ private: }; -#endif /* FRAMEWORK_TASKS_TASKFACTORY_H_ */ +#endif /* FSFW_TASKS_TASKFACTORY_H_ */ From 103d8b8c6a1669c6dabf2d10b7b20505088fe58c Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Tue, 15 Dec 2020 15:12:31 +0100 Subject: [PATCH 2/2] fixed timeslot task IF --- tasks/FixedTimeslotTaskIF.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/FixedTimeslotTaskIF.h b/tasks/FixedTimeslotTaskIF.h index a138db4e..2fc7e092 100644 --- a/tasks/FixedTimeslotTaskIF.h +++ b/tasks/FixedTimeslotTaskIF.h @@ -14,7 +14,8 @@ public: /** * Add an object with a slot time and the execution step to the task. - * The execution step shall be passed to the object. + * The execution step will be passed to the object (e.g. as an operation + * code in #performOperation) * @param componentId * @param slotTimeMs * @param executionStep