|
Simo 0.0.1
|
#include <Module.h>
Public Member Functions | |
| virtual InitializationStatus | initialize (Context &sim_ctx_v, const Parameters ¶meters) |
| std::string_view | name () const |
| Context & | sim_ctx () const |
| void | record_statistics (Statistics::StatMapper &mapper) |
| Record a statistic in a StatMapper to dump statistics. | |
| Port * | get_port (std::string_view) |
| template<typename Stat> | |
| Stat * | get_statistic (const std::string_view name) |
| template<typename Function> | |
| void | visit_statistics (Function f) |
Protected Attributes | |
| Statistics::StatStorage | statistics |
| std::unordered_map< std::string, std::unique_ptr< Port > > | ports |
A simulation unit that can schedule events in the context
Every class that inherits from module shall have a default constructor (possibly trivial) and initialize everything in the initialize method.
|
nodiscardvirtual |
Associate a context to this instance and look at the parameters to initialize the structure. The default implementation is to return true. Derived classes can call <base_class>::initialize to initialize the attributes of the base class
Reimplemented in FailingInitModule, InitTrackingModule, PingModule, PongModule, Simo::Modules::Core::Collector, and TestModule.