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

class ophyd.v2.epics.EpicsSignalRW(datatype: Type[T], read_pv: Optional[str] = None, write_pv: Optional[str] = None)#

Bases: EpicsSignalW[T], EpicsSignalR[T], SignalRW[T]

Readable and Writeable EPICS Signal backed by one or two PVs

Methods

clear_sub

Remove a subscription.

connect

Connect self and all child Devices.

describe

Return a single item dict with the descriptor in it

get_value

The current value

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

name

Return the name of the Device

parent

The parent Device if it exists

source

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

datatype

Request that underlying PV connection is made using this Python datatype

read_pv

Read PV.

read_channel

Read Channel.

write_pv

Write PV.

write_channel

Write Channel.

datatype: Type[T]#

Request that underlying PV connection is made using this Python datatype

read_pv: Optional[str]#

Read PV. Can be prefixed by passing prefix in connect()

read_channel: Channel[T]#

Read Channel. A connected instance will be set in connect()

write_pv: Optional[str]#

Write PV. Can be prefixed by passing prefix in connect()

write_channel: Channel[T]#

Write Channel. A connected instance will be set in connect()

async connect(prefix: str = '', sim=False)#

Connect self and all child Devices.

Parameters:
prefix:

Device specific prefix that can be used to nest Devices one within another. For example a PV prefix.

sim:

If True then connect in simulation mode.

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

Remove a subscription.

async describe() Dict[str, Descriptor]#

Return a single item dict with the descriptor in it

async get_value(cached: Optional[bool] = None) T#

The current value

property name: str#

Return the name of the Device

parent: Optional[Device] = None#

The parent Device if it exists

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

Return a single item dict with the reading in it

set(value: T, wait=True) 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, do nothing if blank or name is all set

property source: str#

Like ca://PV_PREFIX:SIGNAL, or “” if not set

stage() List[Any]#

Start caching this signal

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

Subscribe to updates in the reading

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

Subscribe to updates in value of a device

unstage() List[Any]#

Stop caching this signal