Module: sys_model_task¶
-
struct
ModelPriorityPair¶ - #include <sys_model_task.h>
Structure used to pair a model and its requested priority.
-
class
SysModelTask¶ - #include <sys_model_task.h>
Class used to group a set of models into one “Task” of execution.
Public Functions
-
SysModelTask()¶ The task constructor.
-
SysModelTask(uint64_t InputPeriod, uint64_t InputDelay = 0, uint64_t FirstStartTime = 0)¶ class method
A construction option that allows the user to set some task parameters. Note that the only required argument is InputPeriod.
- Parameters
InputPeriod: The amount of nanoseconds between calls to this Task.InputDelay: How long to delay the input by in nanosecondsFirstStartTime: The offset in nanoseconds in a given frame to start the Task with.
-
~SysModelTask()¶ The destructor.
-
void
AddNewObject(SysModel *NewModel, int32_t Priority = -1)¶ class method
This method adds a new model into the Task list. Note that the Priority parameter is option as it defaults to -1 (lowest, latest)
- Return
void
- Parameters
NewModel: The new model that we are adding to the TaskPriority: The selected priority of the model being added (highest goes first)
-
void
SelfInitTaskList()¶ class method
This method self-initializes all of the models that have been added to the Task.
- Return
void
-
void
CrossInitTaskList()¶ class method
This method cross-initializes all of the models that have been added to the Task.
- Return
void
-
void
ExecuteTaskList(uint64_t CurrentSimTime)¶ class method
This method executes all of the models on the Task during runtime. Then, it sets its NextStartTime appropriately.
- Return
void
- Parameters
CurrentSimNanos: The current simulation time in [ns]
-
void
ResetTaskList(uint64_t CurrentSimTime)¶ class method
This method resets all of the models that have been added to the Task at the CurrentSimTime. See sys_model_task.h for related method ResetTask()
- Return
void
- Parameters
CurrentSimTime: The time to start at after reset
-
void
ResetTask()¶ class method
-
void
enableTask()¶ class method
-
void
disableTask()¶ class method
-
void
updatePeriod(uint64_t newPeriod)¶ class method
This method changes the period of a given task over to the requested period. It attempts to keep the same offset relative to the original offset that was specified at task creation.
- Return
void
- Parameters
newPeriod: The period that the task should run at going forward
Public Members
-
std::vector<ModelPriorityPair>
TaskModels¶ Array that has pointers to all task sysModels
-
std::string
TaskName¶ Identifier for Task
-
uint64_t
NextStartTime¶ [ns] Next time to start task
-
uint64_t
NextPickupTime¶ [ns] Next time read Task outputs
-
uint64_t
TaskPeriod¶ [ns] Cycle rate for Task
-
uint64_t
PickupDelay¶ [ns] Time between dispatches
-
uint64_t
FirstTaskTime¶ [ns] Time to start Task for first time
-
bool
taskActive¶ Flag indicating whether the Task has been disabled
-
BSKLogger
bskLogger¶ BSK Logging
-