more extensive rime abc testing:
less than perfect radio environment (95%) + each node receives 30 radio messages each
This commit is contained in:
parent
06a8b5d7d6
commit
62854151d7
3 changed files with 19 additions and 11 deletions
|
@ -5,13 +5,12 @@
|
||||||
<delaytime>0</delaytime>
|
<delaytime>0</delaytime>
|
||||||
<ticktime>1</ticktime>
|
<ticktime>1</ticktime>
|
||||||
<randomseed>123456</randomseed>
|
<randomseed>123456</randomseed>
|
||||||
<nrticklists>1</nrticklists>
|
|
||||||
<motedelay>5000</motedelay>
|
<motedelay>5000</motedelay>
|
||||||
<radiomedium>
|
<radiomedium>
|
||||||
se.sics.cooja.radiomediums.UDGM
|
se.sics.cooja.radiomediums.UDGM
|
||||||
<transmitting_range>50.0</transmitting_range>
|
<transmitting_range>50.0</transmitting_range>
|
||||||
<interference_range>100.0</interference_range>
|
<interference_range>100.0</interference_range>
|
||||||
<success_ratio_tx>1.0</success_ratio_tx>
|
<success_ratio_tx>0.95</success_ratio_tx>
|
||||||
<success_ratio_rx>1.0</success_ratio_rx>
|
<success_ratio_rx>1.0</success_ratio_rx>
|
||||||
</radiomedium>
|
</radiomedium>
|
||||||
<motetype>
|
<motetype>
|
||||||
|
@ -53,7 +52,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.plugins.SimControl
|
se.sics.cooja.plugins.SimControl
|
||||||
<width>313</width>
|
<width>313</width>
|
||||||
<z>2</z>
|
<z>1</z>
|
||||||
<height>199</height>
|
<height>199</height>
|
||||||
<location_x>30</location_x>
|
<location_x>30</location_x>
|
||||||
<location_y>30</location_y>
|
<location_y>30</location_y>
|
||||||
|
@ -62,7 +61,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
se.sics.cooja.radiomediums.UDGM$VisUDGM
|
se.sics.cooja.radiomediums.UDGM$VisUDGM
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<z>3</z>
|
<z>2</z>
|
||||||
<height>122</height>
|
<height>122</height>
|
||||||
<location_x>367</location_x>
|
<location_x>367</location_x>
|
||||||
<location_y>23</location_y>
|
<location_y>23</location_y>
|
||||||
|
@ -75,7 +74,7 @@
|
||||||
<history>256</history>
|
<history>256</history>
|
||||||
</plugin_config>
|
</plugin_config>
|
||||||
<width>573</width>
|
<width>573</width>
|
||||||
<z>1</z>
|
<z>3</z>
|
||||||
<height>242</height>
|
<height>242</height>
|
||||||
<location_x>23</location_x>
|
<location_x>23</location_x>
|
||||||
<location_y>235</location_y>
|
<location_y>235</location_y>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Rime anonymous broadcast (test-abc.c). Two Sky nodes.
|
Two Sky nodes running Rime anonymous broadcast (examples/rime/example-abc.c). Test finishes when both nodes have received more than 30 messages each.
|
||||||
|
|
|
@ -3,9 +3,14 @@ if (!msg.contains('received')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remember receiver */
|
/* Count received packets */
|
||||||
global.put("recv_" + id, "ok");
|
result = global.get("recv_" + id);
|
||||||
log.log(id + " received a message\n");
|
if (result == null) {
|
||||||
|
result = 0;
|
||||||
|
}
|
||||||
|
result++;
|
||||||
|
global.put("recv_" + id, result);
|
||||||
|
log.log(id + " received " + result + " messages\n");
|
||||||
|
|
||||||
/* Did all nodes (1 and 2) receive a message? */
|
/* Did all nodes (1 and 2) receive a message? */
|
||||||
for (i = 1; i <= 2; i++) {
|
for (i = 1; i <= 2; i++) {
|
||||||
|
@ -13,7 +18,11 @@ for (i = 1; i <= 2; i++) {
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (result < 30) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.log("TEST OK\n"); /* Report test success */
|
log.log("Node 1 received " + global.get("recv_1") + " messages\n");
|
||||||
mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/
|
log.log("Node 2 received " + global.get("recv_2") + " messages\n");
|
||||||
|
log.testOK(); /* Report test success */
|
||||||
|
|
Loading…
Reference in a new issue