Note

Ophyd async is included on a provisional basis until the v1.0 release and may change API on minor release numbers before then

ophyd_async.core.SignalBackend#

class ophyd_async.core.SignalBackend[source]#

Bases: Generic[T]

A read/write/monitor backend for a Signals

Methods

connect

Connect to underlying hardware

datatype_allowed

Check if a given datatype is acceptable for this signal backend.

get_datakey

Metadata like source, dtype, shape, precision, units

get_reading

The current value, timestamp and severity

get_setpoint

The point that a signal was requested to move to.

get_value

The current value

put

Put a value to the PV, if wait then wait for completion for up to timeout

set_callback

Observe changes to the current value, timestamp and severity

source

Return source of signal.

Attributes

datatype

Datatype of the signal value

datatype: Type[T] | None = None#

Datatype of the signal value

abstract classmethod datatype_allowed(dtype: type)[source]#

Check if a given datatype is acceptable for this signal backend.

abstract source(name: str) str[source]#

Return source of signal. Signals may pass a name to the backend, which can be used or discarded.

abstract async connect(timeout: float = 10.0)[source]#

Connect to underlying hardware

abstract async put(value: T | None, wait=True, timeout=None)[source]#

Put a value to the PV, if wait then wait for completion for up to timeout

abstract async get_datakey(source: str) DataKey[source]#

Metadata like source, dtype, shape, precision, units

abstract async get_reading() Reading[source]#

The current value, timestamp and severity

abstract async get_value() T[source]#

The current value

abstract async get_setpoint() T[source]#

The point that a signal was requested to move to.

abstract set_callback(callback: Callable[[Reading, T], None] | None) None[source]#

Observe changes to the current value, timestamp and severity