ska_tmc_subarraynode.model package

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

the monitored devices

Return type

DeviceInfo[]

get_device(device_name)

Return the monitored device info by name.

Parameters

device_name – name of the device

Returns

the monitored device info

Return type

DeviceInfo

invoke_device_callback(dev_info)

This method invoke device callback

remove_device(device_names)

Remove a device from the list

Parameters

device_name – name of the device

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

the Scan id

Return type

str

set_obs_callbacks(_update_assigned_resources_callback=None)

This method sets obs callback

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

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

update_device(dev_info)

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

Parameters

dev_info (DeviceInfo) – a DeviceInfo object

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

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

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.

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

property tmc_dish_ln_device_names

Return the TM dish device names

Returns

the TM dish device names

Return type

list

update(component_manager)

Update input parameter for Input Parameter

Return type

None

Module contents