Helper_Dish_LN_Device

This module implements the Helper Dish Leaf Node Device for testing an integrated TMC.

class ska_tmc_simulators.helper_dish_ln_device.HelperDishLNDevice(*args: Any, **kwargs: Any)

Bases: HelperBaseDevice

A device exposing commands and attributes of the Dish Leaf Node device.

InitCommand = None
init_device() None
delete_device()
read_kValueValidationResult() str

Get the k-value validation result.

Returns:

kValue validation result

Return type:

str

read_trackTableErrors()

Read method for trackTableErrors

sourceOffset() list[float]

This attribute is used for storing the commanded offsets received as a part of delta/partial configuration. This attribute is subscribed by SDP queue connector device.

Returns:

sourceOffset

sdpQueueConnectorFqdn(sdpqc_fqdn: str) None

This Method is used to get the SDP queue connector FQDN from subarray node and then Dish Leaf Node have to subscribe to its respective pointing_cal attribute on queue connector device.

kValue(kvalue: int) None

Set memorized dish vcc map

Parameters:

kvalue (int) – dish vcc config json string

gpmVersion(value: str) None

Update the Global Pointing Model (GPM) metadata JSON string.

Parameters:

value – string representing the GPM version mapping.

gpmValidationResult() str

Bandwise validation result of the Global Pointing Model.

read_defective() str

Returns defective status of devices

Returns:

defective status of devices

Return type:

str

read_actualPointing() str

Read method for actual pointing.

Returns:

actual pointing value

read_pointingState() PointingState

This method reads the pointingState of of dish leaf node’s respective dish.

Returns:

pointingState of dishes

Return type:

PointingState

read_dishMode() DishMode

This method reads the DishMode of dishes of dish leaf node’s respective dish.

Returns:

DishMode of dishes

Return type:

DishMode

SetDirectDishMode(argin: DishMode) None

Trigger a DishMode change

SetDirectPointingState(argin: PointingState) None

Trigger a PointingState change

process_pointing_cal(event_data: tango.EventData) None

This Method takes the pointing calibration data from SDP queue connector device and invokes the TrackLoadStaticOff command on the Dish Master

set_dish_mode(dishMode: DishMode) None

This method set the Dish Mode

set_pointing_state(pointingState: PointingState) None

This method set the Pointing State of dish leaf node’s respective dish.

set_offset(cross_elevation: float, elevation: float) None

Sets the offset for Dish.

SetDirectkValueValidationResult(result_code: str) None

Set the kValuValidationResult

Parameters:

result_code (str) – Set the kValue validation result

Return type:

None

SetSourceOffset(sourceOffset: list) None

Sets the commanded offsets

read_commandCallInfo()

This method is used to read the attribute value for commandCallInfo.

Returns:

command_call_info value

read_commandDelayInfo() str

This method is used to read the attribute value for delay.

Returns:

command_delay_infp value

push_dish_kvalue_validation_result()

Push Dish k-value Validation result event If memorized k-value already set then push Result Code as OK else push result code event as UNKNOWN

push_dish_kvalue_val_result_after_initialization()

This method gets invoked only once after initialization and push the k-value validation result.

is_SetKValue_allowed() bool

This method checks if the SetKValue Command is allowed in current State.

Returns:

boolean value if command is allowed or not

Return type:

bool

SetKValue(kvalue: int) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This command invokes SetKValue command on Dish Master.

Parameters:

kvalue – k value between range 1-2222.

Kvalue dtype:

int

Returns:

ResultCode and message

Return type:

Tuple[List[ResultCode], List[str]]

SetDelayInfo(command_delay_info: str) None

Update delay value

ResetDelayInfo() None

Reset Delay to it’s default values

ClearCommandCallInfo() None

Clears commandCallInfo to empty list

is_Off_allowed() bool

This method checks if the Off Command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

execute_Off()

This method invokes Off command on Dish Simulator.

is_SetStandbyFPMode_allowed() bool

This method checks if the is_SetStandbyFPMode_allowed Command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

SetStandbyFPMode() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes SetStandbyFPMode command on Dish Master

Returns:

ResultCode and message

Return type:

tuple

is_SetStandbyLPMode_allowed() bool

This method checks if the is_SetStandbyLPMode_allowed Command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

SetStandbyLPMode() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes SetStandbyLPMode command on Dish Master

Returns:

ResultCode and message

Return type:

tuple

is_SetStowMode_allowed() bool

This method checks if the SetStowMode Command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

SetStowMode() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes SetStowMode command on Dish Master

Returns:

ResultCode and message

Return type:

Tuple[List[ResultCode], List[str]]

is_Track_allowed() bool

This method checks if the Track Command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

Track() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes Track command on Dish Master

Returns:

ResultCode and message

Return type:

tuple

is_TrackStop_allowed() bool

This method checks if the TrackStop Command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

TrackStop() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes TrackStop command on Dish Master

Returns:

ResultCode and message

Return type:

tuple

is_Abort_allowed() bool

This method checks if the Abort command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

Abort() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes Abort command on Dish Master

Returns:

ResultCode and message

Return type:

tuple

is_Configure_allowed() bool

This method checks if the Configure Command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

Configure(argin: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes Configure command on Dish Master

Returns:

ResultCode and message

Return type:

tuple

is_TrackLoadStaticOff_allowed() bool

This method checks if the TrackLoadStaticOff command is allowed in current State.

Returns:

True if the command is allowed

Return type:

bool

Raises:

CommandNotAllowed – command is not allowed

TrackLoadStaticOff(argin: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes TrackLoadStaticOff command on Dish Master.

Parameters:

argin – A list containing scan_id/ time, cross elevation and elevation offsets.

Argin dtype:

str(List)

Returns:

ResultCode and message

Return type:

Tuple[List[ResultCode], List[str]]

update_command_info(command_name: str = '', command_input: str = '') None

This method updates the commandCallInfo attribute, with the respective command information.

Args:
  • command_name (str): command name

  • command_input (str): Input argin for command

is_Scan_allowed() bool | CommandNotAllowed

This method checks if the Scan Command is allowed in current State.

Returns:

True if the command is allowed

Raises:

CommandNotAllowed – command is not allowed

Return type:

Union[bool,CommandNotAllowed]

Scan(argin: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes Scan command on Dish Master

Parameters:

argin – scan_id as and string.

Returns:

ResultCode and message

Return type:

Tuple[List[ResultCode], List[str]]

extract_band_and_version(gpm_data: dict) Tuple[str, str]

Extract the band and version from the GPM metadata JSON.

Args:

gpm_data (dict): The parsed GPM metadata JSON. Expected to contain keys for the file path (to determine the band) and the interface (to determine the version).

Returns:
Tuple[str, str]: A tuple containing:
  • band (str): The band extracted from the file path.

  • version (str): The version extracted from the interface.

ApplyPointingModel(global_pointing_data: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes ApplyPointingModel command on Dish Master

Parameters:

global_pointing_data – input json string.

Returns:

ResultCode and message

Return type:

Tuple[List[ResultCode], List[str]]

is_EndScan_allowed() bool | CommandNotAllowed

This method checks if the EndScan Command is allowed in current State.

:rtype:bool :raises CommandNotAllowed: command is not allowed :rtype: Union[bool,CommandNotAllowed]

EndScan() Tuple[List[ska_tango_base.commands.ResultCode], List[str]]

This method invokes EndScan command on Dish Master

Returns:

ResultCode and message

Return type:

Tuple[List[ResultCode], List[str]]