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

class ophyd_async.core.Device(name: str = '')[source]#

Bases: HasName

Common base class for all Ophyd Async Devices.

By default, names and connects all Device children.

Methods

children

connect

Connect self and all child Devices.

set_name

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

Attributes

log

name

Return the name of the Device

parent

The parent Device if it exists

parent: Device | None = None#

The parent Device if it exists

property name: str#

Return the name of the Device

property log#
children() Iterator[Tuple[str, Device]][source]#
set_name(name: str)[source]#

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

Parameters:

name – New name to set

async connect(mock: bool = False, timeout: float = 10.0, force_reconnect: bool = False)[source]#

Connect self and all child Devices.

Contains a timeout that gets propagated to child.connect methods.

Parameters:
  • mock – If True then use MockSignalBackend for all Signals

  • timeout – Time to wait before failing with a TimeoutError.