Helper_MCCS_Controller_Device
This module implements the Helper MCCS controller devices for testing an integrated TMC
- class ska_tmc_simulators.helper_mccs_controller_device.HelperMCCSController(*args: Any, **kwargs: Any)
Bases:
HelperBaseDeviceA helper MCCS controller device for triggering state changes with a command
- InitCommand = None
- init_device() None
- lrcProtocolVersions() tuple[int, int]
Return supported protocol versions.
- Returns:
A tuple containing the lower and upper bounds of supported long running command protocol versions.
- read_isAdminModeEnabled()
Raise an AttributeError indicating ‘isAdminModeEnabled’ is unavailable.
- Raises:
AttributeError – Always raised to block access to the attribute.
- write_isAdminModeEnabled(value: bool)
Raise an AttributeError indicating that ‘isAdminModeEnabled’ cannot be modified.
- Parameters:
value – The value attempted to set for isAdminModeEnabled.
- Raises:
AttributeError – Always raised to access to the attribute..
- resourceSummary() str
Attribute for reporting summary of resources
Returns: Formatted string containing the summary of resources
- SetDefective(values: str) None
Trigger defective change
- Param:
values
- Type:
str
- is_Allocate_allowed() bool
Check if command Allocate is allowed in the current device state.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- Allocate(argin: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes Allocate command on MCCS controller device
- Returns:
a tuple containing ResultCode and Message
- Return type:
Tuple
- is_Release_allowed() bool
Check if command Release is allowed in the current device state.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- Release(argin: str) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This method invokes Release command on MCCS controller device
- Returns:
a tuple containing Resultcode and Message
- Return type:
Tuple
- is_RestartSubarray_allowed() bool
This method checks if the RestartSubarray command is allowed in the current device state.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- RestartSubarray(argin: int) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This is the method to invoke RestartSubarray command.
- Parameters:
argin – an integer subarray_id.
- Returns:
ResultCode, command id
- Return type:
tuple
- induce_fault(command_name: str, command_id: 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.
command_id (str) – The command id over which the LRCR event is to be pushed.
Explanation: This method induces various types of faults into a device to test its robustness and error-handling capabilities. Overrided to fix time out issue on MCCS Master Leaf node.
- STUCK_IN_INTERMEDIATE_STATE:
This fault type makes it such that the device is stuck in the given Observation state.
- SetDirectResourceSummary(argin: str) None
Helper function to trigger resourceSummary attribute change.
- Args:
argin: Value to be set to resourceSummary attribute.
Returns:
- is_AbortSubarray_allowed() bool
This method checks if the AbortSubarray command is allowed in the current device state.
- Returns:
Trueif the command is allowed- Return type:
bool
- Raises:
CommandNotAllowed – command is not allowed
- AbortSubarray(argin: int) Tuple[List[ska_tango_base.commands.ResultCode], List[str]]
This is the method to invoke AbortSubarray command.
- Parameters:
argin – an integer subarray_id.
- Returns:
ResultCode, command id
- Return type:
tuple