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

class ophyd_async.core.SignalRW(backend: SignalBackend[T] | None = None, timeout: float | None = 10.0, name: str = '')[source]#

Bases: SignalR[T], SignalW[T], Locatable

Signal that can be both read and set

Methods

children

clear_sub

Remove a subscription.

connect

describe

Return a single item dict with the descriptor in it

get_value

The current value

locate

read

Return a single item dict with the reading in it

set

Set the value and return a status saying when it's done

set_name

Set self.name=name and each self.child.name=name+"-child".

stage

Start caching this signal

subscribe

Subscribe to updates in the reading

subscribe_value

Subscribe to updates in value of a device

unstage

Stop caching this signal

Attributes

log

name

Return the name of the Device

parent

The parent Device if it exists

source

//PV_PREFIX:SIGNAL, or "" if not set

async locate() Location[source]#
children() Iterator[Tuple[str, Device]]#
clear_sub(function: Callable[[T], None]) None#

Remove a subscription.

async connect(mock=False, timeout=10.0, force_reconnect: bool = False, backend: SignalBackend[T] | None = None)#
async describe() Dict[str, DataKey]#

Return a single item dict with the descriptor in it

async get_value(cached: bool | None = None) T#

The current value

property log#
property name: str#

Return the name of the Device

parent: Device | None = None#

The parent Device if it exists

async read(cached: bool | None = None) Dict[str, Reading]#

Return a single item dict with the reading in it

set(value: ~ophyd_async.core._utils.T, wait=True, timeout: float | None | ~typing.Type[~ophyd_async.core._utils.CalculateTimeout] = <class 'ophyd_async.core._utils.CalculateTimeout'>) AsyncStatus#

Set the value and return a status saying when it’s done

set_name(name: str)#

Set self.name=name and each self.child.name=name+"-child".

Parameters:

name – New name to set

property source: str#

//PV_PREFIX:SIGNAL, or β€œβ€ if not set

Type:

Like ca

stage() None#

Start caching this signal

subscribe(function: Callable[[Dict[str, Reading]], None]) None#

Subscribe to updates in the reading

subscribe_value(function: Callable[[T], None])#

Subscribe to updates in value of a device

unstage() None#

Stop caching this signal