Merge pull request #1621 from simonduq/pr/fix-travis-output

Fix output of RPL tests
This commit is contained in:
Simon Duquennoy 2016-04-25 11:40:36 +02:00
commit 5b5f07ba52
14 changed files with 56 additions and 84 deletions

View file

@ -315,22 +315,20 @@ while(true) {
} else if(msg.startsWith("#L") && msg.endsWith("1; red")) {
 } else if(msg.startsWith("#L") && msg.endsWith("1; red")) {
hops++;
 hops++;
} else if(msg.startsWith("Data")) {
 } else if(msg.startsWith("Data")) {
// log.log("" + msg + "\n"); 
data = msg.split(" ");
 data = msg.split(" ");
num = parseInt(data[14]);
 num = parseInt(data[14]);
packets = packets.substr(0, num) + "*";
log.log("" + hops + " " + packets + "\n");
// log.log("Num " + num + "\n");
if(lastMsg != -1) {
 if(lastMsg != -1) {
if(num != lastMsg + 1) {
 if(num != lastMsg + 1) {
numMissed = num - lastMsg - 1;
 numMissed = num - lastMsg - 1;
lostMsgs += numMissed; 
 lostMsgs += numMissed; 
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
 log.log("Missed messages " + numMissed + " before " + num + "\n"); 
for(i = 0; i < numMissed; i++) {
 for(i = 0; i < numMissed; i++) {
packets = packets.substr(0, lastMsg + i) + "_"; 
 packets = packets.substr(0, lastMsg + i + 1) + "_"; 
}
 }
} 
 } 
}
 }
packets = packets.substr(0, num) + "*";
log.log("" + hops + " " + packets + "\n");
lastMsg = num;
 lastMsg = num;
}
 }
}</script> }</script>

View file

@ -315,22 +315,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -264,22 +264,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -7030,22 +7030,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -313,22 +313,20 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -318,12 +318,8 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
lastMissed = num;&#xD; lastMissed = num;&#xD;
@ -331,10 +327,12 @@ while(true) {&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD; seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD; seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD; seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD; seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD; seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -330,23 +330,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
seenMsgs++;&#xD; seenMsgs++;&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -226,23 +226,21 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(lastMsg != -1) {&#xD; if(lastMsg != -1) {&#xD;
if(num != lastMsg + 1) {&#xD; if(num != lastMsg + 1) {&#xD;
numMissed = num - lastMsg - 1;&#xD; numMissed = num - lastMsg - 1;&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
lastMsgHops = hops;&#xD; lastMsgHops = hops;&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>

View file

@ -356,12 +356,8 @@ while(true) {&#xD;
} else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD; } else if(msg.startsWith("#L") &amp;&amp; msg.endsWith("1; red")) {&#xD;
hops++;&#xD; hops++;&#xD;
} else if(msg.startsWith("Data")) {&#xD; } else if(msg.startsWith("Data")) {&#xD;
// log.log("" + msg + "\n"); &#xD;
data = msg.split(" ");&#xD; data = msg.split(" ");&#xD;
num = parseInt(data[14]);&#xD; num = parseInt(data[14]);&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
// log.log("Num " + num + "\n");&#xD;
if(newSink) {&#xD; if(newSink) {&#xD;
newDagOk++;&#xD; newDagOk++;&#xD;
newSink = 0;&#xD; newSink = 0;&#xD;
@ -372,10 +368,12 @@ while(true) {&#xD;
lostMsgs += numMissed; &#xD; lostMsgs += numMissed; &#xD;
log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD; log.log("Missed messages " + numMissed + " before " + num + "\n"); &#xD;
for(i = 0; i &lt; numMissed; i++) {&#xD; for(i = 0; i &lt; numMissed; i++) {&#xD;
packets = packets.substr(0, lastMsg + i) + "_"; &#xD; packets = packets.substr(0, lastMsg + i + 1) + "_"; &#xD;
}&#xD; }&#xD;
} &#xD; } &#xD;
}&#xD; }&#xD;
packets = packets.substr(0, num) + "*";&#xD;
log.log("" + hops + " " + packets + "\n");&#xD;
lastMsg = num;&#xD; lastMsg = num;&#xD;
}&#xD; }&#xD;
}</script> }</script>