navigate.model.device_startup_functions.IntegratedDeviceFactory
- class navigate.model.device_startup_functions.IntegratedDeviceFactory
Bases:
object
Integrated Device Factory.
This class is used to build integrated device connections.
- __init__()
Methods
__init__
()build_connection
(unique_id, ...[, exception])Builds an integrated device connection.
- classmethod build_connection(unique_id: str, build_connection_function: ~typing.Callable[[...], ~typing.Any], args: ~typing.Tuple[~typing.Any, ...], exception: ~typing.Type[Exception] = <class 'Exception'>) → Any
Builds an integrated device connection.
This method establishes a connection to an integrated device using the provided connection-building function and arguments. If the connection does not exist, it will be created and stored.
- Parameters:
unique_id (str) – Unique identifier for the device
build_connection_function (Callable) – Function that builds the connection to the device.
args (Tuple) – Arguments to the build_connection_function
exception (Type[Exception]) – Exception to catch when building the connection
- Returns:
connection – Connection to the device
- Return type:
Any
:raises exception : Exception: If the connection building process fails, the specified exception is raised.