ska_tmc_subarraynode package

Subpackages

Submodules

subarraynode_node

Path: src/ska_tmc_subarraynode/subarray_node.py

Subarray Node Provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray.

class ska_tmc_subarraynode.subarray_node.BaseSubarrayNode(*args, **kwargs)

Bases: SKASubarray, TMCBaseDevice

Provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray.

BaseSubarrayNode class is inherited from SKASubarray class and TMCBaseDevice class. TMCBaseDevice class is further inherited from SKABaseDevice class.

Common attributes and device_properties within TMC nodes are getting inherited from TMCBaseDevice.

Device Properties
SdpSubarrayLNFQDN:

This property contains the FQDN of the SDP Subarray Leaf Node associated with the Subarray Node.

CspSubarrayLNFQDN:

This property contains the FQDN of the CSP Subarray Leaf Node associated with the Subarray Node.

CspSubarrayFQDN:

FQDN of the CSP Subarray Tango Device Server.

SdpSubarrayFQDN:

FQDN of the SDP Subarray Tango Device Server.

Device Attributes
scanID:

ID of ongoing SCAN

sbID:

ID of ongoing Scheduling Block

isSubarrayAvailable:

Shows availability of subarray device

class InitCommand(*args, **kwargs)

Bases: InitCommand

A class for the TMC SubarrayNode’s init_device() method.

do()

Initializes the attributes and properties of the Subarray Node.

Returns

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

rtype:

(ReturnCode, str)

Raises

DevFailed if the error while subscribing the tango attribute

Off()

Invokes Off command on SubarrayNode

On()

Invokes On command on SubarrayNode

Standby()

Invokes Standby command on SubarrayNode

always_executed_hook()

Internal construct of TANGO.

create_component_manager()

Create component manager object for command invocation.

delete_device()
init_command_objects()

Initialises the command handlers for commands supported by this device.

internalModel_read()
is_Abort_allowed()

Check if command Abort is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_AssignResources_allowed()

Return whether the AssignResource command may be called in the current state.

Returns

whether the command may be called in the current device state

Return type

bool

is_Configure_allowed()

Check if command Configure is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_EndScan_allowed()

Check if command EndScan is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_End_allowed()

Check if command End is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_Off_allowed()

Checks whether the command is allowed to be run in the current state

Returns

True if this command is allowed to be run in current device state, False otherwise,

Return type

boolean

Raises

DevFailed if this command is not allowed to be run in current device state

is_On_allowed()

Checks whether the command is allowed to be run in the current state

Returns

True if this command is allowed to be run in current device state, False otherwise.

Return type

boolean

Raises

DevFailed if this command is not allowed to be run in current device state

is_ReleaseAllResources_allowed()

Check if command ReleaseAllResources is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_Restart_allowed()

Check if command Restart is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_Scan_allowed()

Check if command Scan is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_SetAdminMode_allowed()

Check if command Restart is allowed in the current device state.

Returns

True if the command is allowed

Return type

boolean

is_Standby_allowed()

Checks whether the command is allowed to be run in the current state

Returns

True if this command is allowed to be run in current device state, False otherwise.

Return type

boolean

Raises

DevFailed if this command is not allowed to be run in current device state

read_assignedResources()

Returns assignedResources attribute value.

read_isAdminModeEnabled()

Return the isAdminModeEnabled attribute value

Return type

bool

read_isSubarrayAvailable()

Return the TMC Subarray availability status. True/False

read_sbID()

Internal construct of TANGO. Returns the scheduling block ID.

read_scanID()

Internal construct of TANGO. Returns the Scan ID.

EXAMPLE: 123

Where 123 is a Scan ID from configuration json string.

scanDuration()

This attribute is used for exposing the scan duration of ongoing scan to other subsystems. :rtype: float :return: str

transformedInternalModel_read()
update_assigned_resources_callback(assigned_resources)

Triggers a push change event for the assigned resources.

update_device_callback(dev_info)

Updates the last device information changed and triggers a push change event.

update_scan_duration_callback(scan_duration)

Triggers a push change event for the change in scan duration. :type scan_duration: float :param scan_duration: scan duration :type scan_duration: float

Return type

None

update_subarray_availability_status_callback(subarray_availability)

Triggers a push change event for the isSubarrayAvailable.

update_subarray_health_state_callback(subarray_health_state)

This method updates the subarray health state and triggers a push change event.

write_isAdminModeEnabled(value)

Set the value of isAdminModeEnabled attribute

subarraynode_node_low

Path: src/ska_tmc_subarraynode/subarray_node_low.py

Subarray Node Low provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray Low.

class ska_tmc_subarraynode.subarray_node_low.LowTmcSubarray(*args, **kwargs)

Bases: BaseSubarrayNode

Provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray.

Device Properties
MccsSubarrayLNFQDN:

This property contains the FQDN of the MCCS Subarray Leaf Node associated with the Subarray Node.

MccsSubarrayFQDN:

This property contains the FQDN of the MCCS Subarray associated with the Subarray Node.

Device Attributes

class InitCommand(*args, **kwargs)

Bases: InitCommand

A class for the TMC LowTmcSubarray’s init_device() method.

do()

