DishManager Component Manager

Component manager for a DishManager tango device.

class DishManagerComponentManager(logger, command_tracker, build_state_callback, quality_state_callback, tango_device_name, ds_device_fqdn, spf_device_fqdn, spfrx_device_fqdn, b5dc_device_fqdn, action_timeout_s, *args, wms_device_names=[], wind_stow_callback=None, command_progress_callback=None, **kwargs)[source]

A component manager for DishManager.

It watches the component managers of the subservient devices (DS, SPF, SPFRX, WMS) to aggregate the state of Dish LMC.

__init__(logger, command_tracker, build_state_callback, quality_state_callback, tango_device_name, ds_device_fqdn, spf_device_fqdn, spfrx_device_fqdn, b5dc_device_fqdn, action_timeout_s, *args, wms_device_names=[], wind_stow_callback=None, command_progress_callback=None, **kwargs)[source]
abort(task_callback=None)[source]

Issue abort sequence.

Parameters:

task_callback (Optional[Callable]) – Callback for task status updates

Return type:

Tuple[TaskStatus, str]

abort_scan(task_callback=None)[source]

Issue abort sequence.

Parameters:

task_callback (Optional[Callable]) – Callback for task status updates

Return type:

Tuple[TaskStatus, str]

apply_pointing_model(json_object)[source]

Updates a band’s coefficient parameters with a given JSON input. Note, all 18 coefficients need to be present in the JSON object,the Dish ID should be correct, the appropriate unit should be present and coefficient values should be in range. Each time the command is called all parameters will get updated not just the ones that have been modified.

Return type:

Tuple[ResultCode, str]

check_dish_mode_for_spfc_lna_power_state()[source]

Check if dish is in a mode that allows SPF LNA power state changes.

SPF LNA power state changes are only allowed when the dish is in MAINTENANCE or OPERATE modes. Raises RuntimeError if in any other mode.

Return type:

None

configure_band_cmd(band, synchronise, task_callback=None)[source]

Configure the given band.

Parameters:
  • band_number (Band) – Selected band

  • synchronise (bool) – Passed on to SPFRx

  • task_callback (Optional[Callable], optional) – task callback, defaults to None

Returns:

Result status and message

Return type:

Tuple[TaskStatus, str]

configure_band_with_json(data, task_callback=None)[source]

Configure frequency band using JSON string.

Parameters:
  • data (str) – JSON string containing band configuration parameters.

  • task_callback (Optional[Callable], optional) – task callback, defaults to None

Returns:

Result status and message

Return type:

Tuple[TaskStatus, str]

end_scan(task_callback=None)[source]

Clear the scanid.

Return type:

Tuple[TaskStatus, str]

generate_healthinfo()[source]

Report the reason for healthstate failures.

TODO work out how to get the actual reasons.

Return type:

List[str]

get_action_timeout()[source]

Get the timeout (in seconds) to be used for fanned out actions.

Return type:

float

get_active_sub_component_managers()[source]

Get a list of subservient device component managers which are not being ignored.

Return type:

Dict

get_current_tai_offset_from_dsc_with_manual_fallback()[source]

Try and get the TAI offset from the DSManager device. Or calulate it manually if that fails.

Return type:

float

get_currently_executing_lrcs()[source]

Report command ids that are running or waiting to be executed from the task executor.

Parameters:

statuses_to_check – TaskStatuses which count as lrc is executing

Return type:

List[str]

Returns:

a list of all lrcs currently executing or queued

handle_exit_maintenance_mode_transition()[source]

Handles state transition from maintenance mode.

This will set the MaintenanceModeActive property to false and recompute the dish mode.

Return type:

None

interlock_acknowledge(task_callback=None)[source]

Acknowledge the interlock on the DSC.

Return type:

Tuple[TaskStatus, str]

is_device_ignored(device)[source]

Check whether the given device is ignored.

property reset_alarm: bool

Indicates whether the wind stow alarm can be cleared.

reset_subservient_dev_connections(device_name)[source]

Reset connections between dish manager and subservient devices.

Return type:

Tuple[ResultCode, str]

reset_track_table()[source]

Reset the track table.

Return type:

Tuple[ResultCode, Union[List[float], str]]

scan(scanid, task_callback=None)[source]

Scan a target.

Return type:

Tuple[TaskStatus, str]

set_action_timeout(timeout_s)[source]

