Simo 0.0.1
Loading...
Searching...
No Matches
PongModule Class Reference
Inheritance diagram for PongModule:
Simo::Module

Public Member Functions

Simo::InitializationStatus initialize (Simo::Context &sim_ctx_v, const Simo::Parameters &parameters) override
void update_state ()
void try_send ()
Public Member Functions inherited from Simo::Module
std::string_view name () const
Contextsim_ctx () const
void record_statistics (Statistics::StatMapper &mapper)
 Record a statistic in a StatMapper to dump statistics.
Portget_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

Simo::Ports::BidirectionalPort< PingPongMessage > * port = nullptr
Simo::Statistics::Countnum_msg_sent = nullptr
Simo::Time period = Simo::Time::zero
bool send_message = false
Protected Attributes inherited from Simo::Module
Statistics::StatStorage statistics
std::unordered_map< std::string, std::unique_ptr< Port > > ports

Additional Inherited Members

Protected Member Functions inherited from Simo::Module
template<typename T, typename... Args>
T & create_statistic (Args... args)
 Create a new statistic of type T.
template<typename T, typename... Args>
T & create_port (const std::string_view name, Args... args)
 Create a new port of type T.

Member Function Documentation

◆ initialize()

Simo::InitializationStatus PongModule::initialize ( Simo::Context & sim_ctx_v,
const Simo::Parameters & parameters )
inlineoverridevirtual

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 from Simo::Module.


The documentation for this class was generated from the following file:
  • tests/collection/PingPongCollection.cc