modified test to fail if any single node successfully delivers 20 sensor data packets, before all other nodes has delivered 5 packets

This commit is contained in:
fros4943 2008-12-03 14:19:41 +00:00
parent ace83513e8
commit 87ebab7113
3 changed files with 53 additions and 26 deletions

View File

@ -8,10 +8,10 @@
<motedelay>10000</motedelay> <motedelay>10000</motedelay>
<radiomedium> <radiomedium>
se.sics.cooja.radiomediums.UDGM se.sics.cooja.radiomediums.UDGM
<transmitting_range>50.0</transmitting_range> <transmitting_range>30.0</transmitting_range>
<interference_range>100.0</interference_range> <interference_range>40.0</interference_range>
<success_ratio_tx>1.0</success_ratio_tx> <success_ratio_tx>0.9</success_ratio_tx>
<success_ratio_rx>1.0</success_ratio_rx> <success_ratio_rx>0.9</success_ratio_rx>
</radiomedium> </radiomedium>
<motetype> <motetype>
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
@ -25,8 +25,8 @@
<motetype_identifier>sky1</motetype_identifier> <motetype_identifier>sky1</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>29.17421996892351</x> <x>9.333811152651393</x>
<y>104.77909205535983</y> <y>89.28114548870677</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
@ -39,8 +39,8 @@
<motetype_identifier>sky1</motetype_identifier> <motetype_identifier>sky1</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>59.38068944364397</x> <x>33.040227185226826</x>
<y>97.64274390719908</y> <y>54.184283361563054</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
@ -53,8 +53,8 @@
<motetype_identifier>sky1</motetype_identifier> <motetype_identifier>sky1</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>4.709236350803614</x> <x>-2.2559922410521516</x>
<y>36.140965282433676</y> <y>50.71648775308175</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
@ -81,8 +81,8 @@
<motetype_identifier>sky1</motetype_identifier> <motetype_identifier>sky1</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>4.405437081821395</x> <x>15.917348901177405</x>
<y>74.51872257012788</y> <y>66.93526904376517</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
@ -95,8 +95,8 @@
<motetype_identifier>sky1</motetype_identifier> <motetype_identifier>sky1</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>20.032542580805657</x> <x>26.735174243053933</x>
<y>38.81348491507741</y> <y>35.939375910459084</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
@ -109,8 +109,8 @@
<motetype_identifier>sky1</motetype_identifier> <motetype_identifier>sky1</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>44.10978600980437</x> <x>41.5254792748469</x>
<y>49.73908473744734</y> <y>28.370611308140152</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
@ -122,7 +122,7 @@
<plugin> <plugin>
se.sics.cooja.plugins.SimControl se.sics.cooja.plugins.SimControl
<width>265</width> <width>265</width>
<z>1</z> <z>2</z>
<height>200</height> <height>200</height>
<location_x>0</location_x> <location_x>0</location_x>
<location_y>0</location_y> <location_y>0</location_y>
@ -135,19 +135,28 @@
<history>256</history> <history>256</history>
</plugin_config> </plugin_config>
<width>1168</width> <width>1168</width>
<z>3</z> <z>4</z>
<height>209</height> <height>240</height>
<location_x>0</location_x> <location_x>-1</location_x>
<location_y>621</location_y> <location_y>618</location_y>
<minimized>false</minimized> <minimized>false</minimized>
</plugin> </plugin>
<plugin> <plugin>
se.sics.cooja.radiomediums.UDGM$VisUDGM se.sics.cooja.radiomediums.UDGM$VisUDGM
<width>300</width> <width>300</width>
<z>2</z> <z>1</z>
<height>300</height> <height>300</height>
<location_x>864</location_x> <location_x>31</location_x>
<location_y>0</location_y> <location_y>287</location_y>
<minimized>false</minimized>
</plugin>
<plugin>
se.sics.cooja.plugins.RadioLogger
<width>424</width>
<z>3</z>
<height>595</height>
<location_x>988</location_x>
<location_y>13</location_y>
<minimized>false</minimized> <minimized>false</minimized>
</plugin> </plugin>
</simconf> </simconf>

View File

@ -1 +1 @@
Sky-collect running on 7 Sky nodes. Test waits until sensor data has been received from every node at least 5 times. Sky-collect running on 7 Sky nodes. Test waits until sensor data has been received from every node at least 5 times. If any node successfully transmits 20 packets to the sink, the test fails.

View File

@ -30,6 +30,24 @@ if (count == null) {
count++; count++;
global.put("count_" + source, count); global.put("count_" + source, count);
/* Fail if any node has transmitted more than 20 packets */
for (i = 1; i <= 7; i++) {
result = global.get("count_" + i);
if (result > 20) {
log.log("FAILED: received/node: " +
global.get("count_1") + " " +
global.get("count_2") + " " +
global.get("count_3") + " " +
global.get("count_4") + " " +
global.get("count_5") + " " +
global.get("count_6") + " " +
global.get("count_7") + "\n");
log.testFailed(); /* We are done! */
return;
}
}
/* Wait until we have received data from all nodes */ /* Wait until we have received data from all nodes */
for (i = 1; i <= 7; i++) { for (i = 1; i <= 7; i++) {
result = global.get("count_" + i); result = global.get("count_" + i);