qudi.core.Connector

class qudi.core.Connector(interface: str | Type, name: str | None = None, optional: bool = False)[source]

Bases: builtins.object

A connector used to connect qudi modules with each other.

__init__(interface: str | Type, name: str | None = None, optional: bool = False)[source]

@param str interface: name of the interface class to connect to @param str name: optional, name of the connector in qudi config. Will set attribute name if

omitted.

@param bool optional: optional, flag indicating if the connection is mandatory (False)

Methods

__init__(interface[, name, optional])

@param str interface: name of the interface class to connect to @param str name: optional, name of the connector in qudi config. Will set attribute name if omitted. @param bool optional: optional, flag indicating if the connection is mandatory (False).

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()

Disconnect connector.

Attributes

is_connected

Read-only property to check if the Connector instance is connected to a target module.

connect(target: Any) None[source]

Check if target is connectible by this connector and connect.

copy(**kwargs)[source]

Create a new instance of Connector with copied values and update

disconnect() None[source]

Disconnect connector.

property is_connected: bool

Read-only property to check if the Connector instance is connected to a target module.

@return bool: Connection status flag (True: connected, False: disconnected)