diff --git a/tools/cooja/contiki_tests/crosslevel.csc b/tools/cooja/contiki_tests/crosslevel.csc new file mode 100644 index 000000000..438d19885 --- /dev/null +++ b/tools/cooja/contiki_tests/crosslevel.csc @@ -0,0 +1,290 @@ + + + + My simulation + 0 + 1 + 123456 + 5000 + + se.sics.cooja.radiomediums.UDGM + 100.0 + 100.0 + 0.5 + 1.0 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #1 + ../../../examples/rime/example-abc.c + make example-abc.sky TARGET=sky + + + se.sics.cooja.mspmote.ESBMoteType + esb1 + ESB Mote Type #1 + ../../../examples/rime/example-abc.c + make example-abc.esb TARGET=esb + + + se.sics.cooja.contikimote.ContikiMoteType + mtype9 + Contiki Mote #1 + ../../.. + ../../../platform/cooja + ../../../examples/rime + ../apps/mrm + ../apps/mspsim + ../../../examples/rime + ../../../examples/rime + ../../../examples/rime/example-abc.c + example_abc_process + button_sensor + pir_sensor + radio_sensor + vib_sensor + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.Battery + se.sics.cooja.contikimote.interfaces.ContikiVib + se.sics.cooja.contikimote.interfaces.ContikiMoteID + se.sics.cooja.contikimote.interfaces.ContikiRS232 + se.sics.cooja.contikimote.interfaces.ContikiBeeper + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + se.sics.cooja.contikimote.interfaces.ContikiRadio + se.sics.cooja.contikimote.interfaces.ContikiButton + se.sics.cooja.contikimote.interfaces.ContikiPIR + se.sics.cooja.contikimote.interfaces.ContikiClock + se.sics.cooja.contikimote.interfaces.ContikiLED + se.sics.cooja.contikimote.interfaces.ContikiLog + se.sics.cooja.contikimote.interfaces.ContikiCFS + cfs_interface + beep_interface + button_interface + radio_interface + ip_interface + leds_interface + moteid_interface + pir_interface + rs232_interface + vib_interface + clock_interface + simlog_interface + false + Rime + + + se.sics.cooja.contikimote.ContikiMote + mtype9 + + se.sics.cooja.interfaces.Position + -562.9265350779835 + -7.4313537667545635 + 0.0 + + + se.sics.cooja.interfaces.Battery + false + + + se.sics.cooja.contikimote.interfaces.ContikiMoteID + 1 + + + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + 10.10.4.7 + + + + se.sics.cooja.contikimote.ContikiMote + mtype9 + + se.sics.cooja.interfaces.Position + -569.1395123422226 + 60.488781312375885 + 0.0 + + + se.sics.cooja.interfaces.Battery + false + + + se.sics.cooja.contikimote.interfaces.ContikiMoteID + 2 + + + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + 10.10.19.16 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 49.28753151734429 + -6.801705242882613 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 3 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 45.29008348613149 + 58.80514675336113 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 4 + + + + se.sics.cooja.mspmote.ESBMote + esb1 + + se.sics.cooja.interfaces.Position + 574.2943627832708 + -6.801705242882613 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 5 + + + + se.sics.cooja.mspmote.ESBMote + esb1 + + se.sics.cooja.interfaces.Position + 574.2943627832708 + 59.941038287544195 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 6 + + + + se.sics.cooja.contikimote.ContikiMote + mtype9 + + se.sics.cooja.interfaces.Position + 981.0053840033577 + -7.979024087557906 + 0.0 + + + se.sics.cooja.interfaces.Battery + false + + + se.sics.cooja.contikimote.interfaces.ContikiMoteID + 7 + + + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + 10.10.3.18 + + + + se.sics.cooja.contikimote.ContikiMote + mtype9 + + se.sics.cooja.interfaces.Position + 1346.8489601454312 + -8.540235607229494 + 0.0 + + + se.sics.cooja.interfaces.Battery + false + + + se.sics.cooja.contikimote.interfaces.ContikiMoteID + 8 + + + se.sics.cooja.contikimote.interfaces.ContikiIPAddress + 10.10.18.15 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 989.572289405294 + 59.94103828754419 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 9 + + + + se.sics.cooja.mspmote.ESBMote + esb1 + + se.sics.cooja.interfaces.Position + 1349.1941112745471 + 58.873154391057355 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 10 + + + + + se.sics.cooja.plugins.SimControl + 265 + 1 + 200 + 0 + 0 + false + + + se.sics.cooja.plugins.VisState + 884 + 2 + 211 + 277 + 0 + false + + + se.sics.cooja.plugins.LogListener + + received + 256 + + 1161 + 4 + 370 + 0 + 458 + false + + + se.sics.cooja.radiomediums.UDGM$VisUDGM + 997 + 3 + 266 + 189 + 185 + false + + + diff --git a/tools/cooja/contiki_tests/crosslevel.info b/tools/cooja/contiki_tests/crosslevel.info new file mode 100644 index 000000000..3e2f374e4 --- /dev/null +++ b/tools/cooja/contiki_tests/crosslevel.info @@ -0,0 +1 @@ +Cross-level communication. Cooja+Sky+ESB running Rime example-abc. diff --git a/tools/cooja/contiki_tests/crosslevel.js b/tools/cooja/contiki_tests/crosslevel.js new file mode 100644 index 000000000..8131c3d64 --- /dev/null +++ b/tools/cooja/contiki_tests/crosslevel.js @@ -0,0 +1,34 @@ +/* Only handle receive messages */ +if (!msg.contains('received')) { + return; +} + +/* Log receiver */ +count = global.get("count_" + id); +if (count == null) { + count = 0; +} +count++; +global.put("count_" + id, count); + +log.log("Node " + id + " received message: " + count + "\n"); + +/* Did all nodes (1-10) receive a message? */ +for (i = 1; i <= 10; i++) { + result = global.get("count_" + i); + if (result == null || result == 0) { + log.log("Node " + i + " did not yet receive a message\n"); + return; + } +} + +/* Report test info */ +log.log("TEST INFO: "); +for (i = 1; i <= 10; i++) { + result = global.get("count_" + i); + log.log(java.lang.Integer.toString(result) + " "); +} +log.log("\n"); + +log.log("TEST OK\n"); /* Report test success */ +mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/