![]() |
WarpTwin
Documentation for WarpTwin models and classes.
|
Executive derivation specifically to run flight systems. More...
#include <FlightExecutive.h>

Public Member Functions | |
| FlightExecutive (warpos::Setup &setup, warpos::Scheduler &schedule, bool delay_parent_assignment=false) | |
| Only valid FlightExecutive constructor. | |
| FlightExecutive (const FlightExecutive &original) | |
| const FlightExecutive & | operator= (const FlightExecutive &original) |
| virtual | ~FlightExecutive () |
| warpos::Setup & | setup () |
| Handle to the current system setup. | |
| warpos::Scheduler & | schedule () |
| Handle to the current system schedule. | |
| warpos::OS & | os () |
| Handle to the current system OS. | |
| warpos::Platform & | platform () |
| Handle to the current system platform. | |
| warpos::TelemetryManager & | telemetryManager () |
| Handle to the telemetry manager. | |
| warpos::StorageManager & | storageManager () |
| Handle to the storage manager. | |
| warpos::CommandManager & | commandManager () |
| Handle to the command manager. | |
| int16 | registerTlm (uint16 apid, uint8 instance=0) |
| Register telemetry packet with storage and telemetry managers. | |
| int16 | sendStoreTlm (const cmd_tlm_base &pkt, uint8 instance=0) |
| Send packet to telemetry and storage managers for send/store. | |
| int16 | startup () |
| Initialize the FlightExecutive and all elements therein. | |
| int16 | step (const clockwerk::Time &step_val) |
| Step the FlightExecutive forward by a single step. | |
| int16 | run () |
| Run the FlightExecutive until the terminate flag is raised. | |
| log_level_e | logLevel () |
| Get the log level set for the executive. | |
| void | logLevel (log_level_e log_level) |
| Set the executive log level. | |
| int16 | registerApp (warpos::App &app) |
| Register an app with the flight executive. | |
| int16 | getAppPointer (uint16 apid, uint8 instance, warpos::App *&app_ptr) |
| Get pointer to a registered app based on its apid and instance number. | |
| warpos::App ** | getRegistry () |
| Get pointer to app registry, used for testing. | |
| 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. | |
| virtual | ~GraphTreeObject () |
| Destructor. | |
| GraphTreeObject * | parent () |
| Functions to get object's parent/children. | |
| GraphTreeObject ** | children () |
| GraphTreeObject * | childAtIndex (uint8 i) const |
| int16 | parent (GraphTreeObject *new_parent) |
| Function to assign the node's parent via pointer. | |
| int16 | parent (GraphTreeObject &new_parent) |
| Function to assign the node's parent via reference. | |
| uint8 | nChildren () const |
| Getters for number of children and descendants. | |
| uint16 | nDescendants () const |
| uint8 | capacity () const |
| const char * | name () const |
| Getter and setter for object name. | |
| int16 | name (const char *new_name) |
| uint8 | rank () |
| Getter for the object rank. | |
| int8 | type () |
| Function to indicate type – -1 by default unless implemented downstream. | |
| bool | loggable () |
| Getter for object logability flag – note no setter because should only be set by this or a derived class in its definition. | |
| GraphTreeObject * | getRootDataPointer () |
| Get the pointer to the highest object in the graph tree. | |
| virtual int16 | str (char *output, size_t size) const |
| Get object represented as string. | |
| virtual int16 | fromStr (const char *val) |
| Set value of graphtreeobject from string. | |
Protected Attributes | |
| warpos::Setup & | _setup |
| System setup, which implicitly contains OS and Platform. | |
| warpos::Scheduler & | _scheduler |
| System schedule, which determines what apps and functions run when. | |
| uint16 | _registered_app_idx = 0 |
| Index of last registered app. | |
| App * | _registered_apps [MAXIMUM_FLIGHT_EXECUTIVE_CHILDREN] = {nullptr} |
| Buffer of pointers to registered apps. | |
| warpos::TelemetryManager | _telemetry_manager |
| The telemetry manager for the flight executive. | |
| warpos::StorageManager | _storage_manager |
| The storage manager for the flight executive. | |
| warpos::CommandManager | _command_manager |
| The command manager for the flight executive. | |
| log_level_e | _exc_log_level = log_level_e::LOG_INFO |
| GraphTreeObject * | _fexec_children [MAXIMUM_FLIGHT_EXECUTIVE_CHILDREN] |
| Local storage for App children so it can live on the graph tree. | |
| 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. | |
| uint8 | _num_children = 0 |
| Number of direct children of the tree (not including the tree itself). | |
| uint8 | _rank = 0 |
| int8 | _graph_tree_type = BASE_GRAPH_TREE |
| Variable to store graph tree object type. | |
| bool | _loggable = false |
| Variable to indicate whether the selected object is loggable. Set to false by default. | |
| uint32 | _index = 0 |
| Index pointing to the next write location for the graph tree children. | |
Additional Inherited Members | |
| Protected Member Functions inherited from clockwerk::GraphTreeObject | |
| int16 | _setStorage (GraphTreeObject **storage_array, uint8 storage_size) |
| Getter for object's string address. | |
| void | _recalculateDescendants () |
| Function to recursively re-calculate the number of descendants of a given node on the tree. | |
| void | _recalculateRank () |
| Function to recursively re-calculate the rank of a given node on the tree. | |
| int16 | _addChild (GraphTreeObject *child) |
| Function to decompose a string into a series of substrings via indexing. | |
| int16 | _removeChild (GraphTreeObject *child) |
| Function to remove a child from the graph node's children. | |
Executive derivation specifically to run flight systems.
The flight executive is a special instance of the clockwerk executive derived for running flight systems. FlightExecutive contains handles to its internal "setup" which configures routing for commands, telemetry, etc. as well as OSAL and HAL items.
Flight executive also holds the telemetry, storage, and command manager tasks for access in all Apps.
| warpos::FlightExecutive::FlightExecutive | ( | warpos::Setup & | setup, |
| warpos::Scheduler & | schedule, | ||
| bool | delay_parent_assignment = false ) |
Only valid FlightExecutive constructor.
| warpos::FlightExecutive::FlightExecutive | ( | const FlightExecutive & | original | ) |
|
virtual |
|
inline |
Handle to the command manager.
| int16 warpos::FlightExecutive::getAppPointer | ( | uint16 | apid, |
| uint8 | instance, | ||
| warpos::App *& | app_ptr ) |
Get pointer to a registered app based on its apid and instance number.
| apid | APID of the app to get |
| instance | Instance of app to get |
| app_ptr | Pointer to app pointer to populate |
|
inline |
Get pointer to app registry, used for testing.
|
inline |
Get the log level set for the executive.
|
inline |
Set the executive log level.
| log_level | The level to set logging to |
| const FlightExecutive & warpos::FlightExecutive::operator= | ( | const FlightExecutive & | original | ) |
|
inline |
|
inline |
Handle to the current system platform.
| int16 warpos::FlightExecutive::registerApp | ( | warpos::App & | app | ) |
Register an app with the flight executive.
| app | Reference to the app to register |
| int16 warpos::FlightExecutive::registerTlm | ( | uint16 | apid, |
| uint8 | instance = 0 ) |
Register telemetry packet with storage and telemetry managers.
| apid | The apid of the packet to register |
| instance | The instance of the APID of the packet to register, defaults to 0 |
| int16 warpos::FlightExecutive::run | ( | ) |
Run the FlightExecutive until the terminate flag is raised.
|
inline |
Handle to the current system schedule.
| int16 warpos::FlightExecutive::sendStoreTlm | ( | const cmd_tlm_base & | pkt, |
| uint8 | instance = 0 ) |
Send packet to telemetry and storage managers for send/store.
| pkt | The packet to send |
| instance | The instance of the APID of the packet to send, defaults to 0 |
|
inline |
Handle to the current system setup.
| int16 warpos::FlightExecutive::startup | ( | ) |
Initialize the FlightExecutive and all elements therein.
| int16 warpos::FlightExecutive::step | ( | const clockwerk::Time & | step_val | ) |
Step the FlightExecutive forward by a single step.
| step_val | The current time, which is used to determine the slot which runs If ran in a simulation environment, this is a time step |
|
inline |
Handle to the storage manager.
|
inline |
Handle to the telemetry manager.
|
protected |
The command manager for the flight executive.
|
protected |
|
protected |
Local storage for App children so it can live on the graph tree.
|
protected |
Index of last registered app.
|
protected |
Buffer of pointers to registered apps.
|
protected |
System schedule, which determines what apps and functions run when.
|
protected |
|
protected |
The storage manager for the flight executive.
|
protected |
The telemetry manager for the flight executive.