made fixed sequence slot doc generic
This commit is contained in:
parent
92c7369276
commit
b8754fbc16
@ -1,5 +1,5 @@
|
||||
#include "../objectmanager/SystemObjectIF.h"
|
||||
#include "../tasks/FixedSequenceSlot.h"
|
||||
#include "FixedSequenceSlot.h"
|
||||
#include "PeriodicTaskIF.h"
|
||||
#include <cstddef>
|
||||
|
||||
FixedSequenceSlot::FixedSequenceSlot(object_id_t handlerId, uint32_t setTime,
|
||||
|
@ -1,8 +1,9 @@
|
||||
#ifndef FRAMEWORK_TASKS_FIXEDSEQUENCESLOT_H_
|
||||
#define FRAMEWORK_TASKS_FIXEDSEQUENCESLOT_H_
|
||||
#ifndef FSFW_TASKS_FIXEDSEQUENCESLOT_H_
|
||||
#define FSFW_TASKS_FIXEDSEQUENCESLOT_H_
|
||||
|
||||
#include "ExecutableObjectIF.h"
|
||||
#include "../objectmanager/ObjectManagerIF.h"
|
||||
#include "../tasks/ExecutableObjectIF.h"
|
||||
|
||||
class PeriodicTaskIF;
|
||||
|
||||
/**
|
||||
@ -56,4 +57,4 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#endif /* FIXEDSEQUENCESLOT_H_ */
|
||||
#endif /* FSFW_TASKS_FIXEDSEQUENCESLOT_H_ */
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "FixedSlotSequence.h"
|
||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||
#include "../tasks/FixedSlotSequence.h"
|
||||
#include <cstdlib>
|
||||
|
||||
FixedSlotSequence::FixedSlotSequence(uint32_t setLengthMs) :
|
||||
|
@ -1,26 +1,30 @@
|
||||
#ifndef FRAMEWORK_TASKS_FIXEDSLOTSEQUENCE_H_
|
||||
#define FRAMEWORK_TASKS_FIXEDSLOTSEQUENCE_H_
|
||||
#ifndef FSFW_TASKS_FIXEDSLOTSEQUENCE_H_
|
||||
#define FSFW_TASKS_FIXEDSLOTSEQUENCE_H_
|
||||
|
||||
#include "FixedSequenceSlot.h"
|
||||
#include "../objectmanager/SystemObject.h"
|
||||
#include "../tasks/FixedSequenceSlot.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
/**
|
||||
* @brief This class is the representation of a Polling Sequence Table in software.
|
||||
* @brief This class is the representation of a
|
||||
* Polling Sequence Table in software.
|
||||
* @details
|
||||
* The FixedSlotSequence object maintains the dynamic execution of
|
||||
* device handler objects.
|
||||
* objects with stricter timing requirements for the FixedTimeslotTask.
|
||||
*
|
||||
* The main idea is to create a list of device handlers, to announce all
|
||||
* handlers to thepolling sequence and to maintain a list of
|
||||
* polling slot objects. This slot list represents the Polling Sequence Table
|
||||
* in software.
|
||||
* The main idea is to create a list of executable objects (for example
|
||||
* device handlers), to announce all handlers to the polling sequence and to
|
||||
* maintain a list of polling slot objects.
|
||||
* This slot list represents the Polling Sequence Table in software.
|
||||
*
|
||||
* Each polling slot contains information to indicate when and
|
||||
* which device handler shall be executed within a given polling period.
|
||||
* The sequence is then executed by iterating through this slot list.
|
||||
* Handlers are invoking by calling a certain function stored in the handler list.
|
||||
* which executable object shall be executed within a given polling period.
|
||||
* When adding a slot, a pointer to the executing task, a pointer to the
|
||||
* executable object and a step number can be passed. The step number will be
|
||||
* passed to the periodic handler.
|
||||
* The sequence is executed by iterating through the slot sequence and
|
||||
* executing the executable object in the correct timeslot.
|
||||
*/
|
||||
class FixedSlotSequence {
|
||||
public:
|
||||
@ -29,41 +33,44 @@ public:
|
||||
|
||||
/**
|
||||
* @brief The constructor of the FixedSlotSequence object.
|
||||
*
|
||||
* @details The constructor takes two arguments, the period length and the init function.
|
||||
*
|
||||
* @param setLength The period length, expressed in ms.
|
||||
*/
|
||||
FixedSlotSequence(uint32_t setLengthMs);
|
||||
|
||||
/**
|
||||
* @brief The destructor of the FixedSlotSequence object.
|
||||
*
|
||||
* @details The destructor frees all allocated memory by iterating through the slotList
|
||||
* and deleting all allocated resources.
|
||||
* @details
|
||||
* The destructor frees all allocated memory by iterating through the
|
||||
* slotList and deleting all allocated resources.
|
||||
*/
|
||||
virtual ~FixedSlotSequence();
|
||||
|
||||
/**
|
||||
* @brief This is a method to add an PollingSlot object to slotList.
|
||||
*
|
||||
* @details Here, a polling slot object is added to the slot list. It is appended
|
||||
* @details
|
||||
* Here, a polling slot object is added to the slot list. It is appended
|
||||
* to the end of the list. The list is currently NOT reordered.
|
||||
* Afterwards, the iterator current is set to the beginning of the list.
|
||||
* @param Object ID of the object to add
|
||||
* @param setTime Value between (0 to 1) * slotLengthMs, when a FixedTimeslotTask
|
||||
* @param handlerId ID of the object to add
|
||||
* @param setTime
|
||||
* Value between (0 to 1) * slotLengthMs, when a FixedTimeslotTask
|
||||
* will be called inside the slot period.
|
||||
* @param setSequenceId ID which can be used to distinguish
|
||||
* different task operations
|
||||
* @param setSequenceId
|
||||
* ID which can be used to distinguish different task operations. This
|
||||
* value will be passed to the executable function.
|
||||
* @param
|
||||
* @param
|
||||
*/
|
||||
void addSlot(object_id_t handlerId, uint32_t setTime, int8_t setSequenceId,
|
||||
ExecutableObjectIF* executableObject, PeriodicTaskIF* executingTask);
|
||||
ExecutableObjectIF* executableObject,
|
||||
PeriodicTaskIF* executingTask);
|
||||
|
||||
/**
|
||||
* Checks if the current slot shall be executed immediately after the one before.
|
||||
* This allows to distinguish between grouped and not grouped handlers.
|
||||
* @brief Checks if the current slot shall be executed immediately
|
||||
* after the one before.
|
||||
* @details
|
||||
* This allows to distinguish between grouped and separated handlers.
|
||||
* @return - @c true if the slot has the same polling time as the previous
|
||||
* - @c false else
|
||||
*/
|
||||
@ -128,12 +135,16 @@ public:
|
||||
* @brief Check and initialize slot list.
|
||||
* @details
|
||||
* Checks if timing is ok (must be ascending) and if all handlers were found.
|
||||
* Also calls any initialization steps which are required after task
|
||||
* creation.
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t checkSequence() const;
|
||||
|
||||
/**
|
||||
* @brief Perform any initialization steps required after the executing
|
||||
* task has been created. This function should be called from the
|
||||
* executing task!
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t intializeSequenceAfterTaskCreation() const;
|
||||
|
||||
protected:
|
||||
@ -152,8 +163,6 @@ protected:
|
||||
SlotList slotList;
|
||||
|
||||
uint32_t lengthMs;
|
||||
|
||||
bool isEmpty = false;
|
||||
};
|
||||
|
||||
#endif /* FIXEDSLOTSEQUENCE_H_ */
|
||||
#endif /* FSFW_TASKS_FIXEDSLOTSEQUENCE_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user