Alarm Handler¶
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.
Tango Device Class¶
-
class
ska_tango_base.
SKAAlarmHandler
(*args: Any, **kwargs: Any)[source]¶ A generic base device for Alarms for SKA.
-
SubAlarmHandlers
= tango.server.device_property(dtype=('str',))¶
-
AlarmConfigFile
= tango.server.device_property(dtype=str)¶
-
statsNrAlerts
= tango.server.attribute(dtype=int, doc=Number of active Alerts)¶ Device attribute.
-
statsNrAlarms
= tango.server.attribute(dtype=int, doc=Number of active Alarms)¶ Device attribute.
-
statsNrNewAlarms
= tango.server.attribute(dtype=int, doc=Number of New active alarms)¶ Device attribute.
-
statsNrUnackAlarms
= tango.server.attribute(dtype=double, doc=Number of unacknowledged alarms)¶ Device attribute.
-
statsNrRtnAlarms
= tango.server.attribute(dtype=double, doc=Number of returned alarms)¶ Device attribute.
-
activeAlerts
= tango.server.attribute(dtype=('str',), max_dim_x=10000, doc=List of active alerts)¶ Device attribute.
-
activeAlarms
= tango.server.attribute(dtype=('str',), max_dim_x=10000, doc=List of active alarms)¶ Device attribute.
-
always_executed_hook
()[source]¶ Method that is always executed before any device command gets executed.
-
read_statsNrNewAlarms
()[source]¶ Reads number of new active alarms. :return: Number of new active alarms
-
read_statsNrUnackAlarms
()[source]¶ Reads number of unacknowledged alarms. :return: Number of unacknowledged alarms.
-
read_statsNrRtnAlarms
()[source]¶ Reads number of returned alarms. :return: Number of returned alarms
-
class
GetAlarmRuleCommand
(target, state_model, logger=None)[source]¶ A class for the SKAAlarmHandler’s GetAlarmRule() command.
Creates a new BaseCommand object for a device.
- Parameters
state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.
target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.
logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
class
GetAlarmDataCommand
(target, state_model, logger=None)[source]¶ A class for the SKAAlarmHandler’s GetAlarmData() command.
Creates a new BaseCommand object for a device.
- Parameters
state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.
target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.
logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
class
GetAlarmAdditionalInfoCommand
(target, state_model, logger=None)[source]¶ A class for the SKAAlarmHandler’s GetAlarmAdditionalInfo() command.
Creates a new BaseCommand object for a device.
- Parameters
state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.
target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.
logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
class
GetAlarmStatsCommand
(target, state_model, logger=None)[source]¶ A class for the SKAAlarmHandler’s GetAlarmStats() command.
Creates a new BaseCommand object for a device.
- Parameters
state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.
target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.
logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
class
GetAlertStatsCommand
(target, state_model, logger=None)[source]¶ A class for the SKAAlarmHandler’s GetAlertStats() command.
Creates a new BaseCommand object for a device.
- Parameters
state_model (SKABaseClassStateModel or a subclass of same) – the state model that this command uses, for example to raise a fatal error if the command errors out.
target (object) – the object that this base command acts upon. For example, the device that this BaseCommand implements the command for.
logger (a logger that implements the standard library logger interface) – the logger to be used by this Command. If not provided, then a default module logger will be used.
-
GetAlarmRule
(argin)[source]¶ 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)[source]¶ Get list of current value, quality factor and status of all attributes participating in the alarm rule.
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)[source]¶ 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
-