ActiveAlarmCounter
Add an ActiveAlarmCounter and a CDPEventListener to your component. Both ActiveAlarmCounter and CDPEventListener are found in Sequencer in the Resource tree. Connect the output CDPEvent from CDPEventListener to ActiveAlarmCounter's input CDPEvent. ErrorCount, WarningCount, NotifyCount and TotalCount will give number of active alarms matching the settings done for AlarmFilter and GroupFilter. If one of the counters change value, a CountChanged event (Sequencer event) is emitted. By default, active alarms from all applications in the system are counted. If only specific applications are wanted, update ListenPaths property in CDPEventListener with application-names in the system.
Note: ActiveAlarmCounter correct counting relies on alarm re-report events. Therefore, in order to work correctly, the CDPEventListener needs to have the ListenAlarmReprises property set.
An active alarm has the Set-bit and/or the Unacknowledged-bit set in the 32-bit status-value. Whether an active alarm is counted or not depends on the AlarmFilter and GroupFilter settings.
Arguments
Input Arguments
Name | Description |
---|---|
CDPEvent | The incoming alarm-event. |
Path | Source of alarm-event. |
Code | Alarm event code (Set/Clear/Ack). |
Status | 32-bit alarm status,where value 0 indicates that the alarm is OK. Specific bits indicate if the alarm is Set and/or Unacknowledged for different alarm-levels. |
EventData | EventData from the alarm, like Group and RDAppList. |
Output Arguments
Name | Description |
---|---|
CountChanged | A Sequencer event emitted if one of the output counters has changed value. |
ErrorCount | Number of alarms with level Error. |
WarningCount | Number of alarms with level Warning. |
NotifyCount | Number of alarms with level Notify. |
TotalCount | Total number of alarms. |
Properties
Name | Description |
---|---|
AlarmFilter | Selection between UnackOrSet, Set, UnackAndSet and Unack. Decides which alarms to count (Unack- or Set-bit, Set-bit, Unack- and Set-bit, Unack-bit). |
GroupFilter | Semicolon-separated list of alarm group(s). When left empty, all alarms are counted independent of the alarm's Group-property. The Group-property of an alarm can be empty (default), or consist of one or more semicolon- separated group-names. If one of the group(s) in the alarm's Group-property matches one of the group(s) listed in GroupFilter, the alarm is counted (if AlarmFilter also matches). |
TimeoutOldAlarms | When an alarm-event is received, and when receiving re-reported active alarms (default every 15s), timestamp is registered. If an alarm times out (given by TimeoutOldAlarms [s]), it is removed from list and not counted anymore. |
Dump active alarms to message log
In ActiveAlarmCounter Property-section, there is a property called DumpActiveAlarms. When property button is toggled then the list of current alarms matching the filter settings will be printed to the application output. In addition, active alarms not matching the filter settings will also be printed.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.