ska_tmc_mccsmasterleafnode package

Subpackages

Submodules

ska_tmc_mccsmasterleafnode._mccs_master_leaf_node module

This module uses the SKA Control Model for health state definitions and SKA Tango Base for the base device class.

class ska_tmc_mccsmasterleafnode.mccs_master_leaf_node.MccsMasterLeafNode(*args: Any, **kwargs: Any)

Bases: TMCBaseLeafDevice

MccsMasterLeafNode class acts as an MCCS contact point for the Master Node

and also to monitor and issue commands to the MCCS Master.

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

Invokes the AssignResources command on the MCCS Controller.

Parameters:

argin – JSON-formatted string containing an integer subarray ID and resources to be allocated.

Returns:

A tuple containing a list of result codes and a list of unique IDs.

Return type:

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

Example:
>>> proxy = tango.DeviceProxy("ska_low/tm_leaf_node/mccs_master")
>>> proxy.AssignResources(
        json.dumps(
        {
            "interface": "https://schema.skao.int/
            ska-low-mccs-controller-allocate/3.0",
            "subarray_id": 1,
                "subarray_beams": [
                {
                    "subarray_beam_id": 1,
                    "apertures": [
                    {
                        "station_id": 1,
                        "aperture_id": "AP001.01"
                    },
                    {
                        "station_id": 1,
                        "aperture_id": "AP001.02"
                    },
                    {
                        "station_id": 2,
                        "aperture_id": "AP002.01"
                    },
                    {
                        "station_id": 2,
                        "aperture_id": "AP002.02"
                    },
                    {
                        "station_id": 3,
                        "aperture_id": "AP003.01"
                    }
                    ],
                    "number_of_channels": 32
                }
            ]
            }
        )
class InitCommand(*args: Any, **kwargs: Any)

Bases: InitCommand

A class for MCCSMasterLeafNode’s init_device() method.

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

Initializes the attributes and properties of the MccsMasterLeafNode

Returns:

A tuple containing a return code and a string message indicating status.

Return type:

(ResultCode, str)

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

Invokes the Off command on the MCCS Controller.

Returns:

A tuple containing a list of result codes and a list of unique IDs.

Return type:

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

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

Invokes the On command on the MCCS Controller.

Returns:

A tuple containing a list of result codes and a list of unique IDs.

Return type:

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

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

Invokes the ReleaseAllResources command on the MCCS Controller.

Parameters:

argin – JSON-formatted string containing the subarray ID to release resources from.

Returns:

A tuple containing a list of result codes and a list of unique IDs.

Return type:

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

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

Invokes the Standby command on the MCCS Controller.

Returns:

A tuple containing a list of result codes and a list of unique IDs.

Return type:

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

always_executed_hook()
create_component_manager()

Returns Mccs Master Leaf Node component manager object

delete_device()

Clean up resources when the device is deleted.

init_command_objects()

Initialises the command handlers for commands supported by this device.

is_AssignResources_allowed() bool
Checks whether the AssignResources command is allowed to be run in the

current device state.

Returns:

True if the AssignResources command is allowed to be run in the current device state.

Return type:

bool

is_Off_allowed() Union[bool, ska_tmc_common.exceptions.CommandNotAllowed, ska_tmc_common.exceptions.DeviceUnresponsive]
Checks whether the Off command is allowed to be run in the current

device state.

Returns:

True if the Off command is allowed to be run in the current device state.

Return type:

bool, CommandNotAllowed, DeviceUnresponsive

is_On_allowed() Union[bool, ska_tmc_common.exceptions.CommandNotAllowed, ska_tmc_common.exceptions.DeviceUnresponsive]
Checks whether the On command is allowed to be run in the current

device state.

Returns:

True if the On command is allowed to be run in the current device state.

Return type:

bool, CommandNotAllowed, DeviceUnresponsive

is_ReleaseAllResources_allowed() bool
Checks whether the ReleaseAllResources command is allowed to be run

in the current device state.

Returns:

True if the ReleaseAllResources command is allowed to be run in the current device state.

Return type:

bool

is_Standby_allowed() Union[bool, ska_tmc_common.exceptions.CommandNotAllowed, ska_tmc_common.exceptions.DeviceUnresponsive]
Checks whether the Standby command is allowed to be run in the current

device state.

Returns:

True if the Standby command is allowed to be run in the current device state.

Return type:

bool, CommandNotAllowed, DeviceUnresponsive

read_isSubsystemAvailable() bool

Returns the isSubsystemAvailable attribute.

read_mccsMasterDevName() str

Returns the mccsMasterDevName attribute.

update_availablity_callback(availablity: bool) None

Change event callback for isSubsystemAvailable.

write_mccsMasterDevName(value: str) None

Sets the mccsMasterDevName attribute.

ska_tmc_mccsmasterleafnode.mccs_master_leaf_node.main(args=None, **kwargs)

Runs the MccsMasterLeafNode. :param args: Arguments internal to TANGO

Parameters:

kwargs – Arguments internal to TANGO

Returns:

MccsMasterLeafNode TANGO object.

Module contents

MccsMasterLeafNode