secop_ophyd.SECoPSignal#

Module Contents#

Classes#

AttributeType

SECoPCommandBackend

Backend for a SECoP command.

SECoPBackend

Unified backend for SECoP Parameters and Properties.

Functions#

secop_dtype_obj_from_json

describedict_to_datakey

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

source(name: str) str[source]#
async connect(timeout: float) None[source]#
async execute(*args: Any, **kwargs: Any) Any[source]#
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#
attribute_type: str | None = None#
path_str: str = None#
SECoPdtype_obj: frappy.datatypes.DataType = None#
SECoP_type_info: secop_ophyd.util.SECoPdtype = None#
describe_dict: dict = 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]#
source(name: str, read: bool) str[source]#
async connect(timeout: float)[source]#

Connect and initialize backend (handles both parameters and properties).

async put(value: Any | None)[source]#

Put a value to the parameter. Properties are readonly.

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.

async get_value() ophyd_async.core.SignalDatatypeT[source]#
async get_setpoint() ophyd_async.core.SignalDatatypeT[source]#
set_callback(callback: ophyd_async.core.Callback[bluesky.protocols.Reading[ophyd_async.core.SignalDatatypeT]] | None) None[source]#
get_param_path()[source]#
get_path_tuple()[source]#
secop_ophyd.SECoPSignal.secop_dtype_obj_from_json(prop_val)[source]#
secop_ophyd.SECoPSignal.describedict_to_datakey(describe_dict: dict) secop_ophyd.util.SECoPDataKey[source]#

Convert a DataKey to a SECoPDataKey