TalonDxComponentManager Class

The TalonDxComponentManager is used to configure and start up Tango device servers on the Talon boards. These actions are performed during the On command of the CbfController. Note that these actions are not executed when the simulationMode of the CbfController is set to 1 (this is the default). Prior to sending the On command to the CbfController, the simulationMode should be set to 0 if it is desired to test the command with the Talon boards in the loop.

class ska_mid_cbf_tdc_mcs.controller.talondx_component_manager.TalonDxComponentManager(*args: Any, **kwargs: Any)[source]

Bases: CbfComponentManager

A component manager for the Talon-DX boards. Used to configure and start the Tango applications on the HPS of each board.

_configure_hps_master(talon_cfg: dict) ResultCode[source]

Send the configure command to all the DsHpsMaster devices.

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

ResultCode.OK if all configure commands were sent successfully, otherwise ResultCode.FAILED

_create_hps_master_device_proxies(talon_cfg: dict) ResultCode[source]

Attempt to create a device proxy to each DsHpsMaster device.

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

ResultCode.OK if all proxies were created successfully, otherwise ResultCode.FAILED

_secure_copy(ssh_client: paramiko.SSHClient, src: str, dest: str) None[source]

Execute a secure file copy to the specified target address.

Parameters:
  • ssh_client – SSH client for the Talon board we are trying to SCP to

  • src – Source file path

  • dest – Destination file path

Raises:

SCPException – if the file copy fails

_start_hps_master(talon_cfg: dict) ResultCode[source]

Start the DsHpsMaster on each Talon board.

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

ResultCode.OK if all HPS masters were started successfully, otherwise ResultCode.FAILED

_copy_binaries_and_bitstream(talon_cfg: dict) ResultCode[source]
Copy the relevant device server binaries and FPGA bitstream to each

Talon board.

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

ResultCode.OK if all artifacts were copied successfully, otherwise ResultCode.FAILED

_configure_talon_networking(talon_cfg: dict) ResultCode[source]
Configure the networking of the boards including DNS nameserver

and ifconfig for default gateway

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

ResultCode.OK if all artifacts were copied successfully, otherwise ResultCode.FAILED

_generate_kill_script(talon_cfg: dict) str[source]

Generate a script to kill all device processes on the Talon board

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

the script to kill all device processes

_clear_talon(talon_cfg: dict) ResultCode[source]

Clear the Talon board by sending a script to the Talon that kills all device processes

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

ResultCode.OK if script was sent successfully, otherwise ResultCode.FAILED

_configure_talon_thread(talon_cfg: dict) tuple[ska_control_model.result_code.ResultCode, str][source]
A thread to configure a single Talon board. This includes clearing the

board, configuring the networking, copying the binaries and bitstream, starting the HPS master and sending the configure command to the DsHpsMaster.

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

a tuple containing the result code and a message

_setup_tango_host_file() None[source]

Copy the hps_master_mcs.sh file from mnt into mnt/talondx-config

Returns:

ResultCode.OK if all artifacts were copied successfully, else ResultCode.FAILED

_read_config() ResultCode[source]

Read in the configuration files for the Talon boards and the hardware

Returns:

ResultCode.FAILED if any operations failed, else ResultCode.OK

configure_talons(available_talon_targets: list[str]) ResultCode[source]
Performs all actions to configure the Talon boards after power on. This includes: copying the device server

binaries and FPGA bitstream to the Talon boards, starting the HPS master device server, and sending the configure command to each DsHpsMaster, which starts the HPS device servers.

Parameters:

available_talon_targets – list of Talon board indices that are turned on and ready to configure

Returns:

ResultCode.FAILED if any operations failed, else ResultCode.OK

_shutdown_talon_thread(talon_cfg: dict) tuple[ska_control_model.result_code.ResultCode, str][source]

A thread to shutdown a single Talon board. This includes sending the shutdown command to the DsHpsMaster.

Parameters:

talon_cfg – the configuration for the Talon board

Returns:

a tuple containing the result code and a message

shutdown() ResultCode[source]

Shutdown the DsHpsMaster device with shutdown code 3. For reference, shutdown command codes: 0. Child Tango DSs only 1. Child and HPS Master Tango DSs 2. Child and HPS Master Tango DSs, reboot Talon DX board 3. Child and HPS Master Tango DSs, shut down Talon DX board

Returns:

ResultCode.OK if all shutdown commands were sent successfully, otherwise ResultCode.FAILED