SKA DS Manager Alarms

Overview

DS manager has alarms events configured on all attributes. The alarm events are setup so that an alarm event is raised when an attribute value exceeds the warning or alarm thresholds. Tango currently only supports numeric types for alarm events - thus alarm events for non-numeric attributes will not be raised.

DS manager also updates the attribute quality to ATTR_ALARM when DSC error and warning attributes are True. The error and warning nodes fall under Management.ErrorStatus and Management.WarningStatus respectively. The attribute quality is augmented to ATTR_VALID when the associated errors and warnings are cleared.

Usage

This code block below illustrates how to setup the alarm thresholds for an attribute and subscribe to the alarm events.

In [1]: ds = DeviceProxy("tango://127.0.0.1:12345/mid-dish/ds-manager/SKA001#dbase=no")
In [2]: ds.Management_TempHumidStatus_TempDriveCab
# with no defined values, the attribute quality is invalid
In [5]: ds.read_attribute("Management_TempHumidStatus_TempDriveCab").quality
Out[5]: <AttrQuality.ATTR_INVALID: 1>

# Get the attribute configuration for Management_TempHumidStatus_TempDriveCab and set the thresholds
In [7]: attr_config = ds.get_attribute_config("Management_TempHumidStatus_TempDriveCab")
In [8]: attr_config.alarms.min_warning = "5"
In [9]: attr_config.alarms.max_warning = "65"
In [10]: attr_config.alarms.min_alarm = "0"
In [11]: attr_config.alarms.max_alarm = "70"
In [12]: ds.set_attribute_config(attr_config)

# Subscribe to the ALARM_EVENT to get notified when the attribute value exceeds the warning or alarm thresholds.
In [13]: ds.subscribe_event("Management_TempHumidStatus_TempDriveCab", tango.EventType.ALARM_EVENT, tango.utils.EventCallback())
2026-07-23 11:15:51.171343 MID-DISH/DS-MANAGER/SKA001 MANAGEMENT_TEMPHUMIDSTATUS_TEMPDRIVECAB ALARM SUBSUCCESS [ATTR_INVALID] None
Out[13]: 1

# Use OPCUA admin client to mock the attribute value changes to trigger the alarm events.
# Mock the Management.TempHumidStatus.TempDriveCab to 25 for testing
In [14]: ds.Management_TempHumidStatus_TempDriveCab
Out[14]: 25.0

# Mock change to 68 to trigger warning event
In [15]: 2026-07-23 11:18:03.564267 MID-DISH/DS-MANAGER/SKA001 MANAGEMENT_TEMPHUMIDSTATUS_TEMPDRIVECAB ALARM UPDATE [ATTR_WARNING] 68.0

# Mock change to 60 - back to normal
In [15]: 2026-07-23 11:18:27.558021 MID-DISH/DS-MANAGER/SKA001 MANAGEMENT_TEMPHUMIDSTATUS_TEMPDRIVECAB ALARM UPDATE [ATTR_VALID] 60.0

# Mock change to 80 to trigger alarm event
In [15]: 2026-07-23 11:19:01.561205 MID-DISH/DS-MANAGER/SKA001 MANAGEMENT_TEMPHUMIDSTATUS_TEMPDRIVECAB ALARM UPDATE [ATTR_ALARM] 85.0