sys_process¶
-
struct ModelScheduleEntry¶
- #include <sys_process.h>
Structure that contains the information needed to call a Task.
Public Members
-
uint64_t NextTaskStart¶
Time to call Task next
-
uint64_t TaskUpdatePeriod¶
Period of update for Task
-
int32_t taskPriority¶
[-] Priority level for the task
-
SysModelTask *TaskPtr¶
Handle to the Task that needs to be called
-
uint64_t NextTaskStart¶
-
class SysProcess¶
- #include <sys_process.h>
Class used to group a set of tasks into one process (task group) of execution.
Public Functions
-
SysProcess()¶
The task constructor.
-
SysProcess(std::string messageContainer)¶
class method
Make a process AND attach a storage bucket with the provided name. Give the process the same name.
- Parameters
messageContainer – The amount of nanoseconds between calls to this Task.
- Returns
void
-
~SysProcess()¶
The destructor does nothing.
- Returns
void
-
void addNewTask(SysModelTask *newTask, int32_t taskPriority = -1)¶
class method
This method adds a new task into the Task list. Note that taskPriority parameter is option as it defaults to -1 (lowest)
- Parameters
newTask – The new task that we are adding to the list
taskPriority – The selected priority of the task being added
- Returns
void
-
void selfInitProcess()¶
class method
This method sets the nextTaskTime = 0 and calls SelfInitTaskList() for all process tasks.
- Returns
void
-
void resetProcess(uint64_t currentTime)¶
class method
This method resets each task and associated model-set inside the process ensuring that all parameters go back to their default state.
- Parameters
currentTime – Current simulation time in ns that reset is occurring at
- Returns
void
-
void reInitProcess()¶
class method
This method does two things: 1) resets the next task time for all process tasks to the first task time. 2) clears the process list and then adds everything back into the process with the correct priority.
- Returns
void
-
inline void enableProcess()¶
class method
-
inline void disableProcess()¶
class method
-
void scheduleTask(ModelScheduleEntry &taskCall)¶
class method
This method is used to place the task from the caller into the correct place in the simulation schedule. The transaction for this model is that the caller will set the correct parameters in the calling argument and that the simulation will faithfully schedule it.
- Parameters
taskCall – Pointer to a struct that contains start time and task handle.
- Returns
void
-
inline void setProcessName(std::string newName)¶
class method
-
inline std::string getProcessName()¶
class method
-
inline uint64_t getNextTime()¶
class method
-
void singleStepNextTask(uint64_t currentNanos)¶
class method
This method steps the next task up to currentNanos unless it isn’t supposed to run yet.
- Returns
void
-
inline bool processEnabled()¶
class method
-
void changeTaskPeriod(std::string taskName, uint64_t newPeriod)¶
class method
This method updates a specified task’s period once it locates that task in the list. It will warn the user if a task is not found.
- Parameters
taskName – The name of the task you want to change period of
newPeriod – the new number of nanoseconds you want between calls
- Returns
void
-
inline void setPriority(int64_t newPriority)¶
class method
-
void disableAllTasks()¶
class method
The name kind of says it all right? It is a shotgun used to disable all of a process’ tasks. It is handy for a FSW scheme where you have tons of tasks and you are really only turning one on at a time.
- Returns
void
-
void enableAllTasks()¶
class method
The name kind of says it all right? It is a shotgun used to enable all of a processes tasks. It is handy for a process that starts out almost entirely inhibited but you want to turn it all on at once.
- Returns
void
Public Members
-
std::vector<ModelScheduleEntry> processTasks¶
Array that has pointers to all process tasks
-
uint64_t nextTaskTime¶
[ns] time for the next Task
-
uint64_t prevRouteTime¶
[ns] Time that interfaces were previously routed
-
std::string processName¶
Identifier for process
-
bool processActive¶
Flag indicating whether the Process is active
-
int64_t processPriority¶
[-] Priority level for process (higher first)
-
BSKLogger bskLogger¶
BSK Logging
-
SysProcess()¶