ska_tmc_dishleafnode.manager

Link to the TMC User documentation is here <https://confluence.skatelescope.org/display/UD/TMC+User+Documentation>_.

component_manager

This module provides an implementation of the Dish Leaf Node ComponentManager.

class ska_tmc_dishleafnode.manager.component_manager.DishLNComponentManager(*args: Any, **kwargs: Any)

Bases: TmcLeafNodeComponentManager

A component manager for The Dish Leaf Node component.

abort(task_callback: ska_tango_base.base.TaskCallbackType) Tuple

Abort the Dish.

Parameters:

task_callback (TaskCallbackType) – TaskCallback for Abort.

Returns:

Tuple of result code and message

property actual_pointing: list

Gets the actualPointing of the dish device.

Returns:

list of the actualPointing of the dish.

Return type:

list

add_weather_station_devices(weather_station_devices: list) None

Method to add all the weather station device info.

Parameters:

weather_station_devices – (list) Weather station device fqdns.

apply_pointing_model(argin: str, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the ApplyPointingModel command for execution

Parameters:
  • argin (str) – String giving TelModel URI.

  • task_callback (TaskCallbackType) – Callback function to handle task status.

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

property array_layout: dict

Returns the array layout

build_device_attribute_map() Dict[str, list[str]]

Builds a dictionary mapping device names to lists of attributes to be subscribed.

Returns:

A mapping from device names to list of attributes.

Return type:

Dict[str, List[str]]

check_device_responsive() None

Checks if dish master device is responsive.

Raises:

DeviceUnresponsive – If dish master is unresponsive.

check_device_responsiveness(device_name: str) bool

This method accepts device_name and provides the responsiveness of the device.

Parameters:

device_name (str) – Tango device FQDN.

Raises:

DeviceNameIncorrect – raises exception when device name is incorrect.

Returns:

Returns True when device is avaiable, else false.

Return type:

bool

check_event_error(event: tango.EventData, callback: str)

Method for checking event error.

clear_configure_command_events_flags()

Method to reset the command result dictionaries, events and flags utilized in Configure command

clear_track_table_errors()

This method clears the variables that include track table errors

property command_in_progress: str

Method to get value of current command in progress

Returns:

command in progress variable data.

Return type:

str

configure(argin: str, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) tuple

Submit the Configure command in queue.

Parameters:
  • argin (str) – configure json in string.

  • task_callback (TaskCallbackType) – TaskCallback for Configure.

Returns:

a result code and message

Return type:

tuple

property configure_track_lrcr: ska_tango_base.commands.ResultCode

Configure track lrcr

Returns:

Configure track lrcr ResultCode.

Return type:

ResultCode

configureband(argin: str, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the ConfigureBand command for execution.

Parameters:
  • argin (str) – String containing receiver band.

  • task_callback (TaskCallbackType) – Callback function to handle task status.

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

convert_timestamp(timestamp_tai_ska_epoch: float) str | None

Converts the timestamp in TAI format to UTC timestamp with format -> %Y-%m-%d %H:%M:%S The value 1999-12-31T23:59:28Z is the SKA_EPOCH

Parameters:

timestamp_tai_ska_epoch (float) – Input timestamp with time in TAI format with SKA epoch

Returns:

Timestamp in string with format “%Y-%m-%d %H:%M:%S”.

Return type:

string

create_converter_obj_and_antenna_obj()

Create AzElConverter Object and antenna object

property current_track_table_error: str

Returns the trackTableError of the dish leaf node.

Returns:

trackTableError of the dish leaf node.

Return type:

str

property devices: list[Union[ska_tmc_common.DishDeviceInfo, ska_tmc_common.DeviceInfo]]

Method provides the devices monitored by CSP subarray leaf node.

Returns:

returns list of device information.

Return type:

list

property dishConfiguredBand: str

Returns the dishConfiguredBand of dish device

Returns:

dishConfiguredBand of dish device.

Return type:

str

property dishMode: ska_tmc_common.DishMode

Returns the dishMode of dish master device

Returns:

dishMode of dish master device.

Return type:

DishMode

download_iers_data() None

Downloads and initialises the IERS file. Incase of error with main link, tries downloading using Mirror link.

Returns:

None

Return type:

None

download_iers_data_from_a_different_source() None

Downloads and initialises the IERS file from the mirror or local links.

Returns:

None

Return type:

None

endscan(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the EndScan command for execution.

Parameters:

task_callback – Callback function to handle task status.

Type:

TaskCallbackType

Return type:

Tuple

generate_pointing_data(target_data: dict, offsets: list) dict

Generate Pointing data based on offsets :param target_data: existing target data to update :type target_data: dict :param offsets: pointing offsets :type offsets: list

get_abort_result_code() ska_tango_base.commands.ResultCode

Return the result of the Abort command execution

Returns:

ResultCode from the set_abort_result

Return type:

ResultCode

get_abort_result_dict() dict

Return the dictinary containing Abort command execution status

Returns:

abort_result dictionary

Return type:

dict

get_attribute_dict() dict

This method will return dictionary of attributes which will be subscribed by TMC Dish Leaf Node. It will contain mapping of attribute with function which will process event data in TMC

Returns:

Dictionary of attributes to be handled by the EventReceiver.

get_configure_band_result()

Return the result of the ConfigureBand command completion.

Returns:

Returns whether the ConfigureBand command completion criteria is satisfied.

Return type:

bool

get_configure_band_result_code()

Return the result code of the ConfigureBand command execution

Returns:

ResultCode from dictionary configure_band_result

Return type:

ResultCode

get_configure_band_result_dict()

Return the dictionary containing ConfigureBand command execution status

Returns:

configure_band_result dictionary

Return type:

dict

get_device(device_name: str) Union[ska_tmc_common.DishDeviceInfo, ska_tmc_common.DeviceInfo]

Return the device info of the monitoring loop with name dev_name :param device_name: (str) device name :return: a device info :rtype: DishDeviceInfo or DeviceInfo

get_dish_mode() ska_tmc_common.DishMode

Returns the dishMode of dish master device

Returns:

dishMode of dish master device.

Return type:

DishMode

get_dish_state() Tuple[ska_tmc_common.DishMode, ska_tmc_common.PointingState, ska_tmc_common.Band, ska_tango_base.commands.ResultCode, ska_tango_base.commands.ResultCode]

Returns the current state of the dish including its mode, pointing state, band and the result code of the specified commands.

Returns:

A tuple containing-
  • DishMode: The current operational mode of the dish.

  • PointingState: The current pointing state of the dish.

  • Band: The dish configured band

  • ResultCode: ConfigureBand command result code

  • ResultCode: Track command result code

Return type:

Tuple

get_end_scan_result_code()

Return the result of the EndScan command execution

Returns:

ResultCode from end_scan_result

Return type:

ResultCode

get_scan_result_code()

Return the result of the Scan command execution

Returns:

ResultCode from scan_result

Return type:

ResultCode

get_track_load_static_off_result_code()

Return the result of the trackLoadStaticOff command execution

Returns:

track_load_static_off_result

Return type:

dict

get_track_load_static_off_result_dict()

Return the dictionary containing TrackLoadStaticOff command execution status

Returns:

track_load_static_off_result dictionary

Return type:

dict

get_track_result_code()

Return the result of the Track command execution

Returns:

ResultCode from the track_result

Return type:

ResultCode

get_track_result_dict()

Return the dictionary containing Track command execution status

Returns:

track_result dictionary

Return type:

dict

get_track_stop_result_code()

Return the result of the TrackStop command execution

Returns:

ResultCode from track_stop_result

Return type:

ResultCode

property gpm_file_path: str

Get the GPM repository(telmodel) file path :returns: Stored GPM file path :rtype: str

property gpm_source_path: str

Get the GPM repository(telmodel) source path :returns: Stored GPM source path :rtype: str

property gpm_validation_result: dict

Dictionary mapping each allowed band to its GPM band validation status.

Returns:

A mapping like {‘Band_1’: “UNKNOWN”, ‘Band_2’: “OK”, …} where each key corresponds to a band validation result. “UNKNOWN”: Default. Indicates GPM version not set for that band “FAILED”: If validation fails for given band. “OK”: If validation is successfull. The values are derived from ResultCode.<Enum>.name

Return type:

dict

property gpm_version

Dictionary mapping each allowed band to its GPM band version status.

Returns:

A mapping like {‘Band_1’: ‘UNKNOWN’, ‘Band_2’: ‘UNKNOWN’, …} where each key corresponds to a band identifier from ALLOWED_BANDS and each value indicates the current version status (default: ‘UNKNOWN’).

Return type:

dict

property gust_wind_speed_mean: float

Gust of wind.

property humidity: float

The humidity property.

is_abort_allowed() bool

Checks whether this command is allowed It checks that the device is in the right state to execute this command and that all the component needed for the operation are not unresponsive

Returns:

True if this command is allowed

Return type:

boolean

is_abort_completed() bool

Waits for expected state with or without transitional state. On expected state occurrence, it sets ResultCode to OK and stops the tracker thread.

Returns:

boolean value indicating if the state change occurred or not

is_apply_pointing_model_allowed() bool

Verifies the device is responsive before allowing command execution.

Raises:
  • DeviceUnresponsive – If the device is not available

  • for communication.

Returns:

True if the device is responsive.

Return type:

bool

is_command_allowed_callable(command_name: str) bool
Parameters:

command_name (str) – Name for the command for which the is_allowed check need to be applied.

Returns:

True if command is allowed in current device state, False otherwise.

Return type:

bool

is_configure_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if the command is allowed in the current operational state, False otherwise.

Return type:

boolean

is_configure_completed() bool

Waits for expected state with or without transitional state. On expected state occurrence, it sets ResultCode to OK and stops the tracker thread.

Returns:

boolean value indicating if the state change occurred or not

is_configureband_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if the command is allowed in the current operational state, False otherwise.

Return type:

boolean

is_endscan_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if this command is allowed to be run in current dish mode, raises CommandNotAllowed in case is is not allowed and DeviceUnresponsive in case Device is not responsive.

Return type:

Union[bool, CommandNotAllowed, DeviceUnresponsive]

is_off_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if the command is allowed in the current operational state, False otherwise.

Return type:

boolean

is_scan_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if this command is allowed to be run in current dish mode, raises CommandNotAllowed in case is is not allowed and DeviceUnresponsive in case Device is not responsive.

Return type:

Union[bool, CommandNotAllowed, DeviceUnresponsive]

is_set_kvalue_allowed() bool

Checks whether this command is allowed It checks that the device is responsive before invoking command.

Returns:

True if this command is allowed

Return type:

boolean

is_setstandbyfpmode_allowed() bool

Checks if the given command is allowed in current operational state.

Return type:

boolean

is_setstandbylpmode_allowed() bool

Checks if the given command is allowed in current operational state.

Return type:

boolean

is_setstowmode_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if the command is allowed in the current operational state, False otherwise.

Return type:

boolean

is_track_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if the command is allowed in the current operational state, False otherwise.

Return type:

boolean

is_track_and_trackstop_command_allowed() bool

checks if track command is allowed

Returns:

True if command is allowed, False otherwise.

Return type:

bool

is_trackloadstaticoff_allowed() bool

Checks if the command TrackLoadStaticOff is allowed.

Returns:

True if the command ‘TrackLoadStaticOff’ is allowed, False otherwise.

Return type:

boolean

is_trackstop_allowed() bool

Checks if the given command is allowed in current operational state.

Returns:

True if the command is allowed in the current operational state, False otherwise.

Return type:

boolean

property kValue: int

Returns the k-value

Returns:

k-value.

Return type:

int

property kValueValidationResult: int

Returns the k-value validation result

Returns:

The k-value validation result

Return type:

int

property last_pointing_data: numpy.array

Property for last pointing data

Returns:

Array of lap pointing data.

Return type:

numpy.array

load_array_layout_for_dish() None

Load the array layout from TelModel and store the dictionary corresponding to this dish (matching station_label to self.dish_id) into self.array_layout.

Raises:

ValueError – If loading or parsing the array layout fails.

off(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the Off command for execution.

Parameters:

task_callback (TaskCallbackType) – TaskCallback for off.

Returns:

Tuple[TaskStatus, str]

property operational_perc_mean_diff: float

Gust of wind.

property operational_wind_speed_mean: float

Gust of wind.

perform_reverse_transform(value_list) None

Performs the reverse transform and publishes it on the actualPointing attribute.

Parameters:

value_list ((List[float])) – A list containing timestamp in milliseconds,azimuth, and elevation.

property pointingState: ska_tmc_common.PointingState

Returns the pointingState of dish master device

Returns:

pointingState of dish master device.

Return type:

PointingState

property pressure: float

The pressure property.

property primary_configuration: dict

Return primary configuration

Returns:

primary configuration.

Return type:

dict

process_actual_pointing() None

Process the achieved pointing data to calculate actual pointing. Runs in a child process. Rebuilds the observer when the parent updates array_layout (signalled via self.layout_updated).

process_event(attribute_name)
process_pointing_calibration(event_data: tango.EventData) None

Method to process pointing offsets received from SDP queue connector device

Parameters:

event_data (tango.EventData) – Event data of pointing calibration.

process_sqpqc_attribute_fqdn(sdpqc_fqdn: str) None

Method to subscribe to SDP queue connector attribute.

Parameters:

sdpqc_fqdn (str) – SDP queue connector attribute to be subscribed.

property queue_connector_device_info: ska_tmc_common.SdpQueueConnectorDeviceInfo

Get the queue connector device object

Returns:

queue connector device object.

Return type:

SdpQueueConnectorDeviceInfo

property rate_of_change_temperature: dict

Rate of change of temperature.

reset_command_result_values()

Method to reset the command result dictionaries for the commands ConfigureBand, Track and TrackLoadStaticOff

scan(argin: str, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the Scan command for execution.

Parameters:
  • argin (str) – JSON string containing offsets in the form of param.

  • task_callback (TaskCallbackType) – Callback function to handle task status.

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

set_configure_band_result_dict(result_code=None, message=None, exception=None, status=None)

Set the dictionary containing ConfigureBand command execution status

Parameters:
  • result_code (ResultCode) – ResultCode to be set in configure_band_result.

  • message (str) – message to be set in configure_band_result.

  • exception (str) – exception to be set in configure_band_result.

  • status (str) – status to be set in configure_band_result.

set_dish_adapter(dish_adapter: ska_tmc_common.adapters.DishAdapter) None

Sets dish adapter, used to write programTrackTable on the dish.

Parameters:

dish_adapter (DishAdapter) – dish Adapter to be set, used to write programTrackTable on the dish.

set_dish_id(dish_master_fqdn: str) None

Find out dish number from MidDishControl property e.g. mid-dish/dish-manager/SKA001 Here, SKA001 is the dish number.

Parameters:

dish_master_fqdn (str) – dish master

set_dishln_pointing_device_adapter(dishln_pointing_device_adapter: ska_tmc_common.adapters.DishlnPointingDeviceAdapter) None

Sets dishln pointing device adapter, used to write programTrackTable on the dish.

Parameters:

dishln_pointing_device_adapter (DishlnPointingDeviceAdapter) – dishln pointing device adapter, used to write programTrackTable on the dish.

set_track_load_static_off_result_dict(result_code=None, message=None, exception=None, status=None)

Set the dictionary containing TrackLoadStaticOff command execution status

Parameters:
  • result_code (ResultCode) – ResultCode to be set in track_load_static_off_result.

  • message (str) – message to be set in track_load_static_off_result.

  • exception (str) – exception to be set in track_load_static_off_result.

  • status (str) – status to be set in track_load_static_off_result.

set_track_result_dict(result_code=None, message=None, exception=None, status=None)

Set the dictionary containing Track command execution status

Parameters:
  • result_code (ResultCode) – ResultCode to be set in track_result.

  • message (str) – message to be set in track_result.

  • exception (str) – exception to be set in track_result.

  • status (str) – status to be set in track_result.

setstandbyfpmode(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Initializes the attributes and properties of the DishLeafNode.

Parameters:

task_callback (TaskCallbackType) – TaskCallback for setstandbyfpmode.

Returns:

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

Return type:

Tuple[TaskStatus, str]

setstandbylpmode(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the SetStandbyLPMode command for execution.

Parameters:

task_callback – Callback function to handle task status.

Type:

TaskCallbackType

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

setstowmode(task_callback: ska_tango_base.base.TaskCallbackType) None

Submits the SetStowMode command for execution.

Parameters:

task_callback – Callback function to handle task status.

Type:

TaskCallbackType

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

setup_event_subscription() None

Sets up the event subscription after input parameters are updated.

start_event_processing_threads() None

Start all the event processing threads.

stop_event_manager() None

Stops the Event Receiver

stop_event_processing_threads() None

Stop all event-processing threads: 1) Signal them to exit their loops. 2) Wait (join) until each thread has terminated. 3) Clean up queues and thread list.

stop_executors_and_cleanup_memory() None

Method to clean up the code, stop running threads/sub-processes

property stow_status: StowStatus

Property stow status.

Returns:

stow status

Return type:

StowStatus

property temperature: float

The temperature property.

track(argin: str, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the Track command for execution.

Parameters:
  • argin (str) – JSON string containing offsets in the form of param.

  • task_callback (TaskCallbackType) – Callback function to handle task status.

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

property trackTableLoadMode: ska_tmc_common.TrackTableLoadMode

Returns dish’s trackTableLoadMode attribute value.

Returns:

TrackTableLoadMode

Return type:

enum

track_load_static_off(argin: str, task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the TrackLoadStaticOff command for execution

Parameters:

argin (str) – JSON string containing offsets in the form of param.

Task_callback:

Callback function to handle task status.

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

trackstop(task_callback: ska_tango_base.base.TaskCallbackType, task_abort_event=None) Tuple[ska_control_model.TaskStatus, str]

Submits the TrackStop command for execution.

Parameters:

task_callback – Callback function to handle task status.

Type:

TaskCallbackType

Returns:

A tuple containing TaskStatus and a message string.

Return type:

Tuple

update_auto_stow_failures(failure: str)

Method updates the auto stow failures

update_band_capability_state(band_capability_state: CapabilityStates, band_name: str) None

Update the band capability state for a specific dish band and trigger associated callbacks.

This method normalizes the band name by removing the “CapabilityState” suffix and converting to uppercase (with special handling for B5a and B5b). It updates the internal band capability state dictionary, notifies the health manager, and logs the state change.

Parameters:
  • band_capability_state (CapabilityStates) – The new capability state of the band

  • band_name (str) – The band name string (e.g., “b1CapabilityState”)

update_device_configured_band(configured_band: ska_tmc_common.Band) None

Update the configured band of the given dish and call the relative callbacks if available.

Parameters:

configured_band (Band) – Configured band of the dish device

update_device_dish_mode(dish_mode: ska_tmc_common.DishMode) None

Update the dish mode of the given dish and call the relative callbacks if available.

Parameters:

dishMode (DishMode) – Dish mode of the device

update_device_health_state(health_state: ska_tango_base.control_model.HealthState) None

Update a monitored device health state

Parameters:

health_state (HealthState) – health state of the device

update_device_pointing_state(pointingState: ska_tmc_common.PointingState) None

Update the pointing state of the given dish and call the relative callbacks if available.

Parameters:

pointingState (PointingState) – Pointing state of the dish device

Returns:

None

Return type:

None

update_dish_pointing_model_param(dish_param: list, band_name: str) None

Update the dish pointing model parameter for the specified band and invoke the relevant callbacks if available.

Parameters:
  • dish_param (str) – New value for the dish pointing model parameter.

  • band_name (str) – Name of the band to update.

update_exception_for_unresponsiveness(device_info: ska_tmc_common.DeviceInfo, exception: str) None

Set a device to failed and call the relative callback if available

Parameters:
  • device_info (DeviceInfo) – a device info

  • exception (Exception) – an exception

update_gpm_data_for_health_aggregation() None

Update health data from component manager.

update_healthinfo_errors() None

Update health info errors from component manager.

update_humidity(humidity: float, wms: str = '') None

The method to update humidity.

Parameters:

humidity (float) – The humidity event from the wms.

update_kvalue_data_for_health_aggregation() None

Update health data from component manager.

update_kvalue_validation_result() None

This method informs the k-value validation result to central node after DLN start/restart.

Returns:

None

Return type:

None

update_pressure(pressure: float, wms: str = '') None

The method to update pressure.

Parameters:

pressure (float) – The pressure event from the wms.

update_program_track_table(program_track_table_event_data: tango.EventData) None

This method writes the programTrackTable attribute on dish master device.

Parameters:

program_track_table_event_data (list) – It a list of TAI time, Az and El for expected number of TAI times (TrackTableEntries).

Returns:

None

Return type:

None

update_program_track_table_error(event: tango.EventData) None

Updates program track table error

Parameters:

event (tango.EventData) – It is the Tango Event Data object

update_responsiveness_info(device_name: str) None

Update a device with the correct availability information.

Parameters:

dev_name (str) – name of the device

update_rxband_health_aggregation() None

Update health data from component manager.

update_source_offset_callback(source_offset: list) None

Method to update the sourceOffset attribute

Returns:

source_offset list to be updated.

Return type:

list

update_temperature(temperature: float, wms: str = '') None

The method to update temperature

Parameters:

temperature (float) – The temperature event from wms.

update_windspeed(wind_speed: float, wms: str = '') None

The method to update windspeed

Parameters:
  • wind_speed (float) – the wind speed event from wms.

  • wms (str) – the fqdn of wms

validate_float_list(lst: list, number_of_values: int) bool

Method to check the list in valid format

Parameters:
  • lst (list) – list to be validated.

  • number_of_values (int) – number of values in the list.

Returns:

True if length of list is equal to number_of_values and all values are float, Else raises ValueError.

Return type:

bool

Raises:

ValueError – When value are not in expected format or list is incomplete.

property wind_speed: float

The wind speed property.

property wind_speed_mean: float

Mean wind speed for specific duration

ska_tmc_dishleafnode.manager.program_track_table_calculator module

Module for programTrackTable calculator.

class ska_tmc_dishleafnode.manager.program_track_table_calculator.ProgramTrackTableCalculator(component_manager, logger: Logger)

Bases: object

Class for programTrackTableCalculator.

add_program_track_table_in_schedular(track_table_scheduler: scheduler, event_priority: int, scheduled_time: float, program_track_table: list, update_pointing_program_track_table: callable) None

Metho to add program track table in schedular

azel_converter: AzElConverter
build_scheduled_time(timestamp)

This method builds the scheduled time for the track table calculation. It converts the given timestamp to TAI and adds the advance time to it.

calculate_program_track_table(azel_converter: AzElConverter_v2, program_track_table_size: int) list

This method calculates programTrackTable.

Parameters:

target_data (Union[str, List[str]]) – The name or RaDec for the target

Returns:

list in the form of [TAI1, Az1, El1, TAI2, Az2, El2,,,,,,TAIn, Azn, Eln].

Return type:

list

calculate_time_stamp_list(program_track_table_size: int) tuple

This methods calculates an list of requested timestamps (TrackTableEntries) with a requested time difference (PointingCalculationPeriod) and corresponding list of time in TAI format.

Returns:

Tuple with list of timestamps (UTC) in string format and timestamp in TAI format.

Return type:

tuple

convert_utc_to_tai(utc_time: float) float

This method converts utc time to tai format time.

Parameters:

utc_time (float) – time in utc (seconds)

Returns:

Time in TAI format (seconds)

Return type:

float

declination: str = ''
elevation_limit: bool
fit_azimuth_in_observable_range(calculated_azimuth: float) float

This method fits the calculated azimuth to the dish’s observable azimuth range.

Parameters:

calculated_azimuth (float) – Azimuth in degrees

Returns:

Azimuth in degrees

Return type:

float

point(timestamp: str) list

This method converts Target RaDec coordinates to the AzEl coordinates. It is called continuously from Configure command (in a thread) at interval of 50ms till the StopTrack command is invoked.

Parameters:

timestamp (str) – utc timestamp

Returns:

Azimuth and Elevation coordinates (Az, El) of source.

Return type:

list

right_ascension: str = ''
set_pointing_calculation_period(program_track_table_size: int)

Set the pointing calculation period

target_name: str = ''
weather_data: dict

ska_tmc_dishleafnode.manager.event_manager module

Event Manager for Dish Leaf Node

class ska_tmc_dishleafnode.manager.event_manager.DishLNEventManager(*args: Any, **kwargs: Any)

Bases: EventManager

DishLNEventManager class inherits from EventManager and adds event callbacks.

achievedpointing_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of achievedPointing attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for achievedPointing.

Returns:

None

Return type:

NoneType

configuredband_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of configuredBand attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for configuredBand.

Returns:

None

Return type:

NoneType

dishmode_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of dishMode attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for dishMode.

Returns:

None

Return type:

NoneType

handle_band_capabilities(event_data: tango.EventData)

Method to handle and update the latest value of Band capabilities params.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for Dish global pointing model params.

Returns:

None

Return type:

NoneType

handle_pointing_model_params(event_data: tango.EventData)

Method to handle and update the latest value of dish_pointing_model params.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for Dish global pointing model params.

Returns:

None

Return type:

NoneType

healthstate_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of pointing device healthState. If this value/event is unavailable, DishLeaf node healthState is shown as DEGRADED.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for programTrackTable.

Returns:

None

Return type:

NoneType

humidity_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of humidity attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for humidity.

Returns:

None

Return type:

NoneType

kvalue_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of kvalue attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for kvalue.

Returns:

None

Return type:

NoneType

longrunningcommandresult_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of longRunningCommandResult attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for longRunningCommandResult.

Returns:

None

Return type:

NoneType

pointingprogramtracktable_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of pointingProgramTrackTable attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for programTrackTable.

Returns:

None

Return type:

NoneType

pointingstate_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of pointingState attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for pointingState.

Returns:

None

Return type:

NoneType

pressure_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of pressure attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for pressure.

Returns:

None

Return type:

NoneType

programtracktableerror_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of program track table error attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for programTrackTableError.

Returns:

None

Return type:

NoneType

temperature_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of temperature attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for temperature.

Returns:

None

Return type:

NoneType

unsubscribe_events(device_name, attribute_names=None)
windspeed_event_callback(event_data: tango.EventData) None

Method to handle and update the latest value of windspeed attribute.

Parameters:

event_data (tango.EventType.CHANGE_EVENT) – The change event data for windspeed.

Returns:

None

Return type:

NoneType

ska_tmc_dishleafnode.manager.dish_kvalue_validation_manager module

Class for managing dish kvalue validation during initialization/restart of device

class ska_tmc_dishleafnode.manager.dish_kvalue_validation_manager.DishkValueValidationManager(component_manager, logger)

Bases: object

Class for dish kValue validation during dish leaf node initialization/restart

get_dish_ln_memorized_kvalue() int

Return memorized kvalue dish leaf node

Returns:

int

get_dish_manager_kvalue() int

Get kValue attribute value of dish manager

Returns:

int

is_dish_manager_ready() bool

Wait and check if dish manager is ready

Returns:

bool

kvalue_validation_update(dish_manager_kvalue: str, dish_ln_kvalue: str) None

Update the kValueValidationResult attribute of the Dish Leaf Node.

This method compares the kValue received from the Dish Manager with the kValue maintained by the Dish Leaf Node and updates the kValueValidationResult attribute based on the validation outcome.

Parameters:
  • dish_manager_kvalue – kValue received from the Dish Manager.

  • dish_ln_kvalue – kValue configured in the Dish Leaf Node.

Returns:

None

validate_dish_kvalue() None

Validate kvalue of dish leaf node and dish manager

Returns:

None

validate_dish_kvalue_from_event(kvalue: int) None

Validate kvalue of dish leaf node and dish manager from event

Parameters:

kvalue – kValue received from the dish event.

Returns:

None

Command Timeout

The CommandTimeout attribute is introduced to allow updating the timeout value for commands without requiring a redeployment. This provides flexibility in tuning the timeout dynamically at runtime based on operational needs.

The CommandTimeOutDefault property is also introduced, which can be used to set a default timeout value during the deployment phase. This ensures that an initial timeout value is preconfigured when the component starts for the first time.

Usage

  • CommandTimeout attribute - Can be updated at runtime without redeployment. - Helps in adapting to varying command execution times.

  • CommandTimeOutDefault property - Configurable in the deployment configuration (e.g., values.yaml). - Sets the initial timeout value at startup.