more extensive rime abc testing:

less than perfect radio environment (95%) + each node receives 30 radio messages each
This commit is contained in:
fros4943 2008-11-11 15:17:44 +00:00
parent 06a8b5d7d6
commit 62854151d7
3 changed files with 19 additions and 11 deletions

View File

@ -5,13 +5,12 @@
<delaytime>0</delaytime>
<ticktime>1</ticktime>
<randomseed>123456</randomseed>
<nrticklists>1</nrticklists>
<motedelay>5000</motedelay>
<radiomedium>
se.sics.cooja.radiomediums.UDGM
<transmitting_range>50.0</transmitting_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>
</radiomedium>
<motetype>
@ -53,7 +52,7 @@
<plugin>
se.sics.cooja.plugins.SimControl
<width>313</width>
<z>2</z>
<z>1</z>
<height>199</height>
<location_x>30</location_x>
<location_y>30</location_y>
@ -62,7 +61,7 @@
<plugin>
se.sics.cooja.radiomediums.UDGM$VisUDGM
<width>300</width>
<z>3</z>
<z>2</z>
<height>122</height>
<location_x>367</location_x>
<location_y>23</location_y>
@ -75,7 +74,7 @@
<history>256</history>
</plugin_config>
<width>573</width>
<z>1</z>
<z>3</z>
<height>242</height>
<location_x>23</location_x>
<location_y>235</location_y>

View File

@ -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.

View File

@ -3,9 +3,14 @@ if (!msg.contains('received')) {
return;
}
/* Remember receiver */
global.put("recv_" + id, "ok");
log.log(id + " received a message\n");
/* Count received packets */
result = global.get("recv_" + id);
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? */
for (i = 1; i <= 2; i++) {
@ -13,7 +18,11 @@ for (i = 1; i <= 2; i++) {
if (result == null) {
return;
}
if (result < 30) {
return;
}
}
log.log("TEST OK\n"); /* Report test success */
mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/
log.log("Node 1 received " + global.get("recv_1") + " messages\n");
log.log("Node 2 received " + global.get("recv_2") + " messages\n");
log.testOK(); /* Report test success */