ska_tmc_cspmasterleafnode.commands package

Submodules

ska_tmc_cspmasterleafnode.commands.csp_master_leaf_node_command module

Command class for CSP Controller leaf node

This module defines a command class CspMLNCommand for the CSPMasterLeafNode The CspMLNCommand class provides implementation for commands that interact with the CSP Controller leaf node. It includes methods for initializing adapters, checking device responsiveness, and handling commands for both low-level and mid-level devices.

ska_tmc_cspmasterleafnode.commands.csp_master_leaf_node_command.LOGGER

The logger for the module.

Type:

logging.Logger

class ska_tmc_cspmasterleafnode.commands.csp_master_leaf_node_command.CspMLNCommand(*args: Any, **kwargs: Any)

Bases: TmcLeafNodeCommand

Abstract command class for all CspMasterLeafNode

check_unresponsive() None

Checks if the device is unresponsive

Returns:

None

do(argin=None)

Handle a command.

Parameters:

argin – Optional command argument.

do_low(argin=None)

Handle a command for the low-level device.

Parameters:

argin – Optional command argument.

do_mid(argin=None)

Handle a command for the mid-level device.

Parameters:

argin – Optional command argument.

init_adapter() Tuple[ska_tango_base.commands.ResultCode, str]

Creates adapter for underlying csp master device

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

init_adapter_low()

Initialize the adapter for the low-level device.

init_adapter_mid()

Initialize the adapter for the mid-level device.

update_task_status(**kwargs)

Update the status of a task.

Parameters:

kwargs – Keyword arguments for task status update.

wait_for_completion(device_length: int = 1) Tuple[ska_tango_base.commands.ResultCode, str]

Wait for command completion using CommandCompletionTracker

