![]() |
ModelSpace
Documentation for ModelSpace models and classes.
|
Simple implementation of the scheduler class. More...
#include <SimScheduler.h>

Classes | |
| struct | Inputs |
| struct | Outputs |
| struct | Params |
| Signal name Type Default. More... | |
Public Member Functions | |
| SimScheduler (SimulationExecutive &executive) | |
| Constructor for the scheduler. More... | |
| int16 | startup () override |
| Function to start and configure the scheduler prior to run. More... | |
| int16 | step (const clockwerk::Time &step_size=clockwerk::Time(0, 999999999+1)) override |
| Function to step the scheduler by a single step. More... | |
| int16 | run () override |
| Function to run the scheduler until pre-determined end conditions identified/calculated by the scheduler. More... | |
| int16 | registerApp (cfspp::App &app, int16 slot) override |
| Function to register apps with the scheduler. Depending on the scheduler implementation these may be unused. More... | |
| const std::vector< cfspp::App * > & | allApps () |
| Handle to acquire access to all apps. More... | |
| log_level_e | logLevel () |
| Get the log level set for the executive. More... | |
| void | logLevel (log_level_e log_level) |
| Set the executive log level. More... | |
Public Member Functions inherited from cfspp::Scheduler | |
| Scheduler () | |
| Constructor for the scheduler. More... | |
| virtual int16 | unregisterApp (int16 slot) |
| Function to unregister a certain schedule slot. More... | |
| void | terminate () |
| Terminate the scheduler. More... | |
| bool | isTerminated () |
| Get whether scheduler is terminated. More... | |
| void | setExecutive (FlightExecutive *exc) |
| Set the flight executive for the scheduler. More... | |
Public Member Functions inherited from clockwerk::GraphTreeObject | |
| GraphTreeObject (const char *gt_nme="", GraphTreeObject **storage_array=nullptr, uint32 storage_size=0) | |
| Name-based constructor for GraphTreeObject which will have no children by default. More... | |
| virtual | ~GraphTreeObject () |
| Destructor. More... | |
| GraphTreeObject * | parent () |
| Functions to get object's parent/children. More... | |
| GraphTreeObject ** | children () |
| GraphTreeObject * | childAtIndex (uint8 i) const |
| int16 | parent (GraphTreeObject *new_parent) |
| Function to assign the node's parent via pointer. More... | |
| int16 | parent (GraphTreeObject &new_parent) |
| Function to assign the node's parent via reference. More... | |
| uint8 | nChildren () const |
| Getters for number of children and descendants. More... | |
| uint16 | nDescendants () const |
| uint8 | capacity () const |
| const char * | name () const |
| Getter and setter for object name. More... | |
| int16 | name (const char *new_name) |
| uint8 | rank () |
| Getter for the object rank. More... | |
| int8 | type () |
| Function to indicate type – -1 by default unless implemented downstream. More... | |
| bool | loggable () |
| Getter for object logability flag – note no setter because should only be set by this or a derived class in its definition. More... | |
| GraphTreeObject * | getRootDataPointer () |
| Get the pointer to the highest object in the graph tree. More... | |
| virtual int16 | str (char *output, size_t size) const |
| Get object represented as string. More... | |
| virtual int16 | fromStr (const char *val) |
| Set value of graphtreeobject from string. More... | |
Public Attributes | |
| Params | params = Params(this, "params") |
| Inputs | inputs = Inputs(this, "inputs") |
| Outputs | outputs = Outputs(this, "outputs") |
| modelspace::SimTimeManager | time |
| Time manager to handle all time in the scheduler. More... | |
Protected Member Functions | |
| int | _executeAppThread (std::vector< cfspp::App * > &app_thread) |
| Function to execute a single app thread. More... | |
Protected Member Functions inherited from clockwerk::GraphTreeObject | |
| int16 | _setStorage (GraphTreeObject **storage_array, uint8 storage_size) |
| Getter for object's string address. More... | |
| void | _recalculateDescendants () |
| Function to recursively re-calculate the number of descendants of a given node on the tree. More... | |
| void | _recalculateRank () |
| Function to recursively re-calculate the rank of a given node on the tree. More... | |
| int16 | _addChild (GraphTreeObject *child) |
| Function to decompose a string into a series of substrings via indexing. More... | |
| int16 | _removeChild (GraphTreeObject *child) |
| Function to remove a child from the graph node's children. More... | |
Protected Attributes | |
| std::vector< cfspp::App * > | _all_apps |
| Vectors to store the sequences for each element of the simulation scheduler. More... | |
| std::vector< cfspp::App * > | _startup |
| std::vector< std::vector< cfspp::App * > > | _start_step |
| std::vector< std::vector< cfspp::App * > > | _derivative |
| std::vector< std::vector< cfspp::App * > > | _end_step |
| int16 | _error |
| Variable to catch errors from stuff. More... | |
| SixDOFDynamicsModel | _dynamics |
| Our 6-DOF dynamics model. More... | |
| bool | _is_first_step = true |
| clockwerk::Time | _sim_time_step |
| clockwerk::Time | _real_time_step |
| clockwerk::Time | _next_time |
| SimulationExecutive & | exc |
| log_level_e | _local_log_level = log_level_e::LOG_WARNING |
| The log level for this particular app. More... | |
Protected Attributes inherited from cfspp::Scheduler | |
| bool | _is_terminated = false |
| Flag to indicate whether the scheduler is terminated. More... | |
| FlightExecutive * | _exc_ptr |
| Pointer to the executive which may optionally be registered with scheduler. More... | |
Protected Attributes inherited from clockwerk::GraphTreeObject | |
| GraphTreeObject * | _parent = nullptr |
| GraphTreeObject ** | _children_ptr = nullptr |
| uint32 | _max_num_children = 0 |
| uint16 | _num_descendants = 0 |
| char | _name [MAXIMUM_NAME_CHARS] = "" |
| String name for object. More... | |
| uint8 | _num_children = 0 |
| Number of direct children of the tree (not including the tree itself) More... | |
| uint8 | _rank = 0 |
| int8 | _graph_tree_type = BASE_GRAPH_TREE |
| Variable to store graph tree object type. More... | |
| bool | _loggable = false |
| Variable to indicate whether the selected object is loggable. Set to false by default. More... | |
| uint32 | _index = 0 |
| Index pointing to the next write location for the graph tree children. More... | |
Simple implementation of the scheduler class.
This class is a base implementation of scheduler. It is an empty base class and cannot be used without implementation in a derived child class. The scheduler is used to execute modelsand apps in a sequence and format as defined in the derived scheduler class. Note: This scheduler is intended for use explicitly in simulation with the 6-DOF dynamics model. It manually adds the 6-DOF dynamics and uses it internally for time and integrator calculations.
| modelspace::SimScheduler::SimScheduler | ( | SimulationExecutive & | executive | ) |
Constructor for the scheduler.
|
protected |
Function to execute a single app thread.
| app_thread | The app thread to execute |
|
inline |
Handle to acquire access to all apps.
|
inline |
Get the log level set for the executive.
|
inline |
Set the executive log level.
| log_level | The level to set logging to |
|
overridevirtual |
Function to register apps with the scheduler. Depending on the scheduler implementation these may be unused.
| app | The app to register |
Reimplemented from cfspp::Scheduler.
|
overridevirtual |
Function to run the scheduler until pre-determined end conditions identified/calculated by the scheduler.
Reimplemented from cfspp::Scheduler.
|
overridevirtual |
Function to start and configure the scheduler prior to run.
Reimplemented from cfspp::Scheduler.
|
overridevirtual |
Function to step the scheduler by a single step.
| step_size | The step size (as a time object) to step the sim by. Any nsec value greater than NSEC_MAX will cause step to take the input step size, which is the default behavior. Setting time to a valid time will step by that time rather than the input value. |
Reimplemented from cfspp::Scheduler.
|
protected |
Vectors to store the sequences for each element of the simulation scheduler.
|
protected |
|
protected |
Our 6-DOF dynamics model.
|
protected |
|
protected |
Variable to catch errors from stuff.
|
protected |
|
protected |
The log level for this particular app.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| modelspace::SimTimeManager modelspace::SimScheduler::time |
Time manager to handle all time in the scheduler.