Skip to content

Commit

Permalink
Ignoring ush files. Adding in room and building parsing from hostname.
Browse files Browse the repository at this point in the history
  • Loading branch information
ydan committed Mar 29, 2016
1 parent 36b0234 commit 7fca061
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ TEC HD v4.3.vtp
TEC HD v4.3.vtz
*.zip
*.spz
SPlsWork/*
SPlsWork/*
*.ush
28 changes: 23 additions & 5 deletions Metrics.usp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 7fca061

Please sign in to comment.