CoSimulationController#

class wattson.cosimulation.control.co_simulation_controller.CoSimulationController(scenario_path: Path, **kwargs)#

Bases: WattsonQueryHandler

Methods

__init__

add_simulation_control_client

cli

Starts a command-line-interface for the co-simulation :return:

get_controller_namespace

get_data

get_model_manager

get_simulation_control_clients

get_simulator_types

get_simulators

get_wattson_client_config

handle_simulation_control_query

Handles the given WattsonQuery and provides an optional response.

handles_simulation_query_type

Checks whether the physical simulator handles specific SimulationControlQueries.

has_simulator

join

load_scenario

manual_scenario

register_simulator

send_notification

set_data

start

Starts the co-simulation by performing the following steps: * Creates the network emulation * Creates the physical process simulation * Starts the physical process simulation * Deploys network hosts / applications :return:

stop

Attributes

configuration_store

is_waiting_for_clients

network_emulator

physical_simulator

simulation_control_server

__init__(scenario_path: Path, **kwargs)#
cli(cli_sig_int_handler: Optional = None)#

Starts a command-line-interface for the co-simulation :return:

Parameters:

cli_sig_int_handler (Optional, optional) – (Default value = None)

handle_simulation_control_query(query: WattsonQuery) WattsonResponse | None#

Handles the given WattsonQuery and provides an optional response. If the query type is not supported, this should raise an InvalidSimulationControlQueryException.

Parameters:

query (WattsonQuery) –

handles_simulation_query_type(query: WattsonQuery | Type[WattsonQuery]) bool#

Checks whether the physical simulator handles specific SimulationControlQueries.

Parameters:

query (Union[WattsonQuery, Type[WattsonQuery]]) – The query instance or class to be checked.

Returns:

Whether this simulator can handle this query type

Return type:

bool

start()#

Starts the co-simulation by performing the following steps: * Creates the network emulation * Creates the physical process simulation * Starts the physical process simulation * Deploys network hosts / applications :return: