class SimManager::SimulatorManager

Overview

class SimulatorManager: public object {
public:
    // fields

     time_step;
     sim_interface;

    // methods

    def __init__(self self, configuration configuration);
    def reset(self self);
    def shutdown(self self);
    def run_step(self self, action action, timestep_ns timestep_ns);
    def get_model_properties(self self, datapack_type datapack_type);
    def get_model_all_properties(self self, datapack_type datapack_type);

    def get_model_property(
        self self,
        datapack_name datapack_name,
        datapack_type datapack_type
    );

    def get_sim_time(self self);
};

Detailed Documentation

This class receives the information that a simulator needs from an EngineScript,
and it then starts and manages a simulator via its Python API.

Methods

def reset(self self)
Reset the simulation, it is connected by the "server_callbacks.py"
def shutdown(self self)
Shutdown the simulation, it is connected by the "server_callbacks.py"
def run_step(self self, action action, timestep_ns timestep_ns)
Obtain parameters from the engine script and run the simulation step by step

:param action: the control parameters for the simulation
:type action: list
:param timestep_ns: time step length of the simulation (nanosecs)
:type timestep_ns: int
def get_model_properties(self self, datapack_type datapack_type)
Obtain devices list

:param datapack_type: data type of the required device
:type datapack_type: str
def get_model_all_properties(self self, datapack_type datapack_type)
Obtain all devices data of a special type

:param datapack_type:  (string): data type of required devices
:type datapack_type: str
def get_model_property(
    self self,
    datapack_name datapack_name,
    datapack_type datapack_type
)
Obtain data of a device based on its name

:param datapack_name: name of the required device
:type datapack_type: str
:param datapack_type: data type of the required device
:type datapack_type: str