Alarm Handler Device
This module implements SKAAlarmHandler, a generic base device for Alarms for SKA.
It exposes SKA alarms and SKA alerts as Tango attributes. SKA Alarms and SKA/Element Alerts are rules-based configurable conditions that can be defined over multiple attribute values and quality factors, and are separate from the “built-in” Tango attribute alarms.
- class AlarmHandlerComponentManager(logger: Logger, communication_state_callback: Callable[[CommunicationStatus], None] | None = None, component_state_callback: Callable[[...], None] | None = None, **state: Any)[source]
A stub for an alarm handler component manager.
- class SKAAlarmHandler(*args: Any, **kwargs: Any)[source]
A generic base device for Alarms for SKA.
- create_component_manager() ComponentManagerT[source]
Create and return a component manager for this device.
- Raises:
NotImplementedError – because it is not implemented.
- statsNrUnackAlarms() float
Read number of unacknowledged alarms.
- Returns:
Number of unacknowledged alarms.
- class GetAlarmRuleCommand(logger: Logger | None = None, validator: ArgumentValidator | None = None)[source]
A class for the SKAAlarmHandler’s GetAlarmRule() command.
- do(*args: Any, **kwargs: Any) str[source]
Stateless hook for SKAAlarmHandler GetAlarmRule() command.
- Parameters:
args – positional arguments to the command. This command takes a single positional argument, which is the name of the alarm.
kwargs – keyword arguments to the command. This command does not take any, so this should be empty.
- Returns:
JSON string containing alarm configuration info: rule, actions, etc.
- class GetAlarmDataCommand(logger: Logger | None = None, validator: ArgumentValidator | None = None)[source]
A class for the SKAAlarmHandler’s GetAlarmData() command.
- do(*args: Any, **kwargs: Any) str[source]
Stateless hook for SKAAlarmHandler GetAlarmData() command.
- Parameters:
args – positional arguments to the command. This command takes a single positional argument, which is the name of the alarm.
kwargs – keyword arguments to the command. This command does not take any, so this should be empty.
- Returns:
JSON string specifying alarm data
- class GetAlarmAdditionalInfoCommand(logger: Logger | None = None, validator: ArgumentValidator | None = None)[source]
A class for the SKAAlarmHandler’s GetAlarmAdditionalInfo() command.
- do(*args: Any, **kwargs: Any) str[source]
Stateless hook for SKAAlarmHandler GetAlarmAdditionalInfo() command.
- Parameters:
args – positional arguments to the command. This command takes a single positional argument, which is the name of the alarm.
kwargs – keyword arguments to the command. This command does not take any, so this should be empty.
- Returns:
JSON string specifying alarm additional info
- class GetAlarmStatsCommand(logger: Logger | None = None, validator: ArgumentValidator | None = None)[source]
A class for the SKAAlarmHandler’s GetAlarmStats() command.
- do(*args: Any, **kwargs: Any) str[source]
Stateless hook for SKAAlarmHandler GetAlarmStats() command.
- Parameters:
args – positional arguments to the command. This command does not take any, so this should be empty.
kwargs – keyword arguments to the command. This command does not take any, so this should be empty.
- Returns:
JSON string specifying alarm stats
- class GetAlertStatsCommand(logger: Logger | None = None, validator: ArgumentValidator | None = None)[source]
A class for the SKAAlarmHandler’s GetAlertStats() command.
- do(*args: Any, **kwargs: Any) str[source]
Stateless hook for SKAAlarmHandler GetAlertStats() command.
- Parameters:
args – positional arguments to the command. This command does not take any, so this should be empty.
kwargs – keyword arguments to the command. This command does not take any, so this should be empty.
- Returns:
JSON string specifying alert stats
- GetAlarmRule(argin: str) str
Get all configuration info of the alarm, e.g. rule, defined action, etc.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters:
argin – Name of the alarm
- Returns:
JSON string containing configuration information of the alarm
- GetAlarmData(argin: str) str
Get data on all attributes participating in the alarm rule.
The data includes current value, quality factor and status.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters:
argin – Name of the alarm
- Returns:
JSON string containing alarm data
- GetAlarmAdditionalInfo(argin: str) str
Get additional alarm information.
To modify behaviour for this command, modify the do() method of the command class.
- Parameters:
argin – Name of the alarm
- Returns:
JSON string containing additional alarm information