Ignore:
Timestamp:
07/06/2019 01:54:03 PM (7 years ago)
Author:
jdalbey
Message:

Add new files for prototype of unified logging service

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/webapps/unifiedlogger/CMS watcher design.txt

    r429 r431  
    1 For each cms in signlist 
    21 
    3   IF prev is empty and curr not empty THEN 
    4         print "Activated", ID, curr 
    5   IF curr is empty and prev not empty THEN 
    6         print "Deactivated", ID 
    7   IF curr not empty and prev not empty and curr not equal prev THEN 
    8         print "Updated", ID, curr 
     2Function Setup 
     3/* Assumes cms messages file is created in same order each time. */ 
     4Create two lists, prev and curr, initially empty 
     5Load the cmsmessage file into prev. 
    96 
    10 END 
     7Function processMessages 
     8    Load the cms message file into curr 
     9    Reset Results 
     10    For idx in 1 to length(curr) 
    1111 
     12      IF prev[idx] is empty and curr[idx] not empty THEN 
     13            append to results: "Activated", ID, curr[idx] 
     14      IF curr is empty and prev not empty THEN 
     15            append to results: "Deactivated", ID 
     16      IF curr not empty and prev not empty and curr not equal prev THEN 
     17            append to results: "Updated", ID, curr 
     18 
     19    END 
     20 
     21    Copy curr to prev 
     22 
     23 
Note: See TracChangeset for help on using the changeset viewer.