secop_ophyd.SECoPSignal#
Module Contents#
Classes#
Backend for a SECoP command. |
|
Unified backend for SECoP Parameters and Properties. |
Functions#
Convert a DataKey to a SECoPDataKey |
Data#
API#
- secop_ophyd.SECoPSignal.atomic_dtypes = ()#
- secop_ophyd.SECoPSignal.MAX_DEPTH = 1#
- class secop_ophyd.SECoPSignal.AttributeType[source]#
Bases:
ophyd_async.core.StrictEnum- PARAMETER = 'parameter'#
- PROPERTY = 'property'#
- class secop_ophyd.SECoPSignal.SECoPCommandBackend(signature: inspect.Signature | None = None)[source]#
Bases:
ophyd_async.core.CommandBackend[typing.Any,typing.Any]Backend for a SECoP command.
Converts the argument/result between SECoP wire format and numpy/python values and calls AsyncFrappyClient.exec_command to execute the command.
Supports deferred initialization (matching the SECoPBackend pattern used for Parameters/Properties): constructed empty by the DeviceFiller when a command is declared via a Command/TriggerableCommand class annotation, then bound to a concrete SECoP command via init_command_from_introspection once the SEC node has been introspected.
Initialization
Initialize SECoPCommandBackend (optionally with a signature derived from a Command[[ArgT], ResT] class annotation).
- init_command_from_introspection(cmd_datatype: frappy.datatypes.CommandType, path: secop_ophyd.util.Path, secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient, wait_for_idle_fn: collections.abc.Callable[[], collections.abc.Awaitable[None]] | None = None) None[source]#
Bind this backend to a concrete SECoP command.
- Parameters:
cmd_datatype – SECoP command datatype, holding the argument and
result datatypes (either of which may be None) :type cmd_datatype: CommandType :param path: Path to the command in the secclient module dict :type path: Path :param secclient: SECoP client providing communication to the SEC Node :type secclient: AsyncFrappyClient :param wait_for_idle_fn: Owning module’s wait_for_idle coroutine (bound method), if it has one (i.e. it has a status signal); used to support the wait_for_idle kwarg on execute(). :type wait_for_idle_fn: Callable[[], Awaitable[None]] | None
- class secop_ophyd.SECoPSignal.SECoPBackend(datatype: type[ophyd_async.core.SignalDatatypeT] | None, path: str | None = None, attribute_type: str | None = None, secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient | None = None)[source]#
Bases:
ophyd_async.core.SignalBackend[ophyd_async.core.SignalDatatypeT]Unified backend for SECoP Parameters and Properties.
This allows a single backend type to be used in signal_backend_factory, with deferred initialization based on annotation metadata.
Initialization
Initialize backend (supports deferred initialization).
- Args:
datatype: Optional datatype for the signal path: Optional path for immediate initialization (module:param or prop_key) secclient: Optional SECoP client for immediate initialization
- format: ophyd_async.core.StandardReadableFormat = None#
- SECoPdtype_obj: frappy.datatypes.DataType = None#
- SECoP_type_info: secop_ophyd.util.SECoPdtype = None#
- init_parameter_from_introspection(datatype: type[ophyd_async.core.SignalDatatypeT], path: str, secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient)[source]#
- init_property_from_introspection(datatype: type[ophyd_async.core.SignalDatatypeT], path: str, secclient: secop_ophyd.AsyncFrappyClient.AsyncFrappyClient)[source]#
- async connect(timeout: float)[source]#
Connect and initialize backend (handles both parameters and properties).
- async get_datakey(source: str) bluesky.protocols.DataKey[source]#
Metadata like source, dtype, shape, precision, units
- async get_reading() bluesky.protocols.Reading[ophyd_async.core.SignalDatatypeT][source]#
Get reading, handling both parameters and properties.
- set_callback(callback: ophyd_async.core.Callback[bluesky.protocols.Reading[ophyd_async.core.SignalDatatypeT]] | None) None[source]#
- secop_ophyd.SECoPSignal.describedict_to_datakey(describe_dict: dict) secop_ophyd.util.SECoPDataKey[source]#
Convert a DataKey to a SECoPDataKey