To present a visual display of the alarms in a particular list, the Alarm List library tool is used. (Information on the Alarm List Alarm Library tool can be found in the VTS Developer's Guide.
The Alarm List tool enables you to specify one of three alarm line formats by entering a numeric value in the Line Format field:
|
Value |
Meaning |
|
0 |
Custom alarm line format |
|
1 |
Event/status, Priority, Time, Date, Area, Message (Tag Description or Name if no Description is specified), and operator. |
|
2 |
Time, Date, and Message |
If the Line Format field for the Alarm List tool is set to 0, the Alarm List object calls a module named AlarmLineDraw.
\AlarmLineDraw(Left, LineBottom, RightLimit, LineTop, Line, Result);
You can define this module in your application's AppMod.src document file. It should not be defined in a class section.
Inside the AlarmLineDraw module, you can scope back into the caller to find the following variables:
CurPen The pen with which to draw (swapped with CurBrush if selected);
CurBrush The brush with which to draw (swapped with CurPen if selected);
CurFont The font to use (line height is based on this font); and
CurSelected The currently selected line (equal to the AlarmLineDraw's "index" parameter if selected).
Parameters:
The parameters for the AlarmLineDraw module are:
\AlarmLineDraw(Left, LineBottom, RightLimit, LineTop, Line, Result);
Left The left coordinate at which to draw the line on the screen.
LineBottom The bottom coordinate at which to draw the line on the screen.
RightLimit The right coordinate at which to draw the line on the screen.
LineTop The top coordinate at which to draw the line on the screen.
Line The index of the line in the alarm list.
Result An array of alarm information. Result[Index] is an array of elements for the specific line. Its array elements in the default configuration are:
|
Index |
Element |
|
-2 |
Key Name |
|
-1 |
Date and Time Stamp |
|
0 |
Status (Event Type) |
|
1 |
Message |
|
2 |
Priority |
|
3 |
Type |
|
4 |
Operator |
|
5 |
Area |
In element 0 (Status (Event Type)), the status/event information for the alarms represents the lists on which each alarm appears. The characters in this value can be interpreted as follows:
|
Status |
Event | ||
|
Character 0 |
Set when the alarm is active |
Character 0 |
Set to 1 when the alarm is activated; Set to 0 when the alarm is cleared; or Set to X when there is no change. |
|
Character 1 |
Set when the alarm is unacknowledged |
Character 1 |
Set to 1 when the alarm is unacknowledged; Set to 0 when the alarm is acknowledged; or Set to X when there is no change. |
|
Character 2 |
Set when the alarm is disabled |
Character 2 |
Set to 1 when the alarm is disabled; Set to 0 when the alarm is enabled; or Set to X when there is no change. |
Custom alarm line drawing is discussed in the section that follows.
Topics in this section: