ska_tmc_sdpmasterleafnode.manager package

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.

disable(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]

Submits the Disable command for execution.

Return type:

tuple

get_device() ska_tmc_common.device_info.DeviceInfo

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

Parameters:

None

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.

Returns:

True if this command is allowed

Return type:

boolean

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

Submits the Off command for execution.

Return type:

tuple

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

Submits the On command for execution.

Return type:

tuple

property sdp_master_device_name: str

Returns device name for the SDP Master Device.

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

Submits the Standby command for execution.

Return type:

tuple

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_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_ping_failure(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_ping_info(ping: int, device_name: str) None

Update a device with the correct ping information. :param ping: device response time :type ping: int

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.

disable(task_callback: ska_tango_base.base.TaskCallbackType) Tuple[ska_tango_base.executor.TaskStatus, str]

Submits the Disable command for execution.

Return type:

tuple

get_device() ska_tmc_common.device_info.DeviceInfo

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

Parameters:

None

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.

Returns:

True if this command is allowed

Return type:

boolean

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

Submits the Off command for execution.

Return type:

tuple

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

Submits the On command for execution.

Return type:

tuple

property sdp_master_device_name: str

Returns device name for the SDP Master Device.

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

Submits the Standby command for execution.

Return type:

tuple

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_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_ping_failure(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_ping_info(ping: int, device_name: str) None

Update a device with the correct ping information. :param ping: device response time :type ping: int