Initializes the attributes and properties of the Subarray Node Mid.

Returns

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

rtype:

(ReturnCode, str)

Raises

DevFailed if the error while subscribing the tango attribute

create_component_manager()

create instance of component manager

ska_tmc_subarraynode.subarray_node_low.main(args=None, **kwargs)

Runs the LowTmcSubarray. :type args: :param args: Arguments internal to TANGO :type kwargs: :param kwargs: Arguments internal to TANGO :return: LowTmcSubarray TANGO object.

subarraynode_node_mid

Path: src/ska_tmc_subarraynode/subarray_node_mid.py

Subarray Node Mid provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray Mid.

class ska_tmc_subarraynode.subarray_node_mid.MidTmcSubarray(*args, **kwargs)

Bases: BaseSubarrayNode

Provides the monitoring and control interface required by users as well as other TM Components (such as OET, Central Node) for a Subarray.

Device Properties
DishLeafNodePrefix:

Device name prefix for the Dish Leaf Node.

Device Attributes

class InitCommand(*args, **kwargs)

Bases: InitCommand

A class for the TMC MidTmcSubarray’s init_device() method.

do()
Initializes the attributes and properties of the

Subarray Node Mid.

Returns

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

rtype:

(ReturnCode, str)

Raises

DevFailed if the error while subscribing the tango attribute

create_component_manager()

Create component manager object for command invocation.

ska_tmc_subarraynode.subarray_node_mid.main(args=None, **kwargs)

Runs the SubarrayNode. :type args: :param args: Arguments internal to TANGO :type kwargs: :param kwargs: Arguments internal to TANGO :return: SubarrayNode TANGO object.

exceptions

Path: src/ska_tmc_subarraynode/exceptions.py

This module has custom exception for repository ska_tmc_subarraynode

exception ska_tmc_subarraynode.exceptions.CommandNotAllowed

Bases: Exception

Raised when a command is not allowed.

exception ska_tmc_subarraynode.exceptions.DeviceUnresponsive

Bases: Exception

Raised when a device is not responsive.

exception ska_tmc_subarraynode.exceptions.InvalidObsStateError

Bases: ValueError

Raised when subarray is not in required obsState.

release

Path: src/ska_tmc_subarraynode/release.py

Release information for Python Package

transaction_id

Path: src/ska_tmc_subarraynode/transaction_id.py

This module is for identifing and changing the transaction ids

ska_tmc_subarraynode.transaction_id.identify_with_id(name, arg_name)

This method decorator that identifies a transaction with a unique ID and adds it to the wrapped function’s object.

ska_tmc_subarraynode.transaction_id.inject_id(obj, data)

This method injecting a transaction id

Return type

Dict

ska_tmc_subarraynode.transaction_id.inject_with_id(arg_position, arg_name)

For this method A decorator that injects an ID field into a dictionary-like argument of a function.

ska_tmc_subarraynode.transaction_id.update_with_id(obj, parameters)

Updates the given dictionary-like obj with an ID field and the values in parameters.

Return type

Union[Dict, str]

Module contents

Properties in Subarray Node

Property Name

Data Type

Description

CspSubarrayLNFQDN

DevString

FQDN of the CSP Subarray Leaf Node device

SdpSubarrayLNFQDN

DevString

FQDN of the SDP Subarray Leaf Node device

CspSubarrayFQDN

DevString

FQDN of the CSP Subarray device

SdpSubarrayFQDN

DevString

FQDN of the SDP Subarray device

AbortCommandTimeOut

DevUShort

Timeout for the Subarray ABORTED obsState transition. Once the AbortCommandTimeOut exceeds, SubarrayNode transitions to obsState FAULT.

CspScanInterfaceURL

DevString

Interface URL of the CSP sub-system for Scan command

SdpScanInterfaceURL

DevString

Interface URL of the SDP sub-system for Scan command

CspAssignResourcesInterfaceURL

DevString

Interface URL of the CSP sub-system for AssignResources command

CommandTimeOut

DevUShort

Timeout for the command execution

LivelinessCheckPeriod

DevFloat

Period for the liveliness probe to monitor each device in a loop

EventSubscriptionCheckPeriod

DevFloat

Period for the event subscriber to check the device subscriptions in a loop

Additional Properties in Subarray Node Mid

Property Name

Data Type

Description

DishLeafNodePrefix

DevString

Device name prefix for Dish Leaf Node. This property is for internal use.

DishMasterIdentifier

DevString

Device name tag/identifier for Dish Master device. This property is for internal use.

DishMasterFQDNs

DevStringArray

List of Dish Master devices. This property derived from the values of properties DishIDs and DishMasterIdentifier. It is for internal use.

Additional Properties in Subarray Node Low

Property Name

Data Type

Description

MccsSubarrayLNFQDN

DevString

FQDN of the MCCS Subarray Leaf Node Tango Device Server

MccsSubarrayFQDN

DevString

FQDN of the MCCS Subarray device

MccsConfigureInterfaceURL

DevString

Interface URL of the MCCS sub-system for Configure command

MccsScanInterfaceURL

DevString

Interface URL of the MCCS sub-system for Scan command

JonesURI

DevString

URI for Jones Matrix