Note

Ophyd async is considered experimental until the v1.0 release and may change API on minor release numbers before then

ophyd_async.tango#

Members

TangoDevice

General class for TangoDevices.

TangoReadable

General class for readable TangoDevices.

tango_polling

Class decorator to configure polling for Tango devices.

TangoSignalBackend

get_python_type

get_dtype_extended

get_trl_descriptor

get_tango_trl

infer_python_type

infer_signal_type

make_backend

AttributeProxy

CommandProxy

ensure_proper_executor

tango_signal_r

Create a SignalR backed by 1 Tango Attribute/Command

tango_signal_rw

Create a SignalRW backed by 1 or 2 Tango Attribute/Command

tango_signal_w

Create a SignalW backed by 1 Tango Attribute/Command

tango_signal_x

Create a SignalX backed by 1 Tango Attribute/Command

class ophyd_async.tango.TangoDevice(trl: str | None = None, device_proxy: DeviceProxy | None = None, name: str = '')[source]#

General class for TangoDevices. Extends Device to provide attributes for Tango devices.

Parameters:
  • trl (str) – Tango resource locator, typically of the device server.

  • device_proxy (Optional[Union[AsyncDeviceProxy, SyncDeviceProxy]]) – Asynchronous or synchronous DeviceProxy object for the device. If not provided, an asynchronous DeviceProxy object will be created using the trl and awaited when the device is connected.

class ophyd_async.tango.TangoReadable(trl: str | None = None, device_proxy: DeviceProxy | None = None, name: str = '')[source]#

General class for readable TangoDevices. Extends StandardReadable to provide attributes for Tango devices.

Usage: to proper signals mount should be awaited: new_device = await TangoDevice(<tango_device>)

trl#

Tango resource locator, typically of the device server.

Type:

str

proxy#

AsyncDeviceProxy object for the device. This is created when the device is connected.

Type:

AsyncDeviceProxy

ophyd_async.tango.tango_polling(polling: tuple[float, float, float] | dict[str, tuple[float, float, float]] | None = None, signal_polling: dict[str, tuple[float, float, float]] | None = None)[source]#

Class decorator to configure polling for Tango devices.

This decorator allows for the configuration of both device-level and signal-level polling for Tango devices. Polling is useful for device servers that do not support event-driven updates.

Parameters:
  • polling (Optional[Union[Tuple[float, float, float],) – Dict[str, Tuple[float, float, float]]]], optional Device-level polling configuration as a tuple of three floats representing the polling interval, polling timeout, and polling delay. Alternatively, a dictionary can be provided to specify signal-level polling configurations directly.

  • signal_polling (Optional[Dict[str, Tuple[float, float, float]]], optional) – Signal-level polling configuration as a dictionary where keys are signal names and values are tuples of three floats representing the polling interval, polling timeout, and polling delay.

ophyd_async.tango.tango_signal_r(datatype: type[SignalDatatypeT], read_trl: str, device_proxy: DeviceProxy | None = None, timeout: float = 10.0, name: str = '') SignalR[SignalDatatypeT][source]#

Create a SignalR backed by 1 Tango Attribute/Command

Parameters:
  • datatype – Check that the Attribute/Command is of this type

  • read_trl – The Attribute/Command to read and monitor

  • device_proxy – If given, this DeviceProxy will be used

  • timeout – The timeout for the read operation

  • name – The name of the Signal

ophyd_async.tango.tango_signal_rw(datatype: type[SignalDatatypeT], read_trl: str, write_trl: str = '', device_proxy: DeviceProxy | None = None, timeout: float = 10.0, name: str = '') SignalRW[SignalDatatypeT][source]#

Create a SignalRW backed by 1 or 2 Tango Attribute/Command

Parameters:
  • datatype – Check that the Attribute/Command is of this type

  • read_trl – The Attribute/Command to read and monitor

  • write_trl – If given, use this Attribute/Command to write to, otherwise use read_trl

  • device_proxy – If given, this DeviceProxy will be used

  • timeout – The timeout for the read and write operations

  • name – The name of the Signal

ophyd_async.tango.tango_signal_w(datatype: type[SignalDatatypeT], write_trl: str, device_proxy: DeviceProxy | None = None, timeout: float = 10.0, name: str = '') SignalW[SignalDatatypeT][source]#

Create a SignalW backed by 1 Tango Attribute/Command

Parameters:
  • datatype – Check that the Attribute/Command is of this type

  • write_trl – The Attribute/Command to write to

  • device_proxy – If given, this DeviceProxy will be used

  • timeout – The timeout for the write operation

  • name – The name of the Signal

ophyd_async.tango.tango_signal_x(write_trl: str, device_proxy: DeviceProxy | None = None, timeout: float = 10.0, name: str = '') SignalX[source]#

Create a SignalX backed by 1 Tango Attribute/Command

Parameters:
  • write_trl – The Attribute/Command to write its initial value to on execute

  • device_proxy – If given, this DeviceProxy will be used

  • timeout – The timeout for the command operation

  • name – The name of the Signal