qudi.core.Connector
- class qudi.core.Connector(interface: str | Type, name: str | None = None, optional: bool = False)[source]
Bases:
builtins.objectA connector used to connect qudi modules with each other.
- __init__(interface: str | Type, name: str | None = None, optional: bool = False)[source]
Initialize a Connector instance.
- Parameters:
- interfaceUnion[str, Type]
Name of the interface class to connect to or the interface class itself.
- namestr, optional
Name of the connector in qudi config. Will set attribute name if omitted.
- optionalbool, optional
Flag indicating if the connection is mandatory (False by default).
- Raises:
- AssertionError
If interface is not a string or a type. If name is not None or a non-empty string. If optional is not a boolean.
Methods
__init__(interface[, name, optional])Initialize a Connector instance.
connect(target)Check if target is connectible by this connector and connect.
copy(**kwargs)Create a new instance of Connector with copied values and update
Disconnect connector.
Attributes
Read-only property to check if the Connector instance is connected to a target module.
- __init__(interface: str | Type, name: str | None = None, optional: bool = False)[source]
Initialize a Connector instance.
- Parameters:
- interfaceUnion[str, Type]
Name of the interface class to connect to or the interface class itself.
- namestr, optional
Name of the connector in qudi config. Will set attribute name if omitted.
- optionalbool, optional
Flag indicating if the connection is mandatory (False by default).
- Raises:
- AssertionError
If interface is not a string or a type. If name is not None or a non-empty string. If optional is not a boolean.
- property is_connected: bool
Read-only property to check if the Connector instance is connected to a target module.
- Returns:
- bool
Connection status flag. - True: Connected - False: Disconnected