secop_ophyd.devices.connector#
The connector that builds a device from the SEC node description, and helpers that read the description and name the children.
Module Contents#
Classes#
Connector for SECoP node and module devices. |
Functions#
Attribute name of a SECoP command on its device: with a trailing underscore if the name is used by a bluesky protocol (e.g. ‘prepare’). |
|
Attribute name of the channel with the role |
|
Role -> module name of the channels of an acquisition controller, from its module properties (empty for any other module). |
|
The modules of a node that are channels of an acquisition controller. |
Data#
API#
- secop_ophyd.devices.connector.command_attr_name(command: str) str[source]#
Attribute name of a SECoP command on its device: with a trailing underscore if the name is used by a bluesky protocol (e.g. ‘prepare’).
- secop_ophyd.devices.connector.channel_attr_name(role: str, device: ophyd_async.core.Device, declared: set[str]) str[source]#
Attribute name of the channel with the role
roleon its controllerdevice: the role as a Python identifier, with trailing underscores if it is used by a bluesky protocol or another attribute of the controller.declaredare the annotated (not yet filled) children ofdevice.
- secop_ophyd.devices.connector.IGNORED_PROPS = ['_plotly']#
- secop_ophyd.devices.connector.acquisition_channels(module_properties: collections.abc.Mapping[str, Any]) dict[str, str][source]#
Role -> module name of the channels of an acquisition controller, from its module properties (empty for any other module).
- secop_ophyd.devices.connector.controller_channel_modules(modules: collections.abc.Mapping[str, Any]) set[str][source]#
The modules of a node that are channels of an acquisition controller.
- class secop_ophyd.devices.connector.SECoPDeviceConnector(sri: str, auto_fill_signals: bool = True, loglevel=logging.INFO, logdir: str | None = None)[source]#
Bases:
ophyd_async.core.DeviceConnectorConnector for SECoP node and module devices.
Children declared by class annotations are created when the device is constructed, as unfilled. On a real connect, the SEC node description fills them (and, with
auto_fill_signals, adds everything else the node describes); any annotated child the node does not provide is an error. In mock mode only the annotated children exist and nothing touches the network.Filling and format assignment run once per device, so repeated connects (including
force_reconnect=True) only reconnect.Initialization
- create_children_from_annotations(device: ophyd_async.core.Device)[source]#
- async connect_mock(device: ophyd_async.core.Device, mock: ophyd_async.core.LazyMock)[source]#
- async connect_real(device: ophyd_async.core.Device, timeout: float, force_reconnect: bool)[source]#