secop_ophyd.devices.base#

The common base of all SECoP devices, and the annotations that bind declared signals to the SEC node.

Module Contents#

Classes#

SECoPDevice

SECoPCommunicatorDevice

ParameterType

Annotation for Parameter Signals, defines the path to the parameter in the secclient module dict

ParameterMemberType

Annotation for a split struct/tuple member Signal (one field/index of a decomposed composite parameter). Distinct from ParameterType so annotation-scanning doesn’t mark it AttributeType.PARAMETER – it must stay unset until SECoPDeviceConnector.connect_real() calls init_member_from_introspection(), which needs to see it as MEMBER (or unset), not PARAMETER.

PropertyType

Annotation for Module Property Signals, defines the path to the property

Functions#

format_assigned

is_read_signal

warn_on_long_device_names

Warn for every device whose name exceeds the tiled storage limit.

Data#

API#

secop_ophyd.devices.base.format_assigned(device: ophyd_async.core.StandardReadable, signal: ophyd_async.core.SignalR) → bool[source]#
secop_ophyd.devices.base.is_read_signal(device: ophyd_async.core.StandardReadable, signal: ophyd_async.core.SignalR | ophyd_async.core.SignalRW) → bool[source]#
secop_ophyd.devices.base.TILED_MAX_NAME_LENGTH = 63#
secop_ophyd.devices.base.warn_on_long_device_names(devices: Dict[str, ophyd_async.core.Device]) → None[source]#

Warn for every device whose name exceeds the tiled storage limit.

class secop_ophyd.devices.base.SECoPDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#

Bases: ophyd_async.core.StandardReadable

hinted_signals: list[str] = []#
mandatory_parameters: list[str] = []#
set_module(module_name: str)[source]#
async connect(mock: bool | ophyd_async.core.LazyMock = False, timeout: float = DEFAULT_TIMEOUT, force_reconnect: bool = False)[source]#
class secop_ophyd.devices.base.SECoPCommunicatorDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)[source]#

Bases: secop_ophyd.devices.base.SECoPDevice

hinted_signals: list[str] = []#
class secop_ophyd.devices.base.ParameterType[source]#

Annotation for Parameter Signals, defines the path to the parameter in the secclient module dict

class secop_ophyd.devices.base.ParameterMemberType(parent: str | None = None, key: str | None = None)[source]#

Annotation for a split struct/tuple member Signal (one field/index of a decomposed composite parameter). Distinct from ParameterType so annotation-scanning doesn’t mark it AttributeType.PARAMETER – it must stay unset until SECoPDeviceConnector.connect_real() calls init_member_from_introspection(), which needs to see it as MEMBER (or unset), not PARAMETER.

parent and key name the parameter and the member (struct member name, or tuple index as a string). Without a node description (mock mode) they are the only way to tell e.g. the tuple index 0 of ‘target’ from the member 0 of a parameter ‘target_limits’; without them, the member is found from its attribute name.

Initialization

class secop_ophyd.devices.base.PropertyType[source]#

Annotation for Module Property Signals, defines the path to the property