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.epics.Channel#

class ophyd.v2.epics.Channel(pv: str, datatype: Type[T])#

Bases: Generic[T]

An abstraction to a CA/PVA/Sim channel

Methods

connect

Connect to PV

get_descriptor

Metadata like source, dtype, shape, precision, units

get_reading

The current value, timestamp and severity

get_value

The current value

monitor_reading_value

Observe changes to the current value, timestamp and severity.

put

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

Attributes

source

Like ca://PV_PREFIX:SIGNAL, or None if not set

abstract async connect()#

Connect to PV

Raises:
NotConnected if cancelled
abstract async get_descriptor() Descriptor#

Metadata like source, dtype, shape, precision, units

abstract async get_reading() Reading#

The current value, timestamp and severity

abstract async get_value() T#

The current value

abstract monitor_reading_value(callback: Callable[[Reading, T], None]) Monitor#

Observe changes to the current value, timestamp and severity.

abstract async put(value: T, wait=True)#

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

abstract property source: str#

Like ca://PV_PREFIX:SIGNAL, or None if not set