Alarm_Log Table Status Values: N - newly logged alarm record - not yet processed into active or history states P - processed alarm T - alarm record with no matching transponder ID found in DB-Able Alarm Table Status Values: A - active alarm record S - active alarm record that has been statused H - alarm history record 1. Log alarm data from Alarm Terminal into Oracle Alarm_Log table using ODBC SQL Insert: For each Alarm Terminal Alarm Message Parse Alarm Message into alarm data fields and assign values to Alarm_Log record Assign initial alarm status of "N" to Alarm_Log record Assign system date/time stamp to Alarm_Log record 2. Invoke PLSQL procedure from trigger associated to Insert event on Alarm_Log table: If Alarm Message Status = "A" Then Select by AID from Equipment table If found Then Fetch Name, Node from Equipment table and assign to new alarm record Fetch X & Y from Structure table by Equipment_ID and assign to new alarm record Fetch NodeStatus from Node Attribute table and assign to new alarm record Assign Status of "A" to new alarm record Fetch Alarm fields from Alarm_Log record and assign to new alarm record Add new Alarm record to Alarm Table Increment Alarm_Count by 1 in Node_Alarm_Count table Assign Status of "P" to Alarm_Log record Else Assign Alarm Status of "T" to Alarm_Log record ElseIf Alarm Message Status = "R" Then Select by Status,AID,Alarm_Code from Alarm table For each Active Alarm Record Found Fetch Restore Date & Restore Time from Alarm_Log record and assign to each selected alarm record Assign Status of "H" to each selected alarm record Assign Status of "P" to Alarm_Log record Decrement Alarm_Count by 1 in Node_Alarm_Count table Else Assign Alarm Status of "T" to new alarm record Else Error 3. Refresh local alarm themes using delayed run script in ArcView Notes: Use separate Active Alarm and Alarm History tables. Local Active Alarm table is completely refreshed each iteration - average 10 records. Alarm History table is refreshed incrementally using "Magic Cookie" technique - all Alarm History records added to Alarm table since last local refresh are selected and added to local Alarm History table. A. Initialize Refresh_DateTime "magic cookie" to start of year B. Refresh active alarm data: Select from Alarm table where Alarm.Status = "A" or "S" Delete all Active_Alarm records (DBF) For each Alarm record selected Add record to local Active_Alarm table (DBF) If records found Then Refresh displayed Active Alarm themes Refresh Active Alarm List?? C. Refresh alarm history data: Select from Alarm table where Alarm.Status = "H" and Alarm.DateTime > Refresh_DateTime For each Alarm record selected Add record to local Alarm_History table (DBF) If records found Then Refresh displayed Alarm_History themes Refresh Alarm_History List?? Assign Alarm.DateTime of last (chronologically) selected alarm record to Refresh_DateTime