adf_core_python.core.launcher.connect package#
Submodules#
adf_core_python.core.launcher.connect.component_launcher module#
- class adf_core_python.core.launcher.connect.component_launcher.ComponentLauncher(host: str, port: int, logger: BoundLogger)#
Bases:
object
- check_kernel_connection(timeout: int = 30, retry_interval: float = 5.0) bool #
Attempts to connect to the kernel multiple times within the specified timeout period.
- Parameters:
timeout (int) – Total timeout duration in seconds
retry_interval (float) – Interval between retry attempts in seconds
- Returns:
True if connection successful, False otherwise
- Return type:
bool
- generate_request_id() int #
- make_connection() Connection #
adf_core_python.core.launcher.connect.connection module#
- class adf_core_python.core.launcher.connect.connection.Connection(host: str, port: int)#
Bases:
object
- connect() None #
Connect to the kernel
- Raises:
socket.timeout – If the connection times out
socket.error – If there is an error connecting to the socket
- message_received(agent_message_received: Callable) None #
- parse_message_from_kernel() None #
Parse messages from the kernel
- Raises:
ServerError – If there is an error reading from the socket
AgentError – If there is an error in the agent calculation
- send_msg(msg: Any) None #
adf_core_python.core.launcher.connect.connector module#
- class adf_core_python.core.launcher.connect.connector.Connector#
Bases:
ABC
- abstractmethod connect(component_launcher: ComponentLauncher, gateway_launcher: GatewayLauncher | None, config: Config, loader: AbstractLoader) dict[Thread, Event] #
- get_connected_agent_count() int #
adf_core_python.core.launcher.connect.connector_ambulance_center module#
- class adf_core_python.core.launcher.connect.connector_ambulance_center.ConnectorAmbulanceCenter#
Bases:
Connector
- connect(component_launcher: ComponentLauncher, gateway_launcher: GatewayLauncher | None, config: Config, loader: AbstractLoader) dict[Thread, Event] #
adf_core_python.core.launcher.connect.connector_ambulance_team module#
- class adf_core_python.core.launcher.connect.connector_ambulance_team.ConnectorAmbulanceTeam#
Bases:
Connector
- connect(component_launcher: ComponentLauncher, gateway_launcher: GatewayLauncher | None, config: Config, loader: AbstractLoader) dict[Thread, Event] #
adf_core_python.core.launcher.connect.connector_fire_brigade module#
- class adf_core_python.core.launcher.connect.connector_fire_brigade.ConnectorFireBrigade#
Bases:
Connector
- connect(component_launcher: ComponentLauncher, gateway_launcher: GatewayLauncher | None, config: Config, loader: AbstractLoader) dict[Thread, Event] #
adf_core_python.core.launcher.connect.connector_fire_station module#
- class adf_core_python.core.launcher.connect.connector_fire_station.ConnectorFireStation#
Bases:
Connector
- connect(component_launcher: ComponentLauncher, gateway_launcher: GatewayLauncher | None, config: Config, loader: AbstractLoader) dict[Thread, Event] #
adf_core_python.core.launcher.connect.connector_police_force module#
- class adf_core_python.core.launcher.connect.connector_police_force.ConnectorPoliceForce#
Bases:
Connector
- connect(component_launcher: ComponentLauncher, gateway_launcher: GatewayLauncher | None, config: Config, loader: AbstractLoader) dict[Thread, Event] #
adf_core_python.core.launcher.connect.connector_police_office module#
- class adf_core_python.core.launcher.connect.connector_police_office.ConnectorPoliceOffice#
Bases:
Connector
- connect(component_launcher: ComponentLauncher, gateway_launcher: GatewayLauncher | None, config: Config, loader: AbstractLoader) dict[Thread, Event] #