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: Optional[Callable[[CommunicationStatus], None]] = None, component_state_callback: Optional[Callable[[...], 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: Optional[Logger] = None, validator: Optional[ArgumentValidator] = 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: Optional[Logger] = None, validator: Optional[ArgumentValidator] = 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: Optional[Logger] = None, validator: Optional[ArgumentValidator] = 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: Optional[Logger] = None, validator: Optional[ArgumentValidator] = 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: Optional[Logger] = None, validator: Optional[ArgumentValidator] = 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