Simo 0.0.1
Loading...
Searching...
No Matches
PingModule Class Referencefinal
Inheritance diagram for PingModule:
PingPongBaseModule Simo::Module

Public Member Functions

void update_state () override
void try_send () override
Public Member Functions inherited from PingPongBaseModule
Simo::InitializationStatus initialize (Simo::Context &sim_ctx_p, const Simo::Parameters &parameters) override
Public Member Functions inherited from Simo::Module
std::string_view name () const
constexpr std::string name_of_child (const std::string_view child) const
Contextsim_ctx () const
void record_statistics (Statistics::StatMapper &mapper)
 Record a statistic in a StatMapper to dump statistics.
Portget_port (std::string_view)
Time current_time () const
template<typename Stat>
Stat * get_statistic (const std::string_view name)
template<typename Function>
void visit_statistics (Function f)
virtual InitializationStatus log_setup (const std::filesystem::path &out_file)
InitializationStatus log_setup ()
 Default log_setup with default path set to Simo.log.
void log_enable (bool new_value)
 Enable/disable logging for the component.
void log_level (size_t level)
void log_level (std::string_view level_name)
template<typename Callable>
void log (size_t level, Callable &&callable)
template<typename Callable>
void log_raw_callable (size_t level, bool print_level, Callable &&callable)
 Log a message with the given level without adding timestamp.
void populate_default_log_levels ()
Log::Loggerget_logger ()
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.
template<typename T, typename... Args>
T & create_child (Args... args)

Protected Attributes

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

Member Function Documentation

◆ try_send()

void PingModule::try_send ( )
inlineoverridevirtual

Implements PingPongBaseModule.

◆ update_state()

void PingModule::update_state ( )
inlineoverridevirtual

Implements PingPongBaseModule.


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