mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-30 19:29:45 +00:00
Rewrite of the Sky shell collect test. The new test is better equipped
to handle reordered packets - unlike the previous test, the new test counts all incoming packets in the data stream, even those that are significantly reordered. The new test also shows the received packets and their hop counts in a much more readable fashion.
This commit is contained in:
parent
5debc183a9
commit
486f7f9728
@ -24,8 +24,7 @@
|
|||||||
<identifier>sky1</identifier>
|
<identifier>sky1</identifier>
|
||||||
<description>Sky Mote Type #1</description>
|
<description>Sky Mote Type #1</description>
|
||||||
<source>[CONTIKI_DIR]/examples/sky-shell/sky-shell.c</source>
|
<source>[CONTIKI_DIR]/examples/sky-shell/sky-shell.c</source>
|
||||||
<commands>make clean
|
<commands>make sky-shell.sky TARGET=sky</commands>
|
||||||
make sky-shell.sky TARGET=sky</commands>
|
|
||||||
<firmware>[CONTIKI_DIR]/examples/sky-shell/sky-shell.sky</firmware>
|
<firmware>[CONTIKI_DIR]/examples/sky-shell/sky-shell.sky</firmware>
|
||||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||||
@ -39,12 +38,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||||
</motetype>
|
</motetype>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>87.29845932913939</x>
|
<x>69.8193406818502</x>
|
||||||
<y>60.286214311723164</y>
|
<y>86.08116624448307</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -54,12 +52,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>94.30809966340686</x>
|
<x>23.73597351424919</x>
|
||||||
<y>22.50388779326399</y>
|
<y>23.64085389583863</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -69,12 +66,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>82.40423567500785</x>
|
<x>96.89503278354498</x>
|
||||||
<y>39.56979106929553</y>
|
<y>61.516110156918224</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -84,12 +80,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>26.185019854469438</x>
|
<x>7.611970631754317</x>
|
||||||
<y>4.800834369523899</y>
|
<y>50.863062569941086</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -99,12 +94,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>1.9530156130507015</x>
|
<x>97.77577457011573</x>
|
||||||
<y>78.3175061800706</y>
|
<y>36.50885983165134</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -114,12 +108,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>48.35216700543414</x>
|
<x>81.84280607291373</x>
|
||||||
<y>80.36988713780997</y>
|
<y>12.262433268451778</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -129,12 +122,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>24.825985087266833</x>
|
<x>48.76918142113213</x>
|
||||||
<y>74.27809432062487</y>
|
<y>76.28996665071358</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -144,12 +136,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>8.356165164293616</x>
|
<x>10.516199800941727</x>
|
||||||
<y>94.33967355724187</y>
|
<y>71.39959931668729</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -159,12 +150,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>45.11740613004886</x>
|
<x>69.48672858021564</x>
|
||||||
<y>31.7059041432301</y>
|
<y>2.274435761561955</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -174,12 +164,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>68.9908548386292</x>
|
<x>84.25868612469665</x>
|
||||||
<y>55.01991960639596</y>
|
<y>32.943146693468975</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -189,12 +178,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>13.181122543889046</x>
|
<x>13.670969901144792</x>
|
||||||
<y>55.9636533130127</y>
|
<y>63.99238378992226</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -204,12 +192,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>2.1749985906538427</x>
|
<x>72.51554571631638</x>
|
||||||
<y>78.39666095789707</y>
|
<y>47.00560695436694</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -219,12 +206,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>37.79795217518357</x>
|
<x>9.789480819347663</x>
|
||||||
<y>7.164284163506062</y>
|
<y>73.70566372866651</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -234,12 +220,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>64.4595177394984</x>
|
<x>32.19085060633389</x>
|
||||||
<y>72.115414337433</y>
|
<y>72.59300816076136</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -249,12 +234,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>81.85663737096085</x>
|
<x>80.2677099635723</x>
|
||||||
<y>89.31412706434035</y>
|
<y>98.0702168139253</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -264,12 +248,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>44.74952276297882</x>
|
<x>9.946705912815235</x>
|
||||||
<y>18.78566116347574</y>
|
<y>52.10151176834845</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -279,12 +262,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>96.11333426285873</x>
|
<x>2.43737538721972</x>
|
||||||
<y>90.64560410751824</y>
|
<y>56.151002617425625</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -294,12 +276,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>21.651464136783527</x>
|
<x>27.435525284930186</x>
|
||||||
<y>7.1381043251259495</y>
|
<y>61.81996286556931</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -309,12 +290,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>83.6006916200628</x>
|
<x>70.60927462351833</x>
|
||||||
<y>26.97170140682981</y>
|
<y>98.32577014155726</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -324,12 +304,11 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.mspmote.SkyMote
|
|
||||||
<breakpoints />
|
<breakpoints />
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>1.3446070721664705</x>
|
<x>43.3203771155477</x>
|
||||||
<y>7.340373220385176</y>
|
<y>11.948622865702085</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
@ -339,18 +318,6 @@ make sky-shell.sky TARGET=sky</commands>
|
|||||||
<motetype_identifier>sky1</motetype_identifier>
|
<motetype_identifier>sky1</motetype_identifier>
|
||||||
</mote>
|
</mote>
|
||||||
</simulation>
|
</simulation>
|
||||||
<plugin>
|
|
||||||
se.sics.cooja.plugins.LogListener
|
|
||||||
<plugin_config>
|
|
||||||
<filter />
|
|
||||||
</plugin_config>
|
|
||||||
<width>690</width>
|
|
||||||
<z>2</z>
|
|
||||||
<height>207</height>
|
|
||||||
<location_x>327</location_x>
|
|
||||||
<location_y>24</location_y>
|
|
||||||
<minimized>false</minimized>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.ScriptRunner
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
<plugin_config>
|
<plugin_config>
|
||||||
@ -366,43 +333,21 @@ print_stats()
|
|||||||
total_dups + " dups, " +
|
total_dups + " dups, " +
|
||||||
(total_dups / nrNodes) + " dups/node, " +
|
(total_dups / nrNodes) + " dups/node, " +
|
||||||
(total_hops / total_received) + " hops/message\n");
|
(total_hops / total_received) + " hops/message\n");
|
||||||
log.log("Seqnos: ");
|
log.log("Received:\n");
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
for(i = 1; i <= nrNodes; i++) {
|
||||||
log.log(seqnos[i] + " ");
|
log.log("Node " + i + " ");
|
||||||
|
if(i == sink) {
|
||||||
|
log.log("sink\n");
|
||||||
|
} else {
|
||||||
|
log.log("received: " + received[i] + " hops: " + hops[i] + "\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
log.log("\n");
|
|
||||||
log.log("Lost: ");
|
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
|
||||||
log.log(lost[i] + " ");
|
|
||||||
}
|
|
||||||
log.log("\n");
|
|
||||||
log.log("Dups: ");
|
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
|
||||||
log.log(dups[i] + " ");
|
|
||||||
}
|
|
||||||
log.log("\n");
|
|
||||||
log.log("Reorder: ");
|
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
|
||||||
log.log(reorder[i] + " ");
|
|
||||||
}
|
|
||||||
log.log("\n");
|
|
||||||
log.log("Hops: ");
|
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
|
||||||
log.log(hops[i] + " ");
|
|
||||||
}
|
|
||||||
log.log("\n");
|
|
||||||
log.log("Received: ");
|
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
|
||||||
log.log(count[i] + " ");
|
|
||||||
}
|
|
||||||
log.log("\n");
|
|
||||||
log.log("Stats: cpu " + 100 * total_cpu / (total_cpu + total_lpm) +
|
log.log("Stats: cpu " + 100 * total_cpu / (total_cpu + total_lpm) +
|
||||||
"% lpm " + 100 * total_lpm / (total_cpu + total_lpm) +
|
"% lpm " + 100 * total_lpm / (total_cpu + total_lpm) +
|
||||||
"% rx " + 100 * total_listen / (total_cpu + total_lpm) +
|
"% rx " + 100 * total_listen / (total_cpu + total_lpm) +
|
||||||
"% tx " + 100 * total_transmit / (total_cpu + total_lpm) +
|
"% tx " + 100 * total_transmit / (total_cpu + total_lpm) +
|
||||||
"% average latency " + total_latency / (4096 * total_received) +
|
"% average latency " + total_latency / (4096 * total_received) +
|
||||||
" ms \n");
|
" ms \n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TIMEOUT(500000);
|
TIMEOUT(500000);
|
||||||
@ -410,12 +355,8 @@ TIMEOUT(500000);
|
|||||||
|
|
||||||
/* Conf. */
|
/* Conf. */
|
||||||
booted = new Array();
|
booted = new Array();
|
||||||
count = new Array();
|
received = new Array();
|
||||||
hops = new Array();
|
hops = new Array();
|
||||||
seqnos = new Array();
|
|
||||||
lost = new Array();
|
|
||||||
dups = new Array();
|
|
||||||
reorder = new Array();
|
|
||||||
nrNodes = 20;
|
nrNodes = 20;
|
||||||
total_received = 0;
|
total_received = 0;
|
||||||
total_lost = 0;
|
total_lost = 0;
|
||||||
@ -430,17 +371,13 @@ total_latency = 0;
|
|||||||
nodes_starting = true;
|
nodes_starting = true;
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
for(i = 1; i <= nrNodes; i++) {
|
||||||
booted[i] = false;
|
booted[i] = false;
|
||||||
count[i] = 0;
|
received[i] = "__________";
|
||||||
hops[i] = 0;
|
hops[i] = received[i];
|
||||||
seqnos[i] = -1;
|
|
||||||
lost[i] = 0;
|
|
||||||
dups[i] = 0;
|
|
||||||
reorder[i] = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wait until all nodes have started */
|
/* Wait until all nodes have started */
|
||||||
while(nodes_starting) {
|
while(nodes_starting) {
|
||||||
YIELD_THEN_WAIT_UNTIL(msg.startsWith('Starting'));
|
YIELD_THEN_WAIT_UNTIL(msg.startsWith('Star'));
|
||||||
|
|
||||||
log.log("Node " + id + " booted\n");
|
log.log("Node " + id + " booted\n");
|
||||||
booted[id] = true;
|
booted[id] = true;
|
||||||
@ -511,49 +448,46 @@ while(true) {
|
|||||||
total_latency += latency;
|
total_latency += latency;
|
||||||
|
|
||||||
source = node_id;
|
source = node_id;
|
||||||
count[source]++;
|
dups = received[source].substr(seqno, 1);
|
||||||
hops[source] = hop;
|
if(dups == "_") {
|
||||||
seqno_gap = seqno - seqnos[source];
|
dups = 1;
|
||||||
seqnos[source] = seqno;
|
} else if(dups < 9) {
|
||||||
|
dups++;
|
||||||
|
}
|
||||||
|
received[source] = received[source].substr(0, seqno) + dups +
|
||||||
|
received[source].substr(seqno + 1, 10 - seqno);
|
||||||
|
|
||||||
|
if(hop > 9) {
|
||||||
|
hop = "+";
|
||||||
|
}
|
||||||
|
hops[source] = hops[source].substr(0, seqno) + hop +
|
||||||
|
hops[source].substr(seqno + 1, 10 - seqno);
|
||||||
|
|
||||||
total_received++;
|
total_received++;
|
||||||
total_hops += hop;
|
total_hops += hop;
|
||||||
|
|
||||||
if(seqno_gap >= 2) {
|
|
||||||
total_lost += seqno_gap - 1;
|
|
||||||
lost[source] += seqno_gap - 1;
|
|
||||||
total_received--;
|
|
||||||
total_hops -= hop;
|
|
||||||
count[source]--;
|
|
||||||
} else if(seqno_gap == 0) {
|
|
||||||
total_dups += 1;
|
|
||||||
dups[source] += 1;
|
|
||||||
total_received--;
|
|
||||||
total_hops -= hop;
|
|
||||||
count[source]--;
|
|
||||||
} else if(seqno_gap == -1) {
|
|
||||||
total_reorder += 1;
|
|
||||||
reorder[source] += 1;
|
|
||||||
}
|
|
||||||
print_stats();
|
print_stats();
|
||||||
}
|
}
|
||||||
/* Signal OK if all nodes have reported 10 messages. */
|
/* Signal OK if all nodes have reported 10 messages. */
|
||||||
num_reported = 0;
|
num_reported = 0;
|
||||||
for(i = 1; i <= nrNodes; i++) {
|
for(i = 1; i <= nrNodes; i++) {
|
||||||
if(i != sink && count[i] == 10) {
|
if(i != sink) {
|
||||||
num_reported++;
|
if(!isNaN(received[i])) {
|
||||||
}
|
num_reported++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(num_reported == nrNodes - 1) {
|
if(num_reported == nrNodes - 1) {
|
||||||
print_stats();
|
print_stats();
|
||||||
log.testOK();
|
log.testOK();
|
||||||
}
|
}
|
||||||
}</script>
|
}</script>
|
||||||
<active>true</active>
|
<active>true</active>
|
||||||
</plugin_config>
|
</plugin_config>
|
||||||
<width>602</width>
|
<width>602</width>
|
||||||
<z>3</z>
|
<z>0</z>
|
||||||
<height>413</height>
|
<height>508</height>
|
||||||
<location_x>257</location_x>
|
<location_x>257</location_x>
|
||||||
<location_y>0</location_y>
|
<location_y>0</location_y>
|
||||||
<minimized>false</minimized>
|
<minimized>false</minimized>
|
||||||
@ -561,7 +495,7 @@ while(true) {
|
|||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.SimControl
|
se.sics.cooja.plugins.SimControl
|
||||||
<width>259</width>
|
<width>259</width>
|
||||||
<z>1</z>
|
<z>5</z>
|
||||||
<height>200</height>
|
<height>200</height>
|
||||||
<location_x>4</location_x>
|
<location_x>4</location_x>
|
||||||
<location_y>0</location_y>
|
<location_y>0</location_y>
|
||||||
@ -572,7 +506,30 @@ while(true) {
|
|||||||
<plugin_config>
|
<plugin_config>
|
||||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
<viewport>2.3981827551130066 0.0 0.0 2.3981827551130066 8.139022870763759 0.1214717784430076</viewport>
|
<viewport>2.2620479837704246 0.0 0.0 2.2620479837704246 11.65652309586307 5.218753534979797</viewport>
|
||||||
|
</plugin_config>
|
||||||
|
<width>260</width>
|
||||||
|
<z>3</z>
|
||||||
|
<height>296</height>
|
||||||
|
<location_x>0</location_x>
|
||||||
|
<location_y>197</location_y>
|
||||||
|
<minimized>false</minimized>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.SimControl
|
||||||
|
<width>259</width>
|
||||||
|
<z>6</z>
|
||||||
|
<height>200</height>
|
||||||
|
<location_x>4</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
<minimized>false</minimized>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Visualizer
|
||||||
|
<plugin_config>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<viewport>3.1695371670945955 0.0 0.0 3.1695371670945955 -64.4008177427222 -14.683213177997528</viewport>
|
||||||
</plugin_config>
|
</plugin_config>
|
||||||
<width>260</width>
|
<width>260</width>
|
||||||
<z>4</z>
|
<z>4</z>
|
||||||
@ -581,6 +538,18 @@ while(true) {
|
|||||||
<location_y>197</location_y>
|
<location_y>197</location_y>
|
||||||
<minimized>false</minimized>
|
<minimized>false</minimized>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.LogListener
|
||||||
|
<plugin_config>
|
||||||
|
<filter />
|
||||||
|
</plugin_config>
|
||||||
|
<width>720</width>
|
||||||
|
<z>2</z>
|
||||||
|
<height>486</height>
|
||||||
|
<location_x>695</location_x>
|
||||||
|
<location_y>2</location_y>
|
||||||
|
<minimized>false</minimized>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.TimeLine
|
se.sics.cooja.plugins.TimeLine
|
||||||
<plugin_config>
|
<plugin_config>
|
||||||
@ -610,11 +579,11 @@ while(true) {
|
|||||||
<split>118</split>
|
<split>118</split>
|
||||||
<zoom>9</zoom>
|
<zoom>9</zoom>
|
||||||
</plugin_config>
|
</plugin_config>
|
||||||
<width>1024</width>
|
<width>1440</width>
|
||||||
<z>0</z>
|
<z>1</z>
|
||||||
<height>438</height>
|
<height>425</height>
|
||||||
<location_x>0</location_x>
|
<location_x>0</location_x>
|
||||||
<location_y>260</location_y>
|
<location_y>405</location_y>
|
||||||
<minimized>false</minimized>
|
<minimized>false</minimized>
|
||||||
</plugin>
|
</plugin>
|
||||||
</simconf>
|
</simconf>
|
||||||
|
Loading…
Reference in New Issue
Block a user