The API for managing alarms is directly available from the
IltObject class.
The following code line retrieves the object state corresponding
to the alarms for an object named
paris
.
IltAlarm.State alarms = paris.getAlarmState();
The following code line shows how to set
the count of new alarms to the object.
alarms.setNewAlarmCount(IltAlarm.Severity.Critical, 2);
To set the count of acknowledged alarms,
use the following code:
alarms.setAcknowledgedAlarmCount(IltAlarm.Severity.Critical, 2);
Alarms can be set either directly, as
shown above, or incrementally, as in the following code where a
new critical alarm is added to the same network element.