TalonDxLogConsumer Class

class ska_mid_cbf_mcs.talondx_log_consumer.talondx_log_consumer_device.TalonDxLogConsumer(cl, name)[source]

Bases: SKABaseDevice

TANGO device class for consuming logs from the Tango devices run on the Talon boards, converting them to the SKA format, and outputting them via the logging framework.

create_component_manager()[source]

Create the component manager LogComponentManager

Returns:

Instance of LogComponentManager

Return type:

LogComponentManager

Log(log_message: List[str])[source]

Write the log to stdout as received from TLS

Sample log: [‘1650964795495’, ‘ERROR’, ‘ska001/elt/master’, ‘TangoUtils::DeviceAttributeToCorbaAny() - A Message’, ‘’, @7f48dcc80700 [7]’]

Details of the list items here: https://tango-controls.readthedocs.io/projects/rfc/ en/latest/14/Logging.html#log-consumer

Parameters:

log_message (List[str]) – Parts of the TLS log message

SetTalonDxLogConsumerTarget(device_name: str) None[source]

Add TalonDxLogConsumer as a logging target destination on device

RemoveTalonDxLogConsumerTarget(device_name: str) None[source]

Remove TalonDxLogConsumer as a logging target destination on device

write_loggingLevel(value: LoggingLevel)[source]

Sets logging level for the device. Both the Python logger and the Tango logger are updated. Overrides the base class attribute to accept all log levels coming from HPS devices, but still limit the logging level of TalonDxLogConsumer logs.

Parameters:

value – Logging level for logger

Raises:

LoggingLevelError – for invalid value

DebugDevice()

Enable remote debugging of this device.

To modify behaviour for this command, modify the do() method of the command class: DebugDeviceCommand.

GetVersionInfo()

Return the version information of the device.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

Version details of the device.

GroupDefinitions

Device property.

Each string in the list is a JSON serialised dict defining the group_name, devices and subgroups in the group. A Tango Group object is created for each item in the list, according to the hierarchy defined. This provides easy access to the managed devices in bulk, or individually.

The general format of the list is as follows, with optional devices and subgroups keys:

[ {"group_name": "<name>",
   "devices": ["<dev name>", ...]},
  {"group_name": "<name>",
   "devices": ["<dev name>", "<dev name>", ...],
   "subgroups" : [{<nested group>},
                    {<nested group>}, ...]},
  ...
  ]

For example, a hierarchy of racks, servers and switches:

[ {"group_name": "servers",
   "devices": ["elt/server/1", "elt/server/2",
                 "elt/server/3", "elt/server/4"]},
  {"group_name": "switches",
   "devices": ["elt/switch/A", "elt/switch/B"]},
  {"group_name": "pdus",
   "devices": ["elt/pdu/rackA", "elt/pdu/rackB"]},
  {"group_name": "racks",
   "subgroups": [
        {"group_name": "rackA",
         "devices": ["elt/server/1", "elt/server/2",
                       "elt/switch/A", "elt/pdu/rackA"]},
        {"group_name": "rackB",
         "devices": ["elt/server/3", "elt/server/4",
                       "elt/switch/B", "elt/pdu/rackB"],
         "subgroups": []}
   ]} ]
LoggingLevelDefault

Device property.

Default logging level at device startup. See LoggingLevel

LoggingTargetsDefault

Device property.

Default logging targets at device startup. See the project readme for details.

Off()

Turn the device off.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

On()

Turn device on.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

Reset()

Reset the device from the FAULT state.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

SkaLevel

Device property.

Indication of importance of the device in the SKA hierarchy to support drill-down navigation: 1..6, with 1 highest.

Standby()

Put the device into standby mode.

To modify behaviour for this command, modify the do() method of the command class.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

Return type:

(ResultCode, str)

TangoClassClass

alias of TalonDxLogConsumerClass

TangoClassName = 'TalonDxLogConsumer'
adminMode

Device attribute.

buildState

Device attribute.

controlMode

Device attribute.

healthState

Device attribute.

loggingLevel

Device attribute.

See LoggingLevel

loggingTargets

Device attribute.

simulationMode

Device attribute.

testMode

Device attribute.

versionId

Device attribute.