Note

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

ophyd.v2.core.SimSignalBackend#

class ophyd.v2.core.SimSignalBackend(datatype: Type[T] | None, source: str)#

Bases: SignalBackend[T]

An simulated backend to a Signal, created with Signal.connect(sim=True)

Methods

connect

Connect to underlying hardware

get_descriptor

Metadata like source, dtype, shape, precision, units

get_reading

The current value, timestamp and severity

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

Attributes

datatype

Datatype of the signal value

source

Like ca://PV_PREFIX:SIGNAL

source: str = ''#

Like ca://PV_PREFIX:SIGNAL

datatype: Type[T] | None = None#

Datatype of the signal value

async connect() None#

Connect to underlying hardware

async put(value: T | None, wait=True, timeout=None)#

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

async get_descriptor() Descriptor#

Metadata like source, dtype, shape, precision, units

async get_reading() Reading#

The current value, timestamp and severity

async get_value() T#

The current value

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

Observe changes to the current value, timestamp and severity