Parameters:
  • device_length (int) – Number of devices to wait for completion

  • 1) ((default is) –

Returns:

Final result code and corresponding message

Return type:

Tuple[ResultCode, str]

ska_tmc_cspmasterleafnode.commands.on_command module

On command class for CSPMasterLeafNode.

class ska_tmc_cspmasterleafnode.commands.on_command.On(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CspMasterLeafNode’s On() command.

On command on CspmasterLeafNode enables the telescope to perform further operations and observations. It Invokes On command on CSP Master device.

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke On command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

on(logger, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event: Optional[Event] = None) None

A method to invoke the On command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None

ska_tmc_cspmasterleafnode.commands.off_command module

Off command class for CSP Controller leaf node

class ska_tmc_cspmasterleafnode.commands.off_command.Off(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CspMasterLeafNode’s Off() command.

Off command on CspMasterLeafNode invokes Off command on CSP Master device.

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Off command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

off(logger, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event: Optional[Event] = None) None

A method to invoke the Off command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None

ska_tmc_cspmasterleafnode.commands.standby_command module

Standby command class for CSP Controller leaf node

class ska_tmc_cspmasterleafnode.commands.standby_command.Standby(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CSP MasterLeafNode’s Standby() command.

Standby command on CSP MasterLeafNode invokes Standby command on CSP Master device.

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Standby command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

standby(logger, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event: Optional[Event] = None) None

A method to invoke the Standby command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType,) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None

ska_tmc_cspmasterleafnode.commands.load_dish_cfg_command module

Load Dish Cfg command class for CSP Controller leaf node

class ska_tmc_cspmasterleafnode.commands.load_dish_cfg_command.LoadDishCfg(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CSP MasterLeafNode’s LoadDishCfg command.

LoadDishCfg command on CSP MasterLeafNode invokes LoadDishCfg command on CSP Master device.

check_and_validate_dish_vcc_data(argin: Dict[str, Any]) Tuple[Dict[str, Any], str]

Check and validate dish vcc data

Parameters:

argin – Input argument for the command

Returns:

A tuple where: - First element is the validated Dish ID to VCC map dictionary (empty dict if validation fails). - Second element is an error message string (empty string if validation is successful).

Return type:

Tuple[Dict[str, Any], str]

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke LoadDishCfg command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

get_dishid_vcc_map_json(initial_params: dict) Tuple[dict, str]

Get DishId-VCC map json from initial params

Parameters:

initial_param (dict) – this param containg tm data source uri and file path which is used for extracting vcc_map json file.

Returns:

Tuple (dict, str)

loadDishCfg(argin, task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) None

A method to invoke the Standby command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None

update_task_status(**kwargs: Dict[str, Union[Tuple[ska_tango_base.commands.ResultCode, str], ska_control_model.TaskStatus, str]]) None

Update the status of a task.

Parameters:

**kwargs – Keyword arguments for task status update.

ska_tmc_cspmasterleafnode.commands.set_controller_admin_mode module

SetAdminMode command class for CSPMasterLeafNode.

class ska_tmc_cspmasterleafnode.commands.set_controller_admin_mode.SetAdminMode(*args: Any, **kwargs: Any)

Bases: CspMLNCommand, FastCommand

A class for CspMasterLeafNode’s SetAdminMode() command.

SetAdminMode command on CspMasterLeafNode enables to set the adminMode of the csp controller device

do(argin: ska_control_model.AdminMode) Tuple[ska_tango_base.commands.ResultCode, str]

A method to set the adminMode of the CSP controller device

Parameters:

argin (AdminMode) – A adminMode enum value to be set for controller device

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

Module contents

Init file for CSP Controller leaf node Commands

class ska_tmc_cspmasterleafnode.commands.LoadDishCfg(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CSP MasterLeafNode’s LoadDishCfg command.

LoadDishCfg command on CSP MasterLeafNode invokes LoadDishCfg command on CSP Master device.

check_and_validate_dish_vcc_data(argin: Dict[str, Any]) Tuple[Dict[str, Any], str]

Check and validate dish vcc data

Parameters:

argin – Input argument for the command

Returns:

A tuple where: - First element is the validated Dish ID to VCC map dictionary (empty dict if validation fails). - Second element is an error message string (empty string if validation is successful).

Return type:

Tuple[Dict[str, Any], str]

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke LoadDishCfg command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

get_dishid_vcc_map_json(initial_params: dict) Tuple[dict, str]

Get DishId-VCC map json from initial params

Parameters:

initial_param (dict) – this param containg tm data source uri and file path which is used for extracting vcc_map json file.

Returns:

Tuple (dict, str)

loadDishCfg(argin, task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None, task_abort_event=None) None

A method to invoke the Standby command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None

update_task_status(**kwargs: Dict[str, Union[Tuple[ska_tango_base.commands.ResultCode, str], ska_control_model.TaskStatus, str]]) None

Update the status of a task.

Parameters:

**kwargs – Keyword arguments for task status update.

class ska_tmc_cspmasterleafnode.commands.Off(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CspMasterLeafNode’s Off() command.

Off command on CspMasterLeafNode invokes Off command on CSP Master device.

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Off command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

off(logger, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event: Optional[Event] = None) None

A method to invoke the Off command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None

class ska_tmc_cspmasterleafnode.commands.On(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CspMasterLeafNode’s On() command.

On command on CspmasterLeafNode enables the telescope to perform further operations and observations. It Invokes On command on CSP Master device.

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke On command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

on(logger, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event: Optional[Event] = None) None

A method to invoke the On command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None

class ska_tmc_cspmasterleafnode.commands.Standby(*args: Any, **kwargs: Any)

Bases: CspMLNCommand

A class for CSP MasterLeafNode’s Standby() command.

Standby command on CSP MasterLeafNode invokes Standby command on CSP Master device.

do(argin: Optional[Any] = None) Tuple[ska_tango_base.commands.ResultCode, str]

Method to invoke Standby command on CSP Master.

Returns:

Tuple of ResultCode and message

Return type:

Tuple[ResultCode, str]

standby(logger, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event: Optional[Event] = None) None

A method to invoke the Standby command. It sets the task_callback status according to command progress.

Parameters:
  • logger (logging.Logger) – logger

  • task_callback (TaskCallbackType,) – Update task state, defaults to None

  • task_abort_event (Event, optional) – Check for abort, defaults to None