TMC Common Tango Helper Devices¶
Devices and their functionality¶
Functionality¶
Pytango Devices - Similar to real devices
Fault Injection - To make devices faulty to check error handling in tango devices
Device List¶
1. Helper_CSP_Master¶
This module defines a helper device that acts as csp master in our testing.
-
class
ska_tmc_common.test_helpers.helper_csp_master_device.HelperCspMasterDevice(*args: Any, **kwargs: Any)¶ Bases:
ska_tmc_common.test_helpers.helper_base_device.HelperBaseDeviceA helper device class for Csp Controller device
-
init_device()¶
-
is_On_allowed() → bool¶
-
On(argin: list) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ ON Command
-
is_Off_allowed() → bool¶
-
Off(argin: list) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ OFF Command
-
is_Standby_allowed() → bool¶
-
Standby(argin: list) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ StandBy Command
-
2. Helper_CSP_Subarray¶
This module implements the Helper devices for subarray leaf nodes for testing an integrated TMC
-
class
ska_tmc_common.test_helpers.helper_csp_subarray_leaf_device.HelperCspSubarrayLeafDevice(*args: Any, **kwargs: Any)¶ Bases:
ska_tmc_common.test_helpers.helper_subarray_leaf_device.HelperSubarrayLeafDeviceA device exposing commands and attributes of the CSP Subarray Leaf Node devices.
-
init_device() → None¶
-
read_cspSubarrayObsState()¶ Reads the current observation state of the CSP subarray
-
SetCspSubarrayLeafNodeObsState(argin: int) → None¶ Trigger a ObsState change
-
push_obs_state_event(obs_state: ska_tango_base.control_model.ObsState) → None¶ Place holder method. This method will be implemented in the child classes.
-
3. Helper_Dish_Device¶
This module implements the Helper Dish Device for testing an integrated TMC
-
class
ska_tmc_common.test_helpers.helper_dish_device.HelperDishDevice(*args: Any, **kwargs: Any)¶ Bases:
ska_tmc_common.test_helpers.helper_base_device.HelperBaseDeviceA device exposing commands and attributes of the Dish device.
-
init_device()¶
-
read_delay() → int¶ This method is used to read the attribute value for delay.
-
read_defective() → str¶ Returns defective status of devices
- Return type
str
-
read_obsStateTransitionDuration()¶ Read transition
-
AddTransition(state_duration_info: str) → None¶ This command will set duration for dish mode such that when respective command for obs state is triggered then it change obs state after provided duration
-
ResetTransitions() → None¶ This command will reset ObsState duration which is set
-
read_commandCallInfo()¶ This method is used to read the attribute value for commandCallInfo.
-
read_commandDelayInfo() → int¶ This method is used to read the attribute value for delay.
-
SetDelay(command_delay_info: str) → None¶ Update delay value
-
ResetDelay() → None¶ Reset Delay to it’s default values
-
ClearCommandCallInfo() → None¶ Clears commandCallInfo to empty list
-
read_pointingState() → ska_tmc_common.enum.PointingState¶ This method reads the pointingState of dishes. :rtype: PointingState
-
read_dishMode() → ska_tmc_common.enum.DishMode¶ This method reads the DishMode of dishes. :rtype: DishMode
-
SetDirectDishMode(argin: ska_tmc_common.enum.DishMode) → None¶ Trigger a DishMode change
-
SetDirectPointingState(argin: ska_tmc_common.enum.PointingState) → None¶ Trigger a PointingState change
-
set_dish_mode(dishMode: ska_tmc_common.enum.DishMode) → None¶ This method set the Dish Mode
-
push_command_result(result: ska_tango_base.commands.ResultCode, command: str, exception: str = '') → None¶ Push long running command result event for given command.
- Params
result: The result code to be pushed as an event dtype: ResultCode
command: The command name for which the event is being pushed dtype: str
exception: Exception message to be pushed as an event dtype: str
-
set_pointing_state(pointingState: ska_tmc_common.enum.PointingState) → None¶ This method set the Pointing State
-
is_Off_allowed() → bool¶
-
Off()¶ OFF Command
-
is_Standby_allowed() → bool¶ This method checks if the Standby Command is allowed in current State. :rtype: bool
-
Standby() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Standby command on Dish Master :rtype: Tuple
-
is_SetStandbyFPMode_allowed() → bool¶ This method checks if the is_SetStandbyFPMode_allowed Command is allowed in current State. :rtype:bool
-
SetStandbyFPMode() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes SetStandbyFPMode command on Dish Master :rtype: tuple
-
is_SetStandbyLPMode_allowed() → bool¶ This method checks if the is_SetStandbyLPMode_allowed Command is allowed in current State. :rtype: bool
-
SetStandbyLPMode() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes SetStandbyLPMode command on Dish Master :rtype: tuple
-
is_SetOperateMode_allowed() → bool¶ This method checks if the SetOperateMode Command is allowed in current State. :rtype:bool
-
SetOperateMode() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes SetOperateMode command on Dish Master :rtype: tuple
-
is_SetStowMode_allowed() → bool¶ This method checks if the SetStowMode Command is allowed in current State. :rtype: bool
-
SetStowMode() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes SetStowMode command on Dish Master :rtype : tuple
-
is_Track_allowed() → bool¶ This method checks if the Track Command is allowed in current State. :rtype: bool
-
Track() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Track command on Dish Master :rtype: tuple
-
is_TrackStop_allowed() → bool¶ This method checks if the TrackStop Command is allowed in current State. :rtype: bool
-
TrackStop() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes TrackStop command on Dish Master
-
is_AbortCommands_allowed() → bool¶ This method checks if the AbortCommands command is allowed in current State. :rtype: bool
-
AbortCommands() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes AbortCommands command on Dish Master :rtype: tuple
-
is_Configure_allowed() → bool¶ This method checks if the Configure Command is allowed in current State. :rtype: bool
-
Configure(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Configure command on Dish Master :rtype: tuple
-
is_ConfigureBand1_allowed() → bool¶ This method checks if the ConfigureBand1 command is allowed in current State. :rtype: bool
-
ConfigureBand1(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ConfigureBand1 command on Dish Master
-
is_ConfigureBand2_allowed() → bool¶ This method checks if the ConfigureBand2 Command is allowed in current State. :rtype: bool
-
ConfigureBand2(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ConfigureBand2 command on Dish Master :rtype: tuple
-
update_dish_mode(value, command_name: str = '')¶ Sets the dish mode back to original state.
-
update_pointing_state(value, command_name)¶ Sets the dish mode back to original state.
-
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_ConfigureBand3_allowed() → bool¶ This method checks if the ConfigureBand3 Command is allowed in current State. :rtype:bool
-
ConfigureBand3(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ConfigureBand3 command on Dish Master
-
is_ConfigureBand4_allowed() → bool¶ This method checks if the ConfigureBand4 Command is allowed in current State. :rtype: bool
-
ConfigureBand4(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ConfigureBand4 command on Dish Master
-
is_ConfigureBand5a_allowed() → bool¶ This method checks if the ConfigureBand5a Command is allowed in current State. :rtype:bool
-
ConfigureBand5a(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ConfigureBand5a command on Dish Master
-
is_ConfigureBand5b_allowed() → bool¶ This method checks if the ConfigureBand5b Command is allowed in current State. :rtype:bool
-
ConfigureBand5b(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ConfigureBand5b command on Dish Master
-
is_Slew_allowed() → bool¶ This method checks if the Slew command is allowed in current State. :rtype:bool
-
Slew() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Slew command on Dish Master
-
StartCapture() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes StartCapture command on Dish Master
-
SetMaintenanceMode() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method sets the Maintainance Mode for the dish
-
is_Scan_allowed() → bool¶ This method checks if the Scan Command is allowed in current State. :rtype:bool
-
Scan() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Scan command on Dish Master
-
is_Reset_allowed() → bool¶ This method checks if the Reset command is allowed in current State. :rtype:bool
-
Reset() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Reset command on Dish Master :rtype:tuple
-
4. Helper_SDP_Subarray¶
Helper device for SdpSubarray device
-
class
ska_tmc_common.test_helpers.helper_sdp_subarray.HelperSdpSubarray(*args: Any, **kwargs: Any)¶ Bases:
ska_tmc_common.test_helpers.helper_subarray_device.HelperSubArrayDeviceA helper SdpSubarray device for triggering state changes with a command. It can be used to mock SdpSubarray’s bahavior to test error propagation from SdpSubarray to SdpSubarrayLeafNode in case of command failure
-
init_device()¶
-
read_delay() → int¶ This method is used to read the attribute value for delay.
-
read_receiveAddresses()¶ Returns receive addresses.
-
read_defective() → str¶ Returns defective status of devices
- Return type
str
-
push_command_result(result: ska_tango_base.commands.ResultCode, command: str, exception: str = '') → None¶ Push long running command result event for given command.
- Params
result: The result code to be pushed as an event dtype: ResultCode
command: The command name for which the event is being pushed dtype: str
exception: Exception message to be pushed as an event dtype: str
-
push_obs_state_event(obs_state: ska_tango_base.control_model.ObsState)¶ Place holder method. This method will be implemented in the child classes.
-
update_device_obsstate(obs_state: ska_tango_base.control_model.ObsState)¶ Updates the device obsState
-
is_On_allowed() → bool¶ Check if command On is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
On()¶ ON Command
-
is_Off_allowed() → bool¶ Check if command Off is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Off()¶ OFF Command
-
is_AssignResources_allowed()¶ Check if command AssignResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
AssignResources(argin)¶ This method invokes AssignResources command on SdpSubarray device.
-
is_ReleaseResources_allowed()¶ Check if command ReleaseResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
ReleaseResources()¶ This method invokes ReleaseResources command on SdpSubarray device.
-
is_ReleaseAllResources_allowed()¶ Check if command ReleaseAllResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
ReleaseAllResources()¶ This method invokes ReleaseAllResources command on SdpSubarray device.
-
is_Configure_allowed()¶ Check if command Configure is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Configure(argin)¶ This method invokes Configure command on SdpSubarray device.
-
is_Scan_allowed()¶ Check if command Scan is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Scan(argin)¶ This method invokes Scan command on SdpSubarray device.
-
is_EndScan_allowed()¶ Check if command EndScan is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
EndScan()¶ This method invokes EndScan command on SdpSubarray device.
-
is_End_allowed()¶ Check if command End is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
End()¶ This method invokes End command on SdpSubarray device.
-
is_Abort_allowed()¶ Check if command Abort is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Abort()¶ This method invokes Abort command on SdpSubarray device.
-
is_Restart_allowed()¶ Check if command Restart is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Restart()¶ This method invokes Restart command on SdpSubarray device.
-
5. Helper_SDP_Subarray_leaf_Device¶
This module implements the Helper devices for subarray leaf nodes for testing an integrated TMC
-
class
ska_tmc_common.test_helpers.helper_sdp_subarray_leaf_device.HelperSdpSubarrayLeafDevice(*args: Any, **kwargs: Any)¶ Bases:
ska_tmc_common.test_helpers.helper_subarray_leaf_device.HelperSubarrayLeafDeviceA device exposing commands and attributes of the CSP Subarray Leaf Nodes devices.
-
init_device() → None¶
-
read_sdpSubarrayObsState()¶ Reads the current observation state of the SDP subarray
-
SetSdpSubarrayLeafNodeObsState(argin: ska_tango_base.control_model.ObsState) → None¶ Trigger a ObsState change
-
push_obs_state_event(obs_state: ska_tango_base.control_model.ObsState) → None¶ Place holder method. This method will be implemented in the child classes.
-
induce_fault(command_name: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ Induces a fault into the device based on the given parameters.
- Parameters
command_name (str) – The name of the command for which a fault is being induced.
dtype (str) – The data type of the fault parameter.
rtype (Tuple[List[ResultCode], List[str]]) – A tuple containing two lists - the list of possible result codes and the list of error messages.
Example: defective = json.dumps( { “enabled”: False, “fault_type”: FaultType.FAILED_RESULT, “error_message”: “Default exception.”, “result”: ResultCode.FAILED, } ) defective_params = json.loads(defective)
Detailed Explanation: This method simulates inducing various types of faults into a device to test its robustness and error-handling capabilities.
FAILED_RESULT: A fault type that triggers a failed result code for the command. The device will return a result code of ‘FAILED’ along with a custom error message, indicating that the command execution has failed.
LONG_RUNNING_EXCEPTION: A fault type that simulates a command getting stuck in an intermediate state for an extended period. This could simulate a situation where a command execution hangs due to some internal processing issue.
STUCK_IN_INTERMEDIATE_STATE: This fault type represents a scenario where the device gets stuck in an intermediate state between two well-defined states. This can help test the device’s state recovery and error handling mechanisms.
COMMAND_NOT_ALLOWED: This fault type represents a situation where the given command is not allowed to be executed due to some authorization or permission issues. The device should respond with an appropriate error code and message.
- Raises
None
-
6. Helper_StateMCCS_Device¶
This module implements the Helper MCCS subarray devices for testing an integrated TMC
-
class
ska_tmc_common.test_helpers.helper_state_mccsdevice.HelperMCCSStateDevice(*args: Any, **kwargs: Any)¶ Bases:
ska_tmc_common.test_helpers.helper_base_device.HelperBaseDeviceA generic device for triggering state changes with a command
-
init_device() → None¶
-
read_assignedResources() → str¶ Reads the values of the assignedResources :rtype:str
-
is_AssignResources_allowed() → bool¶ Check if command AssignResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
AssignResources(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes AssignResources command on subarray device
- Returns
a tuple containing ResultCode and Message
- Return type
Tuple
-
is_ReleaseResources_allowed() → bool¶ Check if command ReleaseResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
ReleaseResources(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ReleaseResources command on subarray device
- Returns
a tuple conataining Resultcose and Message
- Return type
Tuple
-
7. Helper_Subarray_Device¶
This module implements the Helper devices for subarray nodes for testing an integrated TMC
-
class
ska_tmc_common.test_helpers.helper_subarray_device.HelperSubArrayDevice(*args: Any, **kwargs: Any)¶ Bases:
ska_tango_base.subarray.SKASubarrayA generic subarray device for triggering state changes with a command. It can be used as helper device for element subarray node
-
init_device()¶
-
read_obsStateTransitionDuration()¶ Read transition
-
AddTransition(state_duration_info: str) → None¶ This command will set duration for obs state such that when respective command for obs state is triggered then it change obs state after provided duration
-
ResetTransitions() → None¶ This command will reset ObsState duration which is set
-
read_commandCallInfo()¶ This method is used to read the attribute value for commandCallInfo.
-
read_commandDelayInfo()¶ This method is used to read the attribute value for delay.
-
read_raiseException() → bool¶ This method is used to read the attribute value for raise exception
- Return type
bool
-
read_commandInProgress() → str¶ This method is used to read, which command is in progress :rtype:str
-
read_defective() → str¶ This method is used to read the value of the attribute defective :rtype:bool
-
read_receiveAddresses() → str¶ This method is used to read receiveAddresses attribute :rtype:str
-
update_device_obsstate(value: ska_tango_base.control_model.ObsState, command_name: str = '') → None¶ Updates the given data after a delay.
-
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
-
create_component_manager() → ska_tmc_common.test_helpers.helper_subarray_device.EmptySubArrayComponentManager¶ This method is used to create an instance of EmptySubarrayComponentManager :return: :rtype: class
-
SetRaiseException(value: bool) → None¶ Set Raise Exception
-
SetDelay(command_delay_info: str) → None¶ Update delay value
-
ResetDelay() → None¶ Reset Delay to it’s default values
-
ClearCommandCallInfo() → None¶ Clears commandCallInfo to empty list
-
SetDirectObsState(argin: ska_tango_base.control_model.ObsState) → None¶ Trigger a ObsState change
-
SetDirectState(argin: tango.DevState) → None¶ - Trigger a DevStateif self.dev_state() != argin:
- self.set_state(argin)
change
-
SetDirectHealthState(argin: ska_tango_base.control_model.HealthState) → None¶ Trigger a HealthState change
-
SetDirectCommandInProgress(argin: str) → None¶ Trigger a CommandInProgress change
-
is_On_allowed() → bool¶ Check if command On is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
On() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ ON Command
-
is_Off_allowed() → bool¶ Check if command Off is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
induce_fault(command_name: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ Induces a fault into the device based on the given parameters.
- Parameters
command_name (str) – The name of the command for which a fault is being induced.
dtype (str) – The data type of the fault parameter.
rtype (Tuple[List[ResultCode], List[str]]) – A tuple containing two lists - the list of possible result codes and the list of error messages.
Example: defective = json.dumps( { “enabled”: False, “fault_type”: FaultType.FAILED_RESULT, “error_message”: “Default exception.”, “result”: ResultCode.FAILED, } ) defective_params = json.loads(defective)
Detailed Explanation: This method simulates inducing various types of faults into a device to test its robustness and error-handling capabilities.
FAILED_RESULT: A fault type that triggers a failed result code for the command. The device will return a result code of ‘FAILED’ along with a custom error message, indicating that the command execution has failed.
LONG_RUNNING_EXCEPTION: A fault type that simulates a command getting stuck in an intermediate state for an extended period. This could simulate a situation where a command execution hangs due to some internal processing issue.
STUCK_IN_INTERMEDIATE_STATE: This fault type represents a scenario where the device gets stuck in an intermediate state between two well-defined states. This can help test the device’s state recovery and error handling mechanisms.
COMMAND_NOT_ALLOWED: This fault type represents a situation where the given command is not allowed to be executed due to some authorization or permission issues. The device should respond with an appropriate error code and message.
- Raises
None
-
SetDefective(values: str) → None¶ Trigger defective change :param: values :type: str
-
Off() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ OFF Command
-
is_Standby_allowed() → bool¶ Check if command Standby is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Standby() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Standby command on subarray devices :return: ResultCode, message :rtype: tuple
-
is_AssignResources_allowed() → bool¶ Check if command AssignResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
AssignResources(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes AssignResources command on subarray devices
-
wait_and_update_exception(command_name)¶ Waits for 5 secs before pushing a longRunningCommandResult event.
-
is_ReleaseResources_allowed() → bool¶ Check if command ReleaseResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
ReleaseResources() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ReleaseResources command on subarray device
-
is_ReleaseAllResources_allowed() → bool¶ Check if command ReleaseAllResources is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
ReleaseAllResources() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes ReleaseAllResources command on subarray device :return: ResultCode, message :rtype: tuple
-
is_Configure_allowed() → bool¶ Check if command Configure is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Configure(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Configure command on subarray devices :return: ResultCode, message :rtype: tuple
-
is_Scan_allowed() → bool¶ Check if command Scan is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Scan(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Scan command on subarray devices. :return: ResultCode, message :rtype: tuple
-
is_EndScan_allowed() → bool¶ Check if command EndScan is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
EndScan() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes EndScan command on subarray devices. :return: ResultCode, message :rtype: tuple
-
is_End_allowed() → bool¶ Check if command End is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
End() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes End command on subarray devices. :return: ResultCode, message :rtype: tuple
-
is_GoToIdle_allowed() → bool¶ Check if command GoToIdle is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
GoToIdle() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes GoToIdle command on subarray devices. :return: ResultCode, message :rtype: tuple
-
is_ObsReset_allowed() → bool¶ Check if command ObsReset is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
ObsReset() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ ObsReset Command
-
is_Abort_allowed() → bool¶ Check if command Abort is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Abort() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Abort command on subarray devices. :return: ResultCode, message :rtype: tuple
-
is_Restart_allowed() → bool¶ Check if command Restart is allowed in the current device state.
- Returns
Trueif the command is allowed- Return type
boolean
-
Restart() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This method invokes Restart command on subarray devices :return: ResultCode, message :rtype: tuple
-
8. Helper_Subarray_Leaf_Device¶
This module implements the Helper devices for subarray leaf nodes for testing an integrated TMC
-
class
ska_tmc_common.test_helpers.helper_subarray_leaf_device.HelperSubarrayLeafDevice(*args: Any, **kwargs: Any)¶ Bases:
ska_tmc_common.test_helpers.helper_base_device.HelperBaseDeviceA device exposing commands and attributes of the Subarray Leaf Nodes devices.
-
init_device() → None¶
-
read_defective() → str¶ Returns defective status of devices
- Return type
dict
-
read_delay() → int¶ This method is used to read the attribute value for delay.
-
read_obsState() → ska_tango_base.control_model.ObsState¶ This method is used to read the attribute value for obsState.
-
SetDirectObsState(value: ska_tango_base.control_model.ObsState) → None¶ Trigger defective change :param: values :type: str
-
SetDelay(value: int) → None¶ Update delay value
-
push_command_result(result: ska_tango_base.commands.ResultCode, command: str, exception: str = '') → None¶ Push long running command result event for given command.
- Params
result: The result code to be pushed as an event dtype: ResultCode
command: The command name for which the event is being pushed dtype: str
exception: Exception message to be pushed as an event dtype: str
-
push_obs_state_event(obs_state: ska_tango_base.control_model.ObsState) → NotImplementedError¶ Place holder method. This method will be implemented in the child classes.
-
update_device_obsstate(obs_state: ska_tango_base.control_model.ObsState)¶ Updates the device obsState
-
is_On_allowed() → bool¶
-
On() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ ON Command
-
is_Off_allowed() → bool¶
-
Off() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ OFF Command
-
is_Standby_allowed() → bool¶
-
Standby() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ StandBy Command
-
is_AssignResources_allowed() → bool¶ This method checks if the AssignResources command is allowed or not
-
AssignResources(argin: str = '') → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke AssignResources command. :return: ResultCode, message :rtype: tuple
-
is_Configure_allowed() → bool¶ This method checks the Configure is allowed in the current device state. :rtype:bool
-
Configure(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke Configure command. :return: ResultCode, message :rtype: tuple
-
is_Scan_allowed() → bool¶ This method checks if the Scan command is allowed in the current device state. :rtype:bool
-
Scan(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke Scan command. :return: ResultCode, message :rtype: tuple
-
is_EndScan_allowed() → bool¶ This method checks if the EndScan command is allowed in the current device state. :rtype:bool
-
EndScan() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke EndScan command. :return: ResultCode, message :rtype: tuple
-
is_End_allowed() → bool¶ This method checks if the End command is allowed in the current device state. :rtype:bool
-
End() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke End command. :return: ResultCode, message :rtype: tuple
-
is_GoToIdle_allowed() → bool¶ This method checks if the GoToIdle command is allowed in the current device state. :rtype:bool
-
GoToIdle() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke GoToIdle command. :return: ResultCode, message :rtype: tuple
-
is_Abort_allowed() → bool¶ This method checks if the Abort command is allowed in the current device state. :rtype:bool
-
Abort() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke Abort command. :return: ResultCode, message :rtype: tuple
-
is_Restart_allowed() → bool¶ This method checks if the Restart command is allowed in the current device state. :rtype:bool
-
Restart() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke Restart command. :return: ResultCode, message :rtype: tuple
-
is_ReleaseAllResources_allowed() → bool¶ This method checks if the ReleaseAllResources command is allowed in the current device state. :return: ResultCode, message :rtype: tuple
-
ReleaseAllResources() → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke ReleaseAllResources command. :return: ResultCode, message :rtype: tuple
-
is_ReleaseResources_allowed() → bool¶ This method checks if the ReleaseResources command is allowed in the current device state. :return: ResultCode, message :rtype: tuple
-
ReleaseResources(argin: str) → Tuple[List[ska_tango_base.commands.ResultCode], List[str]]¶ This is the method to invoke ReleaseResources command. :return: ResultCode, message :rtype: tuple
-
Conclusion¶
This module contain all helper devices required in TMC for testing and debugging