TMC Common TangoClient
Tango Client Code. This class is now deprecated.
- class ska_tmc_common.tango_client.TangoClient(fqdn: str, logger: ~typing.Optional[<Mock id='140465897692640'>] = None)
NOTE: This class is now deprecated. Class for TangoClient API
- get_device_fqdn() str
Returns the Fully Qualified Device Name
(FQDN) of the Tango device server. :return: FQDN of the Tango device server
- send_command(command_name: str, command_data=None)
This method invokes command on the device server in synchronous mode.
- Parameters:
command_name – string. Name of the command
command_data – (optional) void. Parameter with the command.
- Returns:
Returns the command Result.
- Throws:
DevFailed in case of error.
- send_command_async(command_name: str, command_data=None, callback_method=None)
This method invokes command on the device server in asynchronous mode.
- Parameters:
command_name – string. Name of the command
command_data – (optional) void. Parameter with the command.
- :param
callback_method: (optional) Callback function
that should be executed after completion
of the command execution.
- Returns:
Command identifier returned by the Tango device server.
- :throws
DevFailed in case of error.
- get_attribute(attribute_name: str)
This method reads the value of the given attribute.
- :param
attribute_name: string. Name of the attribute
- Returns:
Returns the DeviceAttribute object with several fields. The attribute value is present in the value field of the object. value: Normal scalar value or NumPy array of values.
- :throws
AttributeError in case of error.
- set_attribute(attribute_name: str, value)
This method writes the value to the given attribute.
- :param
attribute_name: string. Name of the attribute
- :param
value: The value to be set. For non SCALAR attributes, it may be any sequence of sequences.
- :throw
AttributeError in case of error.
- subscribe_attribute(attr_name: str, callback_method: Callable)
Subscribes to the change event on the given attribute.
- :param
attr_name: string. Name of the attribute to subscribe change event.
- :param
callback_method: Name of callback method.
- Returns:
event_id returned by the Tango device server.
- unsubscribe_attribute(event_id: int)
Unsubscribes a client from receiving the event specified by event_id.
- :param
event_id: int. Event id of the subscription