$darkmode
engine::SimulationContext Struct Reference

#include <simulation_context.hpp>

Collaboration diagram for engine::SimulationContext:

Public Member Functions

 SimulationContext (sol::state_view &&l)
 
std::string version () const
 
cloe::Logger logger () const
 
std::shared_ptr< cloe::Registrarsimulation_registrar ()
 
std::vector< std::string > model_ids () const
 
std::vector< std::string > simulator_ids () const
 
std::vector< std::string > controller_ids () const
 
std::vector< std::string > vehicle_ids () const
 
std::vector< std::string > plugin_ids () const
 
bool foreach_model (std::function< bool(cloe::Model &, const char *type)> f)
 
bool foreach_model (std::function< bool(const cloe::Model &, const char *type)> f) const
 
bool foreach_simulator (std::function< bool(cloe::Simulator &)> f)
 
bool foreach_simulator (std::function< bool(const cloe::Simulator &)> f) const
 
bool foreach_controller (std::function< bool(cloe::Controller &)> f)
 
bool foreach_controller (std::function< bool(const cloe::Controller &)> f) const
 
bool foreach_vehicle (std::function< bool(cloe::Vehicle &)> f)
 
bool foreach_vehicle (std::function< bool(const cloe::Vehicle &)> f) const
 

Public Attributes

sol::state_view lua
 
std::unique_ptr< cloe::DataBrokerdb
 
std::unique_ptr< Serverserver
 
std::shared_ptr< Coordinatorcoordinator
 
std::shared_ptr< Registrarregistrar
 
std::unique_ptr< CommandExecutercommander
 
cloe::Stack config
 
std::string uuid {}
 
bool report_progress {false}
 
SimulationSync sync
 
SimulationProgress progress
 
SimulationStatistics statistics
 
cloe::Modelnow_initializing {nullptr}
 
std::map< std::string, std::unique_ptr< cloe::Simulator > > simulators
 
std::map< std::string, std::shared_ptr< cloe::Vehicle > > vehicles
 
std::map< std::string, std::unique_ptr< cloe::Controller > > controllers
 
std::optional< SimulationOutcomeoutcome
 
timer::DurationTimer< cloe::Durationcycle_duration
 
bool pause_execution {false}
 
std::shared_ptr< events::LoopCallback > callback_loop
 
std::shared_ptr< events::PauseCallback > callback_pause
 
std::shared_ptr< events::ResumeCallback > callback_resume
 
std::shared_ptr< events::StartCallback > callback_start
 
std::shared_ptr< events::StopCallback > callback_stop
 
std::shared_ptr< events::SuccessCallback > callback_success
 
std::shared_ptr< events::FailureCallback > callback_failure
 
std::shared_ptr< events::ResetCallback > callback_reset
 
std::shared_ptr< events::TimeCallbackcallback_time
 

Detailed Description

SimulationContext represents the entire context of a running simulation.

This clearly separates data from functionality. There is no constructor where extra initialization is performed. Instead any initialization is performed in the simulation states in the simulation.cpp file.


The documentation for this struct was generated from the following files: