ska_tmc_subarraynode.model package

Link to the TMC User documentation is here.

Submodules

component module

Path: src/ska_tmc_subarraynode/model/component.py

This module is used for maintaining and monitoring the components of subarray device.

class ska_tmc_subarraynode.model.component.SubarrayComponent(logger=<Logger ska_tmc_subarraynode.model.component (WARNING)>)

Bases: TmcComponent

A component class for Subarray Node

It supports:

  • Maintaining a connection to its component

  • Monitoring its component

property assigned_resources

Return the resources assigned to the component.

Returns

The resources assigned to the component

Return type

list of str

property devices

Return the monitored devices.

Returns

List of the monitored devices

get_device(device_name)

Return the monitored device info by name.

Parameters

device_name (str) – name of the device

Return type

Optional[DeviceInfo]

Returns

If found, the monitored DeviceInfo else, None

invoke_device_callback(dev_info)

This method invoke device callback

Parameters

dev_info (DeviceInfo) – device information object

Return type

None

remove_device(device_names)

Remove a device from the list

Parameters

device_names (list) – list of device names

Return type

None

property sb_id

Return the Sb_id

Returns

the Sb_id

Return type

str

property scan_duration

Return the duration of scan

Returns

the scan duration

Return type

int

property scan_id

Return the Scan id

Returns

Scan id

Return type

str

set_obs_callbacks(_update_assigned_resources_callback=None)

This method sets obs callback

Parameters

_update_assigned_resources_callback – callback to update assigned resources

Return type

None

set_op_callbacks(_update_device_callback=None, _update_subarray_health_state_callback=None, _update_subarray_availability_status_callback=None)

This method update device callback and subarray health state

Parameters
  • _update_device_callback – callback to update device

  • _update_subarray_health_state_callback – callback to update subarray health state

  • _update_subarray_availability_status_callback – callback to update subarray availability status

Return type

None

property subarray_availability

Return the aggregated status for subarray node availability

Returns

the subarray availability

Return type

bool

property subarray_health_state

Return the aggregated subarray health state

Returns

the subarray health state

Return type

HealthState

property subarray_id

Return the subarray_id

Returns

the subarray_id

Return type

str

to_dict()

Return result HealthState in dictionary

Returns

Dictionary containing result HealthState in dictionary

Return type

dict

update_device(dev_info)

Update (or add if missing) Device Information into the list of the component.

Parameters

dev_info (DeviceInfo) – a DeviceInfo object

Return type

None

update_device_exception(device_info, exception)

Update (or add if missing) Device Information into the list of the component.

Parameters
  • device_info (DeviceInfo) – a DeviceInfo object

  • exception (str) – Exception message

Return type

None

enum module

Path: src/ska_tmc_subarraynode/model/enum.py

Enum Constant Values for Subarray Node

class ska_tmc_subarraynode.model.enum.PointingState(value)

Bases: IntEnum

An enumeration class representing the different pointing states of a device.

NONE = 0
READY = 1
SCAN = 4
SLEW = 2
TRACK = 3
UNKNOWN = 5

input module

Path: src/ska_tmc_subarraynode/model/input.py

This module provide Provides input parameters to both the telescopes

class ska_tmc_subarraynode.model.input.InputParameter(changed_callback)

Bases: object

Method to Check TMC Subarray Devices

property csp_subarray_dev_name

Return the CSP Subarray device name

Returns

the CSP Subarray device name

Return type

str

property sdp_subarray_dev_name

Returns the SDP Subarray device name

Returns

the SDP Subarray device name

Return type

str

property tmc_csp_sln_device_name

Return the CSP Subarray Leaf Node device names

Returns

the CSP Subarray Leaf Node device names

Return type

str

property tmc_sdp_sln_device_name

Return the SDP Subarray Leaf Node device names

Returns

the SDP Subarray Leaf Node device names

Return type

str

update(component_manager)

update the devices in liveliness probe

Parameters

component_manager – Component Manager

Returns

list of device names

Return type

list[str]

class ska_tmc_subarraynode.model.input.InputParameterLow(changed_callback)

Bases: InputParameter

Method to Check TMC subarray Low Devices

property mccs_subarray_dev_name

Returns the MCCS Subarray device name

Returns

the MCCS Subarray device name

Return type

str

property tmc_mccs_sln_device_name

Returns the MCCS Subarray Leaf Node device name

Returns

the MCCS Subarray Leaf Node device name

Return type

str

update(component_manager)

This method updates list of devices for low input parameter class.

Parameters

component_manager – Component Manager

Return type

None

class ska_tmc_subarraynode.model.input.InputParameterMid(changed_callback)

Bases: InputParameter

Method to Check TMC Subarray Mid Devices

property dish_dev_names

Return the dish device names

Returns

the TM dish device names

Return type

list[str]

property tmc_dish_ln_device_names

Return the TM dish device names

Returns

the TM dish device names

Return type

list[str]

update(component_manager)

Update input parameter for Input Parameter

Parameters

component_manager – Component Manager

Return type

None

Module contents