// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. class NetworkLog extends XMLlog; //port of the server var int RemotePort; //adres of the server var string ServerAddress; //end of line var string LF; //tcplink variable var MyTcp link; //static array for buffering the elements (max depth 10) var string buffer[10]; //counter of the number of elements in the array var int count; //backup unit var LocalLog fl; // We buffer the var string _totalbuffer; function startDocument(string version, string type) { link.SendText(""$LF); } function startElement(string elm) { fl.startElement(elm); buffer[count]=elm; link.SendText("<"$elm$">"$LF); count++; } function writeAttribute(string att, string val) { fl.writeAttribute(att, val); If(count > 1) { link.SendText("<"$att$">"$val$""$LF); } } function endElement() { local string t; fl.endElement(); if(count > 0) { t = buffer[count-1]; count--; link.SendText(""$LF); } } function openLog2(string loc, int port) { link = Spawn(class'myTcp'); link.RemotePort = port; link.ServerAddress = loc; link.InitTcpLinkEventLogger(); fl = Spawn(class'LocalLog'); fl.openLog("TEMPLOG"); } function closeLog() { endElement(); fl.closeLog(); if (link.IsConnected() == True) { link.Close(); } } defaultproperties { count = 0; }