hbp_nrp_simserver.server.nrp_script_runner module¶
This module contains the start script of a state machine process
-
class
hbp_nrp_simserver.server.nrp_script_runner.
NRPScriptRunner
(sim_settings: hbp_nrp_simserver.server.SimulationSettings, exp_config: types.SimpleNamespace, publish_error: Callable[[…], None])[source]¶ Bases:
object
Executes nrp-core experiments “main script” as a python script.
The script execution can be started, paused and stopped. The script is expected to use the injected ‘nrp’ handler (an instance of
NrpCoreWrapper
) and call its run_loop method until aNRPSimulationTimeout
is raised.-
initialize
() → None[source]¶ - Initialize the script runner:
read the script
initialize the (wrapped) nrp_core client
Any initialization error from nrp_core client will be raised.
It gets called by whatever component is controlling the simulation (i.e. a
SimulationServerLifecycle
)- Raises
IOError – when the script can’t be read from the file system
SyntaxError – when the script code has such an error
-
property
is_initialized
¶
-
property
real_time
¶
-
property
simulation_time
¶
-
property
simulation_time_remaining
¶
-