ska_tmc_sdpmasterleafnode.manager package

Link to the TMC User documentation is here.

Submodules

ska_tmc_sdpmasterleafnode.manager.component_manager module

This module implements ComponentManager class for the Sdp Master Leaf Node.

class ska_tmc_sdpmasterleafnode.manager.component_manager.SdpMLNComponentManager(*args: Any, **kwargs: Any)

Bases: TmcLeafNodeComponentManager

A component manager for The SDP Master Leaf Node component.

It supports:

  • Monitoring its component, e.g. detect that it has been turned off or on

  • Controlling the behaviour of SDP Master.

get_attribute_dict() dict

Returns the common attribute dictionary for all component types.

Returns:

Dictionary of common attributes to be handled by the EventReceiver.

get_device() ska_tmc_common.device_info.DeviceInfo

Return the device info our of the monitoring loop with name dev_name

Returns:

a device info

Return type:

DeviceInfo

is_command_allowed(command_name: str) bool

Checks whether this command is allowed. It checks that the device is not in the FAULT and UNKNOWN state before executing the command and that all the components needed for the operation are not unresponsive.

Parameters:

command_name (str) – Command to be checked.

Returns:

True if this command is allowed.

Return type:

bool

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

Submits the Off command for execution.

Parameters:

task_callback (Optional[TaskCallbackType]) – TaskCallback for off command.

Returns:

tuple of ResultCode and message.

Return type:

Tuple[TaskStatus, str]

on(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Submits the On command for execution.

Parameters:

task_callback (Optional[TaskCallbackType]) – TaskCallback for on command.

Returns:

tuple of ResultCode and message.

Return type:

Tuple[TaskStatus, str]

property sdp_master_device_name: str

Returns device name for the SDP Master Device.

Returns:

sdp master fqdn string

standby(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Submits the Standby command for execution.

Parameters:

task_callback (Optional[TaskCallbackType]) – TaskCallback for standby command.

Returns:

tuple of ResultCode and message.

Return type:

Tuple[TaskStatus, str]

start_communicating() None

Establish communication with the component, then start monitoring.

This is the place to do things like:

  • Initiate a connection to the component (if your communication is connection-oriented)

  • Subscribe to component events (if using “pull” model)

  • Start a polling loop to monitor the component (if using a “push” model)

stop() None

Stops the event processing

stop_communicating() None

Cease monitoring the component, and break off all communication with it.

For example,

  • If you are communicating over a connection, disconnect.

  • If you have subscribed to events, unsubscribe.

  • If you are running a polling loop, stop it.

update_device_admin_mode(admin_mode: ska_control_model.AdminMode) None

Update a monitored device admin mode, and call the relative callbacks if available

Parameters:
  • device_name (str) – Name of the device on which admin mode is updated

  • admin_state – admin mode of the device

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

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

Parameters:
  • device_info (DeviceInfo) – a device info

  • exception – an exception

Type:

Exception

update_responsiveness_info(device_name: str = '') None

Update a device with the correct availability information.

Parameters:

dev_name (str) – name of the device

Module contents

Init module for SDP Master Leaf Node Component Manager

class ska_tmc_sdpmasterleafnode.manager.SdpMLNComponentManager(*args: Any, **kwargs: Any)

Bases: TmcLeafNodeComponentManager

A component manager for The SDP Master Leaf Node component.

It supports:

  • Monitoring its component, e.g. detect that it has been turned off or on

  • Controlling the behaviour of SDP Master.

get_attribute_dict() dict

Returns the common attribute dictionary for all component types.

Returns:

Dictionary of common attributes to be handled by the EventReceiver.

get_device() ska_tmc_common.device_info.DeviceInfo

Return the device info our of the monitoring loop with name dev_name

Returns:

a device info

Return type:

DeviceInfo

is_command_allowed(command_name: str) bool

Checks whether this command is allowed. It checks that the device is not in the FAULT and UNKNOWN state before executing the command and that all the components needed for the operation are not unresponsive.

Parameters:

command_name (str) – Command to be checked.

Returns:

True if this command is allowed.

Return type:

bool

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

Submits the Off command for execution.

Parameters:

task_callback (Optional[TaskCallbackType]) – TaskCallback for off command.

Returns:

tuple of ResultCode and message.

Return type:

Tuple[TaskStatus, str]

on(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Submits the On command for execution.

Parameters:

task_callback (Optional[TaskCallbackType]) – TaskCallback for on command.

Returns:

tuple of ResultCode and message.

Return type:

Tuple[TaskStatus, str]

property sdp_master_device_name: str

Returns device name for the SDP Master Device.

Returns:

sdp master fqdn string

standby(task_callback: Optional[ska_tango_base.base.TaskCallbackType] = None) Tuple[ska_tango_base.executor.TaskStatus, str]

Submits the Standby command for execution.

Parameters:

task_callback (Optional[TaskCallbackType]) – TaskCallback for standby command.

Returns:

tuple of ResultCode and message.

Return type:

Tuple[TaskStatus, str]

start_communicating() None

Establish communication with the component, then start monitoring.

This is the place to do things like:

  • Initiate a connection to the component (if your communication is connection-oriented)

  • Subscribe to component events (if using “pull” model)

  • Start a polling loop to monitor the component (if using a “push” model)

stop() None

Stops the event processing

stop_communicating() None

Cease monitoring the component, and break off all communication with it.

For example,

  • If you are communicating over a connection, disconnect.

  • If you have subscribed to events, unsubscribe.

  • If you are running a polling loop, stop it.

update_device_admin_mode(admin_mode: ska_control_model.AdminMode) None

Update a monitored device admin mode, and call the relative callbacks if available

Parameters:
  • device_name (str) – Name of the device on which admin mode is updated

  • admin_state – admin mode of the device

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

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

Parameters:
  • device_info (DeviceInfo) – a device info

  • exception – an exception

Type:

Exception

update_responsiveness_info(device_name: str = '') None

Update a device with the correct availability information.

Parameters:

dev_name (str) – name of the device