ska_oso_oet.tango
The ska_oso_oet.tango module contains code that could be called from observing scripts. Primarily, this will
involve interactions with ska_oso_oet.tango.TangoExecutor
.
- class ska_oso_oet.tango.TangoExecutor(proxy_factory=<ska_oso_oet.tango.TangoDeviceProxyFactory object>)[source]
TangoExecutor is the proxy between calling code and Tango devices. It accepts encapsulated Tango interactions and performs them on behalf of the calling code.
- __init__(proxy_factory=<ska_oso_oet.tango.TangoDeviceProxyFactory object>)[source]
Create a new TangoExecutor.
- Parameters:
proxy_factory – a function or object which, when called, returns an object that conforms to the PyTango DeviceProxy interface.
- execute(command: Command, **kwargs)[source]
Execute a Command on a Tango device.
Additional kwargs to the DeviceProxy can be specified if required.
- Parameters:
command – the command to execute
- Returns:
the response, if any, returned by the Tango device
- read(attribute: Attribute)[source]
Read an attribute on a Tango device.
- Parameters:
attribute – the attribute to read
- Returns:
the attribute value
- class ska_oso_oet.tango.Attribute(device: str, name: str)[source]
An abstraction of a Tango attribute.
- class ska_oso_oet.tango.Command(device: str, command_name: str, *args, **kwargs)[source]
An abstraction of a Tango command.
- __init__(device: str, command_name: str, *args, **kwargs)[source]
Create a Tango command. :param device: the FQDN of the target Tango device :param command_name: the name of the command to execute :param args: unnamed arguments to be passed to the command :param kwargs: keyword arguments to be passed to the command