Set the timeout (in seconds) to be used for fanned out actions.

Return type:

None

set_b5dc_device_ignored(ignored, sync=True)[source]

Set the B5DC device ignored boolean and update device communication.

set_dsc_power_limit_kw(power_limit)[source]

Set the DSC Power Limit kW on the DS.

Return type:

Tuple[ResultCode, str]

set_frequency(value)[source]

Update Frequency on B5DC.

Return type:

Tuple[ResultCode, str]

set_h_pol_attenuation(value)[source]

Update HPolAttenuation on B5DC.

Return type:

Tuple[ResultCode, str]

set_kvalue(k_value)[source]

Set the k-value on the SPFRx. Note that it will only take effect after SPFRx has been restarted.

Return type:

Tuple[ResultCode, str]

set_maintenance_mode(task_callback=None)[source]

Transition the dish to MAINTENANCE mode.

Return type:

Tuple[TaskStatus, str]

set_noise_diode_mode(noise_diode_mode)[source]

Set the noiseDiodeMode on the SPFRx.

Return type:

Tuple[ResultCode, str]

set_operate_mode(task_callback=None)[source]

Fanout commands to subdevices to set operate mode.

Parameters:
  • task_callback (Optional[Callable], optional) – task callback, defaults to None

  • task_callback – task callback, defaults to None

Returns:

Result status and message

Return type:

Tuple[TaskStatus, str]

set_periodic_noise_diode_pars(values)[source]

Set the periodicNoiseDiodePars on the SPFRx.

Return type:

Tuple[ResultCode, str]

set_pseudo_random_noise_diode_pars(values)[source]

Set the pseudoRandomNoiseDiodePars on the SPFRx.

Return type:

Tuple[ResultCode, str]

set_spf_device_ignored(ignored, sync=True)[source]

Set the SPF device ignored boolean and update device communication.

set_spfrx_device_ignored(ignored, sync=True)[source]

Set the SPFRxdevice ignored boolean and update device communication.

set_standby_fp_mode(task_callback=None)[source]

Transition the dish to STANDBY_FP mode.

Return type:

Tuple[TaskStatus, str]

set_standby_lp_mode(task_callback=None)[source]

Transition the dish to STANDBY_LP mode.

Return type:

Tuple[TaskStatus, str]

set_stow_mode(task_callback=None)[source]

Transition the dish to STOW mode.

Return type:

Tuple[TaskStatus, str]

set_track_interpolation_mode(interpolation_mode)[source]

Set the trackInterpolationMode on the DS.

Return type:

Tuple[ResultCode, str]

set_v_pol_attenuation(value)[source]

Update VPolAttenuation on B5DC.

Return type:

Tuple[ResultCode, str]

slew(values, task_callback=None)[source]

Slew the dish.

Return type:

Tuple[TaskStatus, str]

start_communicating()[source]

Connect to monitored devices and start watchdog timer.

stop_communicating()[source]

Disconnect from monitored devices and stop watchdog timer.

stow_to_maintenance_transition_callback(start)[source]

Handle the transition from STOW to MAINTENANCE mode.

This will set the MaintenanceModeActive property to true and set the dish mode to MAINTENANCE if the dish is in STOW mode. If the dish is not in STOW mode, it will log a warning.

Parameters:

start (bool) – If false then callback runs when long running command is completed. If true then callback runs when long running command is started.

Return type:

None

sync_component_states()[source]

Sync monitored attributes on component managers with their respective sub devices.

Clear the monitored attributes of all subservient device component managers, then re-read all the monitored attributes from their respective tango device to force dishManager to recalculate its attributes.

track_cmd(task_callback=None)[source]

Track the commanded pointing position.

Return type:

Tuple[TaskStatus, str]

track_load_static_off(values, task_callback=None)[source]

Load the static pointing model offsets.

Return type:

Tuple[TaskStatus, str]

track_load_table(sequence_length, table, load_mode)[source]

Load the track table.

Return type:

Tuple[TaskStatus, str]

track_stop_cmd(task_callback=None)[source]

Stop tracking.

Return type:

Tuple[TaskStatus, str]

try_update_memorized_attributes_from_db()[source]

Read memorized attributes values from TangoDB and update device attributes.

update_pointing_model_params(attr, values)[source]

Update band pointing model parameters for the given attribute.

Return type:

None

property wind_stow_active: bool

Indicates whether the dish has been automatically stowed due to strong winds.