 const int TSTMODE = 16;
 const int DORESET = 32;
 const int GETSTAT = 64;
+
+const unsigned long MAX_UNSIGNED_LONG = 4294967295;
+const unsigned long TSTLEN = 5*60*1000;
+unsigned long tstbgn = 0;
+boolean iststmode = false;
 
 //
 EthernetServer server(2323);

            {
         //
            cmd |= GETSTAT;
            }
         //else
         if (cmd & DORESET)
            {
         //
            for (int i = 0; i < pinc; i++)
               {
            //

       if (pinreport[i] == 0 && pineepromstate[i]==1)
         {
      //
         server.write( getstatus( iststmode ? GETSTAT|TSTMODE : GETSTAT ) );
         pinreport[i] = 1;
         }
      }
