mxcubecore.utils.tango#

Functions

add_attribute_channel(hwo, tango_device, ...)

Utility function to add Tango attribute Channel to a hardware object.

Exceptions

TangoAttributeReadError(attribute_name)

exception mxcubecore.utils.tango.TangoAttributeReadError(attribute_name: str)[source]#

Bases: Exception

Parameters:

attribute_name (str) –

mxcubecore.utils.tango.add_attribute_channel(hwo: HardwareObject, tango_device: str, attribute_name: str, polling: int, update_callback=None) TangoChannel[source]#

Utility function to add Tango attribute Channel to a hardware object.

This function adds a Channel object to specified hardware object and checks that it’s possible to read the specified tango attribute.

If there is errors reading the attribute, the TangoAttributeReadError exception is raised.

Parameters:
  • hwo (HardwareObject) – The hardware object where to add the Channel object.

  • tango_device (str) – Tango device name.

  • attribute_name (str) – The tango attribute name.

  • polling (int) – Attribute polling periodicity.

  • update_callback – Optional callback, if provided it is connected to “update” signal of Channel object

Return type:

TangoChannel