![]() |
ModelSpace
Documentation for ModelSpace models and classes.
|
Class to manage logs. More...
#include <LogManager.h>

Public Member Functions | |
| LogManager (SimulationExecutive &executive) | |
| Constructor for the log manager. More... | |
| ~LogManager () | |
| Destructor for the log manager. Frees memory allocated internally to logging events and monitors. More... | |
| void | addLog (clockwerk::SimLogger &log, const clockwerk::Time &rate) |
| Overloaded function to register and set up a logger. More... | |
| void | addLog (clockwerk::SimLogger &log, unsigned int rate) |
| Overloaded function to register and set up a logger. More... | |
| void | outDir (const std::string &directory) |
| Function to set output directory for all logs. More... | |
| std::string | outDir () |
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... | |
Protected Attributes | |
| std::string | _output_directory = "" |
| Output directory. More... | |
| std::vector< LogEvent * > | _log_events |
| List of logging events. More... | |
| SimulationExecutive & | exc |
| Handle to simulation executive for configuring monitors. More... | |
| std::vector< RateMonitor * > | _monitors |
| List of rate monitors established in the log manager. 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... | |
Additional Inherited Members | |
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... | |
Class to manage logs.
This is the header for the log manager, which is responsible for adding logs to the simulation and ensuring they are executed in accordance with their rate or triggers.
| modelspace::LogManager::LogManager | ( | SimulationExecutive & | executive | ) |
Constructor for the log manager.
| modelspace::LogManager::~LogManager | ( | ) |
Destructor for the log manager. Frees memory allocated internally to logging events and monitors.
| void modelspace::LogManager::addLog | ( | clockwerk::SimLogger & | log, |
| const clockwerk::Time & | rate | ||
| ) |
Overloaded function to register and set up a logger.
| log | The logger to add to the sim |
| rate | The rate, as a Time object, at which the logger should log |
| void modelspace::LogManager::addLog | ( | clockwerk::SimLogger & | log, |
| unsigned int | rate | ||
| ) |
Overloaded function to register and set up a logger.
| log | The logger to add to the sim |
| rate | The rate, in Hz, at which the logger should log |
|
inline |
|
inline |
Function to set output directory for all logs.
| directory | Directory to set as base |
|
protected |
List of logging events.
|
protected |
List of rate monitors established in the log manager.
|
protected |
Output directory.
|
protected |
Handle to simulation executive for configuring monitors.