TMC Common LivelinessProbe

1. BaseLivelinessProbe

class ska_tmc_common.liveliness_probe.BaseLivelinessProbe(component_manager, logger: <Mock id='139954888075456'>, proxy_timeout: int = 500, sleep_time: int = 1)

The BaseLivelinessProbe class has the responsibility to monitor the sub devices.

It is inherited for basic liveliness probe functionality.

TBD: what about scalability? what if we have 1000 devices?

start() None

Starts the sub devices

stop() None

Stops the sub devices

run() NotImplementedError

Runs the sub devices :raises NotImplementedError:raises not implemented error if the method is not defined by child class.

device_task(dev_info: DeviceInfo) None

Checks device status and logs error messages on state change

2. MultiDeviceLivelinessProbe

class ska_tmc_common.liveliness_probe.MultiDeviceLivelinessProbe(component_manager, logger: <Mock id='139954888075456'>, max_workers: int = 5, proxy_timeout: int = 500, sleep_time: int = 1)

A class for monitoring multiple devices

add_device(dev_name: str) None

A method to add device in the Queue for monitoring

remove_devices(dev_names: List[str]) None

Remove the given devices from the monitoring queue.

Parameters:

dev_names (List[str]) – Names of devices in a list that are to be removed from the monitoring list

run() None

A method to run device in the queue for monitoring

3. SingleDeviceLivelinessProbe

class ska_tmc_common.liveliness_probe.SingleDeviceLivelinessProbe(component_manager, logger: <Mock id='139954888075456'>, proxy_timeout: int = 500, sleep_time: int = 1)

A class for monitoring a single device

run() None

A method to run single device in the Queue for monitoring