TMC Common TMCBaseDevice

1. TMCBaseDevice

This module includes methods for common attributes.

class ska_tmc_common.v1.tmc_base_device.TMCBaseDevice(*args: Any, **kwargs: Any)

Class for common attributes.

commandTimeOut() str

Get the command timeout value.

Returns:

Current command timeout value.

Return type:

str

commandTimeOut_write(timeout_value: int) None

Set or update the command timeout value.

Parameters:

timeout_value (int) – New timeout value to set for command execution

lastDeviceInfoChanged()

Returns last device info changed in the internal model.

Returns:

last device information changed

transformedInternalModel() str

Returns entire internal model transformed for better reading

Returns:

internal model transformed

transformedInternalModel_read() str

This method consists of basic read implementation of transformedInternalModel and must be overloaded to add additional values to result dictionary. Returns json string with device data.

Returns:

result json string with device data

Sample Output:

{'mccs':{'state':'DevState.UNKNOWN','healthState':
'HealthState.UNKNOWN', 'ping':'-1','last_event_arrived':'None',
'unresponsive':'False','exception':'None',
'id':-1,'pointingState':'PointingState.NONE'}}
internalModel() str

Returns entire internal model

Returns:

internal model transformed

internalModel_read() str

This method consists of basic read implementation of InternalModel and must be overloaded to add additional attribute values to internal model. Returns json string representing internal model with basic attributes only.

Returns:

json string representing internal model with basic attributes only

Sample Output:

{"subarray_health_state":"HealthState.UNKNOWN",
"devices":[{"dev_name":"mccs","state":"DevState.UNKNOWN",
"healthState":"HealthState.UNKNOWN","ping":"-1",
"last_event_arrived":"None","unresponsive":"False",
"exception":"None","id":-1,"pointingState":"PointingState.NONE"}]}
create_component_manager()

Create and return a component manager for this device.

Raises:

NotImplementedError – for no implementation

push_change_archive_events(attribute_name: str, value: Any) None

Method to push change event and archive event of the given attribute.

Parameters:
  • attribute_name (str) – Attribute name

  • value (Any) – Attribute value need to be pushed