Device Proxy Factory

A factory for creating and managing tango device proxies.

class DeviceProxyManager(logger=<Logger ska_mid_dish_manager.component_managers.device_proxy_factory (WARNING)>, thread_event=<threading.Event object>)[source]

Manage tango.DeviceProxy with a connection to a device.

Too many device proxy objects to the same device is unnecessary and probably risky; i.e. any device proxy thread dying can crash the device server process

__init__(logger=<Logger ska_mid_dish_manager.component_managers.device_proxy_factory (WARNING)>, thread_event=<threading.Event object>)[source]
factory_reset()[source]

Remove device proxy references to the devices.

Return type:

Any

wait_for_device(tango_device_proxy)[source]

Wait until it the client has established a connection with the device and/or for the device to be up and running.

Parameters:

tango_device_proxy (tango.DeviceProxy) – a client to the device

Return type:

None

Returns:

None

retry_connection(func)[source]

Return a function that retries connection to a tango device if it is not available.

This function is intended to be used as a decorator:

@retry_connection
def _create_tango_device_proxy(trl): ...
Parameters:

func (Callable) – the wrapped function

Return type:

Any

Returns:

the wrapped function