updated test: testing ESB<->Sky comm + improved test output

This commit is contained in:
fros4943 2010-01-22 13:56:42 +00:00
parent de93c85292
commit 8f296ac2fb

View file

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<simconf> <simconf>
<project>../apps/mrm</project> <project>[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
<project>../apps/mspsim</project> <project>[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
<project>../apps/avrora</project> <project>[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
<project>../apps/native_gateway</project>
<simulation> <simulation>
<title>My simulation</title> <title>My simulation</title>
<delaytime>0</delaytime> <delaytime>0</delaytime>
@ -16,13 +15,16 @@
<success_ratio_tx>0.5</success_ratio_tx> <success_ratio_tx>0.5</success_ratio_tx>
<success_ratio_rx>1.0</success_ratio_rx> <success_ratio_rx>1.0</success_ratio_rx>
</radiomedium> </radiomedium>
<events>
<logoutput>40000</logoutput>
</events>
<motetype> <motetype>
se.sics.cooja.mspmote.SkyMoteType se.sics.cooja.mspmote.SkyMoteType
<identifier>sky1</identifier> <identifier>sky1</identifier>
<description>Sky Mote Type #1</description> <description>Sky Mote Type #1</description>
<source>../../../examples/rime/example-abc.c</source> <source>[CONTIKI_DIR]/examples/rime/example-abc.c</source>
<commands>make example-abc.sky TARGET=sky</commands> <commands>make example-abc.sky TARGET=sky</commands>
<firmware>../../../examples/rime/example-abc.sky</firmware> <firmware>[CONTIKI_DIR]/examples/rime/example-abc.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>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
@ -31,31 +33,35 @@
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkySerial</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
</motetype> </motetype>
<motetype> <motetype>
se.sics.cooja.mspmote.ESBMoteType se.sics.cooja.mspmote.ESBMoteType
<identifier>esb1</identifier> <identifier>esb1</identifier>
<description>ESB Mote Type #1</description> <description>ESB Mote Type #1</description>
<source>../../../examples/rime/example-abc.c</source> <source>[CONTIKI_DIR]/examples/rime/example-abc.c</source>
<commands>make example-abc.esb TARGET=esb</commands> <commands>make example-abc.esb TARGET=esb</commands>
<firmware>../../../examples/rime/example-abc.esb</firmware> <firmware>[CONTIKI_DIR]/examples/rime/example-abc.esb</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>
<moteinterface>se.sics.cooja.mspmote.interfaces.ESBLog</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.ESBLED</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.ESBLED</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.ESBButton</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.ESBButton</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
<moteinterface>se.sics.cooja.mspmote.interfaces.TR1001Radio</moteinterface> <moteinterface>se.sics.cooja.mspmote.interfaces.TR1001Radio</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
</motetype> </motetype>
<motetype> <motetype>
se.sics.cooja.contikimote.ContikiMoteType se.sics.cooja.contikimote.ContikiMoteType
<identifier>mtype914</identifier> <identifier>mtype48</identifier>
<description>Contiki Mote Type #1</description> <description>Contiki Mote Type #1</description>
<contikiapp>../../../examples/rime/example-abc.c</contikiapp> <contikiapp>[CONTIKI_DIR]/examples/rime/example-abc.c</contikiapp>
<commands>make example-abc.cooja TARGET=cooja</commands> <commands>make example-abc.cooja TARGET=cooja</commands>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface> <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Battery</moteinterface> <moteinterface>se.sics.cooja.interfaces.Battery</moteinterface>
@ -71,212 +77,230 @@
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface> <moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface> <moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface> <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
<symbols>false</symbols> <symbols>false</symbols>
<commstack>Rime</commstack> <commstack>Rime</commstack>
</motetype> </motetype>
<mote> <mote>
se.sics.cooja.contikimote.ContikiMote se.sics.cooja.contikimote.ContikiMote
<motetype_identifier>mtype914</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>0.0</x> <x>-2.7427179779871587</x>
<y>0.0</y> <y>-17.498426286221605</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
<interface_config> <interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id> <id>1</id>
</interface_config> </interface_config>
<motetype_identifier>mtype48</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.contikimote.ContikiMote se.sics.cooja.contikimote.ContikiMote
<motetype_identifier>mtype914</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>0.0</x> <x>-1.3167654732910574</x>
<y>1.0</y> <y>21.002291340573123</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
<interface_config> <interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>2</id> <id>2</id>
</interface_config> </interface_config>
<motetype_identifier>mtype48</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.mspmote.SkyMote se.sics.cooja.mspmote.SkyMote
<motetype_identifier>sky1</motetype_identifier>
<breakpoints /> <breakpoints />
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>100.0</x> <x>99.92586236013211</x>
<y>0.0</y> <y>-18.924378790917704</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID se.sics.cooja.mspmote.interfaces.MspMoteID
<id>3</id> <id>3</id>
</interface_config> </interface_config>
<motetype_identifier>sky1</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.mspmote.SkyMote se.sics.cooja.mspmote.SkyMote
<motetype_identifier>sky1</motetype_identifier>
<breakpoints /> <breakpoints />
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>100.0</x> <x>102.77776736952431</x>
<y>1.0</y> <y>18.150386331180922</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID se.sics.cooja.mspmote.interfaces.MspMoteID
<id>4</id> <id>4</id>
</interface_config> </interface_config>
<motetype_identifier>sky1</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.mspmote.ESBMote se.sics.cooja.mspmote.ESBMote
<motetype_identifier>esb1</motetype_identifier>
<breakpoints /> <breakpoints />
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>200.0</x> <x>198.31658518416305</x>
<y>0.0</y> <y>-18.924378790917704</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID se.sics.cooja.mspmote.interfaces.MspMoteID
<id>5</id> <id>5</id>
</interface_config> </interface_config>
<motetype_identifier>esb1</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.mspmote.ESBMote se.sics.cooja.mspmote.ESBMote
<motetype_identifier>esb1</motetype_identifier>
<breakpoints /> <breakpoints />
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>200.0</x> <x>196.890632679467</x>
<y>1.0</y> <y>19.57633883587702</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID se.sics.cooja.mspmote.interfaces.MspMoteID
<id>6</id> <id>6</id>
</interface_config> </interface_config>
<motetype_identifier>esb1</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.contikimote.ContikiMote se.sics.cooja.contikimote.ContikiMote
<motetype_identifier>mtype914</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>300.0</x> <x>295.28135550349793</x>
<y>0.0</y> <y>-18.924378790917704</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
<interface_config> <interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>7</id> <id>7</id>
</interface_config> </interface_config>
<motetype_identifier>mtype48</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.mspmote.SkyMote se.sics.cooja.mspmote.SkyMote
<motetype_identifier>sky1</motetype_identifier>
<breakpoints /> <breakpoints />
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>300.0</x> <x>293.8554029988019</x>
<y>1.0</y> <y>16.72443382648482</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID se.sics.cooja.mspmote.interfaces.MspMoteID
<id>8</id> <id>8</id>
</interface_config> </interface_config>
<motetype_identifier>sky1</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.contikimote.ContikiMote se.sics.cooja.contikimote.ContikiMote
<motetype_identifier>mtype914</motetype_identifier>
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>400.0</x> <x>399.0339262783647</x>
<y>0.0</y> <y>-17.46710863775396</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
<interface_config> <interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>9</id> <id>9</id>
</interface_config> </interface_config>
<motetype_identifier>mtype48</motetype_identifier>
</mote> </mote>
<mote> <mote>
se.sics.cooja.mspmote.ESBMote se.sics.cooja.mspmote.ESBMote
<motetype_identifier>esb1</motetype_identifier>
<breakpoints /> <breakpoints />
<interface_config> <interface_config>
se.sics.cooja.interfaces.Position se.sics.cooja.interfaces.Position
<x>400.0</x> <x>401.18433133198937</x>
<y>1.0</y> <y>15.878266080338506</y>
<z>0.0</z> <z>0.0</z>
</interface_config> </interface_config>
<interface_config> <interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID se.sics.cooja.mspmote.interfaces.MspMoteID
<id>10</id> <id>10</id>
</interface_config> </interface_config>
<motetype_identifier>esb1</motetype_identifier>
</mote>
<mote>
se.sics.cooja.mspmote.SkyMote
<breakpoints />
<interface_config>
se.sics.cooja.interfaces.Position
<x>479.0051389972142</x>
<y>-15.553186635152876</y>
<z>0.0</z>
</interface_config>
<interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID
<id>11</id>
</interface_config>
<motetype_identifier>sky1</motetype_identifier>
</mote>
<mote>
se.sics.cooja.mspmote.ESBMote
<breakpoints />
<interface_config>
se.sics.cooja.interfaces.Position
<x>478.3433974354351</x>
<y>18.789928952166647</y>
<z>0.0</z>
</interface_config>
<interface_config>
se.sics.cooja.mspmote.interfaces.MspMoteID
<id>12</id>
</interface_config>
<motetype_identifier>esb1</motetype_identifier>
</mote> </mote>
</simulation> </simulation>
<plugin> <plugin>
se.sics.cooja.plugins.SimControl se.sics.cooja.plugins.SimControl
<width>265</width> <width>265</width>
<z>4</z> <z>5</z>
<height>200</height> <height>200</height>
<location_x>0</location_x> <location_x>0</location_x>
<location_y>0</location_y> <location_y>1</location_y>
<minimized>false</minimized> <minimized>false</minimized>
</plugin> </plugin>
<plugin> <plugin>
se.sics.cooja.plugins.LogListener se.sics.cooja.plugins.LogListener
<plugin_config> <plugin_config>
<filter>rec</filter> <filter />
</plugin_config> </plugin_config>
<width>265</width> <width>460</width>
<z>3</z> <z>4</z>
<height>169</height> <height>178</height>
<location_x>0</location_x> <location_x>400</location_x>
<location_y>402</location_y> <location_y>568</location_y>
<minimized>false</minimized> <minimized>false</minimized>
</plugin> </plugin>
<plugin> <plugin>
se.sics.cooja.plugins.Visualizer se.sics.cooja.plugins.Visualizer
<plugin_config> <plugin_config>
<skin>Mote IDs</skin> <skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
<skin>Radio environment (UDGM)</skin> <skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
<skin>Addresses: IP or Rime</skin> <skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
<skin>se.sics.cooja.plugins.skins.TrafficVisualizerSkin</skin>
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
<viewport>0.6868927097814259 0.0 0.0 0.6868927097814259 19.429407529520386 57.09333478544578</viewport>
</plugin_config> </plugin_config>
<width>267</width> <width>401</width>
<z>2</z> <z>1</z>
<height>177</height> <height>177</height>
<location_x>-1</location_x> <location_x>0</location_x>
<location_y>570</location_y> <location_y>569</location_y>
<minimized>false</minimized> <minimized>false</minimized>
</plugin> </plugin>
<plugin> <plugin>
se.sics.cooja.plugins.RadioLogger se.sics.cooja.plugins.RadioLogger
<width>265</width> <width>265</width>
<z>0</z> <z>2</z>
<height>203</height> <height>371</height>
<location_x>0</location_x> <location_x>0</location_x>
<location_y>199</location_y> <location_y>199</location_y>
<minimized>false</minimized> <minimized>false</minimized>
@ -287,30 +311,35 @@
<script>TIMEOUT(120000); <script>TIMEOUT(120000);
var nr_packets = new Array(); var nr_packets = new Array();
for (i=1; i &lt;= 10; i++) { for (i=1; i &lt;= 12; i++) {
nr_packets[i] = 0; nr_packets[i] = 0;
} }
while (true) { while (true) {
/* Listen for receive notifications */ /* Listen for receive notifications */
if (msg.contains('abc message received')) { if (msg.contains("abc message received 'Hello'")) {
/* Log receiving node */ /* Log receiving node */
nr_packets[id] ++; nr_packets[id] ++;
log.log("Node " + id + " received message: " + nr_packets[id] + "\n"); log.log("Node " + id + " received message: " + nr_packets[id] + "\n");
log.log("TEST STATUS: "); log.log("TEST STATUS: ");
for (i = 1; i &lt;= 10; i++) { log.log(" C-C " + nr_packets[1] + "-" + nr_packets[2]);
log.log(nr_packets[i] + " "); log.log(" S-S " + nr_packets[3] + "-" + nr_packets[4]);
} log.log(" E-E " + nr_packets[5] + "-" + nr_packets[6]);
log.log(" C-S " + nr_packets[7] + "-" + nr_packets[8]);
log.log(" C-E " + nr_packets[9] + "-" + nr_packets[10]);
log.log(" S-E " + nr_packets[11] + "-" + nr_packets[12]);
log.log("\n"); log.log("\n");
} }
/* Did all nodes (1-10) receive at least one message? */ /* Did all nodes (1-10) receive at least one message? */
for (i = 1; i &lt;= 10; i++) { for (i = 1; i &lt;= 12; i++) {
if (nr_packets[i] &lt; 1) break; if (nr_packets[i] &lt; 1) break;
if (i == 10) log.testOK(); }
if (i == 12) {
log.testOK();
} }
YIELD(); YIELD();
@ -318,10 +347,37 @@ while (true) {
<active>true</active> <active>true</active>
</plugin_config> </plugin_config>
<width>596</width> <width>596</width>
<z>1</z> <z>3</z>
<height>744</height> <height>569</height>
<location_x>267</location_x> <location_x>264</location_x>
<location_y>3</location_y> <location_y>0</location_y>
<minimized>false</minimized>
</plugin>
<plugin>
se.sics.cooja.plugins.TimeLine
<plugin_config>
<mote>0</mote>
<mote>1</mote>
<mote>2</mote>
<mote>3</mote>
<mote>4</mote>
<mote>5</mote>
<mote>6</mote>
<mote>7</mote>
<mote>8</mote>
<mote>9</mote>
<mote>10</mote>
<mote>11</mote>
<showRadioRXTX />
<showRadioHW />
<split>109</split>
<zoom>12</zoom>
</plugin_config>
<width>862</width>
<z>0</z>
<height>219</height>
<location_x>-1</location_x>
<location_y>746</location_y>
<minimized>false</minimized> <minimized>false</minimized>
</plugin> </plugin>
</simconf> </simconf>