From 7fca061842069980f359501800be33fb422a63eb Mon Sep 17 00:00:00 2001 From: ydan Date: Tue, 29 Mar 2016 11:51:17 -0600 Subject: [PATCH] Ignoring ush files. Adding in room and building parsing from hostname. --- .gitignore | 3 ++- Metrics.usp | 28 +++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 815e9b5..ce110bd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ TEC HD v4.3.vtp TEC HD v4.3.vtz *.zip *.spz -SPlsWork/* \ No newline at end of file +SPlsWork/* +*.ush \ No newline at end of file diff --git a/Metrics.usp b/Metrics.usp index 9bf5e72..551ea00 100644 --- a/Metrics.usp +++ b/Metrics.usp @@ -531,12 +531,27 @@ Release Audio_Only_Press // Audio Only button on init screen // If system gets hostname, set it in the global var CHANGE dmpsHostName { -// STRING trash[16]; -// if(FIND(" ",dmpsHostName) <= 1) -// { -// trash = REMOVE(" ",dmpsHostName); // remove preceding space if there -// } + STRING temp[100],bldg[32],room[32],flr[2]; + INTEGER c; + bldg = ""; + room = ""; + flr = ""; + HOSTNAME = dmpsHostName; + temp = dmpsHostName; + + if(FIND(" ",dmpsHostName) >= 1) + { + // temp = dmpsHostName; + bldg = REMOVE(" ",temp); // remove preceding space if there + room = REMOVE(" ",temp); + c = GETC(room); + flr = ITOA(c); + } + + HOSTBLDG = bldg; + HOSTROOM = room; + HOSTFLOOR = flr; } // If system gets IP, set it in the global var @@ -648,6 +663,9 @@ THREADSAFE SOCKETCONNECT client else Print("OnConnect: Connected to port %ld on address %s\n", REPORTINGHOSTPORT, REPORTINGHOST); + // Consider doing a document overwrite + BuildHttpMessage("controlProcessor", "System active",SYSTEM,""); + // Starts timer to force reconnect of stale session WAIT (RECONNECTTIME, ReconnectTimer) {