NRP Core  1.4.1
EventLoopSimManager Class Reference

Implementation of SimulationManager which manages an EventLoop. More...

#include <simulation_manager_event_loop.h>

Inheritance diagram for EventLoopSimManager:
SimulationManager PtrTemplates< SimulationManager >

Public Member Functions

 EventLoopSimManager (const jsonSharedPtr &simulationConfig, const EngineLauncherManagerConstSharedPtr &engineLauncherManager, const MainProcessLauncherManager::const_shared_ptr &processLauncherManager)
 Constructor. More...
 
 ~EventLoopSimManager ()=default
 
bool hasSimulationTimedOut () const override
 
- Public Member Functions inherited from SimulationManager
 SimulationManager (const jsonSharedPtr &simulationConfig)
 Constructor. More...
 
 SimulationManager ()=delete
 
virtual ~SimulationManager ()=default
 
RequestResult initializeSimulation ()
 Initialize the simulation. More...
 
RequestResult resetSimulation ()
 Reset the currently running simulation. More...
 
RequestResult stopSimulation ()
 Request to stop the simulation if it was running, if it wasn't the call has no effect. More...
 
RequestResult runSimulationUntilDoneOrTimeout ()
 Runs the simulation until a separate thread stops it or simTimeout (defined in SimulationConfig) is reached. If simTimeout is zero or negative, ignore it. More...
 
RequestResult runSimulation (unsigned numIterations)
 Run the Simulation for specified amount of timesteps. More...
 
RequestResult shutdownSimulation ()
 Shuts down the simulation. More...
 
SimState currentState ()
 returns the current state of the simulation More...
 
std::string printSimState (const SimState &simState)
 returns a simulation state as a string More...
 
SimulationDataManagergetSimulationDataManager ()
 

Additional Inherited Members

- Public Types inherited from SimulationManager
enum  SimState {
  SimState::Created, SimState::Initialized, SimState::Running, SimState::Stopped,
  SimState::Failed, SimState::NotSet
}
 States the simulation can be in. More...
 
- Public Types inherited from PtrTemplates< SimulationManager >
using shared_ptr = std::shared_ptr< SimulationManager >
 
using const_shared_ptr = std::shared_ptr< const SimulationManager >
 
using unique_ptr = std::unique_ptr< SimulationManager >
 
using const_unique_ptr = std::unique_ptr< const SimulationManager >
 
- Static Public Member Functions inherited from SimulationManager
static void validateConfig (jsonSharedPtr &config)
 Validates config against Simulation schema. More...
 
- Protected Attributes inherited from SimulationManager
jsonSharedPtr _simConfig
 Simulation Configuration. More...
 
SimulationDataManager _simulationDataManager
 
SimulationTime _simTimeout = SimulationTime::zero()
 

Detailed Description

Implementation of SimulationManager which manages an EventLoop.

Constructor & Destructor Documentation

◆ EventLoopSimManager()

EventLoopSimManager::EventLoopSimManager ( const jsonSharedPtr simulationConfig,
const EngineLauncherManagerConstSharedPtr engineLauncherManager,
const MainProcessLauncherManager::const_shared_ptr processLauncherManager 
)

Constructor.

Parameters
simulationConfigSimulation configuration
engineLauncherManagerEngine launchers
processLaunchersProcess launchers

◆ ~EventLoopSimManager()

EventLoopSimManager::~EventLoopSimManager ( )
default

Member Function Documentation

◆ hasSimulationTimedOut()

bool EventLoopSimManager::hasSimulationTimedOut ( ) const
inlineoverridevirtual

Implements SimulationManager.


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