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: HelperBaseDevice

A helper MCCS controller device for triggering state changes with a command

init_device() None
class InitCommand(*args: Any, **kwargs: Any)

Bases: InitCommand

A class for the HelperMCCSController’s init_device() “command”.

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

Stateless hook for device initialisation. :return: ResultCode, message :rtype:tuple

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..

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:

True if 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:

True if 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:

True if 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.