Description: This function returns either the number of unacknowledged alarms or a Yes/No flag to indicate that the alarms exist. A filter may be applied to limit the search. Note that this function will place a heavy load on computer resources while searching.
Format: GetNumUnacked(UserFilter, ReturnYesNoFlag);
Parameters: UserFilter is an array that can be used to limit the search. If set to Invalid, GenNumUnacked will return all unacknowledged alarms.
This will typically be a one-dimensional, three-element array with elements as follows:
|
Element |
Description |
|
0 |
Index of the field in the alarm table. This is defined as the second parameter to the KeyName as shown in the KeyName table |
|
1 |
Limiting value |
|
2 |
Comparison Operator (see Comparison Operator table, below) |
|
Value to use for filter (*) |
Alarm Table Key Names |
|
0 |
Message |
|
1 |
Priority |
|
2 |
Type |
|
3 |
HookPointValue |
|
4 |
Area |
|
5 |
HookPointUnits |
|
6 |
Operator |
(*) Note: these values may vary if an application has specified a different table header and indexes in their own customized Alarm_Manager.INI.
|
Comparison Value |
Comparison |
Case Sensitive |
|
0 |
Equal to |
no |
|
1 |
Greater than |
no |
|
2 |
Less than |
no |
|
3 |
Specified by wildcard (field value is text) |
no |
|
4 |
Not equal to |
no |
|
5 |
Less than or equal to |
no |
|
6 |
Greater than or equal to |
no |
|
7 |
Opposite of wildcard specification (field value is text) |
no |
|
8 |
Equal to |
yes |
|
9 |
Greater than |
yes |
|
10 |
Less than |
yes |
|
11 |
Specified by wildcard (field value is text) |
yes |
|
12 |
Not equal to |
yes |
|
13 |
Less than or equal to |
yes |
|
14 |
Greater than or equal to |
yes |
|
15 |
Opposite of wildcard specification (field value is text) yes |
|
Example:
Temp = New(3);
Temp[0] = \AlarmPriorityField;
Temp[1] = 1; {Critical }
Temp[2] = 0; { Equal to, not case sensitive. This parameter may hold a 1-dimensional array with 2 or 3 numeric elements. }
If a more detailed filtering criterion is required, a 2-dimensional array may be used. See DBListGet for examples and further information.
ReturnYesNoFlag is a Boolean that controls the result returned by the function.
• If true, only a 1 or a 0 will be returned, indicating whether unacknowledged alarms were found.
• If false, the number of unacknowledged alarms will be returned.