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.MockSignalBackend#

class ophyd_async.core.MockSignalBackend(datatype: Type[T] | None = None, initial_backend: SignalBackend[T] | None = None)[source]#

Bases: SignalBackend[T]

Methods

connect

get_datakey

get_reading

get_setpoint

For a soft signal, the setpoint and readback values are the same.

get_value

put

set_callback

set_value

source

Attributes

datatype

Datatype of the signal value

put_mock

put_proceeds

datatype: Type[T] | None = None#

Datatype of the signal value

source(name: str) str[source]#
async connect(timeout: float = 10.0) None[source]#
property put_mock: Mock#
property put_proceeds: Event#
async put(value: T | None, wait=True, timeout=None)[source]#
set_value(value: T)[source]#
async get_reading() Reading[source]#
async get_value() T[source]#
async get_setpoint() T[source]#

For a soft signal, the setpoint and readback values are the same.

async get_datakey(source: str) DataKey[source]#
set_callback(callback: Callable[[Reading, T], None] | None) None[source]#