hbp_nrp_simserver.server.simulation_server_instance module¶
-
class
hbp_nrp_simserver.server.simulation_server_instance.SimulationServerInstance(lifecycle: hbp_nrp_commons.simulation_lifecycle.SimulationLifecycle, sim_id: int, sim_dir: str, main_script_path: str, exp_config_path: str)[source]¶ Bases:
objectThe class that encapsulates the execution of simulation script in a simulation server and manages its execution in a separate process
-
MAX_STOP_TIMEOUT: float = 30.0¶
-
initialize() → None[source]¶ Initialize the simulation server:
Run
simulation_server.pyin a subprocess, spawning a thread that monitors its execution. The stdout of the child process is redirected to a file namedsimulation_{self.sim_id}.log
-
property
is_running¶ Returns whether the simulation process is running or not
- Returns
True if the simulation process is running, False otherwise.
-