diff --git a/tools/cooja/contiki_tests/rime_abc.csc b/tools/cooja/contiki_tests/rime_abc.csc new file mode 100644 index 000000000..5592c7963 --- /dev/null +++ b/tools/cooja/contiki_tests/rime_abc.csc @@ -0,0 +1,85 @@ + + + + My simulation + 0 + 1 + 123456 + 1 + 5000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #1 + ../../../examples/rime/example-abc.c + make example-abc.firmware TARGET=sky + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 33.53152221759984 + 15.078801911773077 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 54.67966631314053 + 31.0253850381183 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + + + + se.sics.cooja.plugins.SimControl + 313 + 2 + 199 + 30 + 30 + false + + + se.sics.cooja.radiomediums.UDGM$VisUDGM + 300 + 3 + 122 + 367 + 23 + false + + + se.sics.cooja.plugins.LogListener + + + 256 + + 573 + 1 + 242 + 23 + 235 + false + + + diff --git a/tools/cooja/contiki_tests/rime_abc.info b/tools/cooja/contiki_tests/rime_abc.info new file mode 100644 index 000000000..2e103276c --- /dev/null +++ b/tools/cooja/contiki_tests/rime_abc.info @@ -0,0 +1 @@ +Rime anonymous broadcast (test-abc.c). Two Sky nodes. diff --git a/tools/cooja/contiki_tests/rime_abc.js b/tools/cooja/contiki_tests/rime_abc.js new file mode 100644 index 000000000..8e7d7405b --- /dev/null +++ b/tools/cooja/contiki_tests/rime_abc.js @@ -0,0 +1,19 @@ +/* Only handle receive messages */ +if (!msg.contains('received')) { + return; +} + +/* Remember receiver */ +global.put("recv_" + id, "ok"); +log.log(id + " received a message\n"); + +/* Did all nodes (1 and 2) receive a message? */ +for (i = 1; i <= 2; i++) { + result = global.get("recv_" + i); + if (result == null) { + return; + } +} + +log.log("TEST OK\n"); /* Report test success */ +mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/ diff --git a/tools/cooja/contiki_tests/rime_trickle.csc b/tools/cooja/contiki_tests/rime_trickle.csc new file mode 100644 index 000000000..9eef89dbb --- /dev/null +++ b/tools/cooja/contiki_tests/rime_trickle.csc @@ -0,0 +1,197 @@ + + + + My simulation + 0 + 1 + 123456 + 1 + 1000 + + se.sics.cooja.radiomediums.UDGM + 41.0 + 55.0 + 1.0 + 1.0 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #1 + ../../../examples/rime/example-trickle.c + make example-trickle.firmware TARGET=sky + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 21.25615651441164 + 15.906616513243888 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 29.258648178869528 + 64.81243553163958 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 2 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 53.58390840870132 + 99.01827951434828 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 3 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 4.089137066756255 + 57.26244252237209 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 4 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 84.2311285004563 + 14.6212837520458 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 5 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 40.97868508483131 + 69.00112748842623 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 6 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 34.348646576361716 + 33.331938472933615 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 7 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 76.46661251540715 + 62.393168145801916 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 8 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 87.91615665417679 + 41.2939192052263 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 9 + + + + se.sics.cooja.mspmote.SkyMote + sky1 + + se.sics.cooja.interfaces.Position + 25.396991214895582 + 87.22076662391413 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 10 + + + + + se.sics.cooja.radiomediums.UDGM$VisUDGM + 300 + 2 + 300 + 14 + 206 + false + + + se.sics.cooja.plugins.SimControl + 313 + 3 + 199 + 14 + 5 + false + + + se.sics.cooja.plugins.LogListener + + + 256 + + 573 + 1 + 349 + 339 + 8 + false + + + diff --git a/tools/cooja/contiki_tests/rime_trickle.info b/tools/cooja/contiki_tests/rime_trickle.info new file mode 100644 index 000000000..022f377f0 --- /dev/null +++ b/tools/cooja/contiki_tests/rime_trickle.info @@ -0,0 +1 @@ +Rime trickle (test-trickle.c). Ten Sky nodes, node one send message. diff --git a/tools/cooja/contiki_tests/rime_trickle.js b/tools/cooja/contiki_tests/rime_trickle.js new file mode 100644 index 000000000..80998ec45 --- /dev/null +++ b/tools/cooja/contiki_tests/rime_trickle.js @@ -0,0 +1,36 @@ +/* Initiate trickle from node 1 by clicking button (once) */ +result = global.get("recv_1"); +if (result == null) { + if (id != 1) { + return; + } + + if (!msg.contains('Starting')) { + return; + } + + log.log("Clicking node 1 button\n"); + mote.getInterfaces().getButton().clickButton() + global.put("recv_1", "ok"); + return; +} + +/* Only handle receive messages */ +if (!msg.contains('received')) { + return; +} + +/* Remember receiver */ +global.put("recv_" + id, "ok"); +log.log(id + " received a message\n"); + +/* Did all nodes (1-10) receive a message? */ +for (i = 1; i <= 10; i++) { + result = global.get("recv_" + i); + if (result == null) { + return; + } +} + +log.log("TEST OK\n"); /* Report test success */ +mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/