From ad8941bc5df5958abdabd2167569a81fd32bc8c5 Mon Sep 17 00:00:00 2001 From: Fredrik Osterlind Date: Mon, 4 Jun 2012 17:45:43 +0200 Subject: [PATCH] added hello world simulation tests for exp5438, z1, and wismote. extracted test script to a separate hello-world.js, and updated the remaining hello world tests accordingly. --- .../cooja/contiki_tests/cooja_helloworld.csc | 213 ++++++++---------- tools/cooja/contiki_tests/esb_helloworld.csc | 208 +++++++---------- .../contiki_tests/exp5438_helloworld.csc | 83 +++++++ tools/cooja/contiki_tests/hello-world.js | 9 + .../cooja/contiki_tests/micaz_helloworld.csc | 199 +++++++--------- tools/cooja/contiki_tests/sky_helloworld.csc | 162 ++++++------- .../contiki_tests/wismote_helloworld.csc | 84 +++++++ tools/cooja/contiki_tests/z1_helloworld.csc | 83 +++++++ 8 files changed, 603 insertions(+), 438 deletions(-) create mode 100644 tools/cooja/contiki_tests/exp5438_helloworld.csc create mode 100644 tools/cooja/contiki_tests/hello-world.js create mode 100644 tools/cooja/contiki_tests/wismote_helloworld.csc create mode 100644 tools/cooja/contiki_tests/z1_helloworld.csc diff --git a/tools/cooja/contiki_tests/cooja_helloworld.csc b/tools/cooja/contiki_tests/cooja_helloworld.csc index 8d7f6fa5a..ce8961801 100644 --- a/tools/cooja/contiki_tests/cooja_helloworld.csc +++ b/tools/cooja/contiki_tests/cooja_helloworld.csc @@ -1,113 +1,100 @@ - - - ../apps/mrm - ../apps/mspsim - ../apps/avrora - ../apps/native_gateway - - My simulation - 0 - generated - 1000000 - - se.sics.cooja.radiomediums.UDGM - 50.0 - 100.0 - 1.0 - 1.0 - - - se.sics.cooja.contikimote.ContikiMoteType - mtype82 - Contiki Mote Type #1 - ../../../examples/hello-world/hello-world.c - make hello-world.cooja TARGET=cooja - 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.ContikiCFS - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.interfaces.RimeAddress - false - Rime - - - se.sics.cooja.contikimote.ContikiMote - mtype82 - - se.sics.cooja.interfaces.Position - 69.64867743029201 - 69.2570131081022 - 0.0 - - - se.sics.cooja.interfaces.Battery - false - - - se.sics.cooja.contikimote.interfaces.ContikiMoteID - 1 - - - - - se.sics.cooja.plugins.Visualizer - - Mote IDs - Log output: printf()'s - - 259 - 1 - 198 - 2 - 203 - false - - - se.sics.cooja.plugins.LogListener - - - - 259 - 2 - 217 - 2 - 403 - false - - - se.sics.cooja.plugins.SimControl - 259 - 3 - 200 - 2 - 3 - false - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 592 - 0 - 618 - 264 - 3 - false - - - + + + + Hello World test (Cooja motes) + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.contikimote.ContikiMoteType + mtype725 + Contiki Mote Type #1 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make hello-world.cooja TARGET=cooja + 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.interfaces.RimeAddress + 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.ContikiCFS + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + false + + + + se.sics.cooja.interfaces.Position + 69.64867743029201 + 69.2570131081022 + 0.0 + + + se.sics.cooja.contikimote.interfaces.ContikiMoteID + 1 + + mtype725 + + + + se.sics.cooja.plugins.Visualizer + + se.sics.cooja.plugins.skins.IDVisualizerSkin + se.sics.cooja.plugins.skins.LogVisualizerSkin + 0.9090909090909091 0.0 0.0 0.9090909090909091 59.68302051791636 6.039078992634368 + + 259 + 1 + 198 + 2 + 203 + + + se.sics.cooja.plugins.LogListener + + + + 259 + 2 + 217 + 2 + 403 + + + se.sics.cooja.plugins.SimControl + 259 + 3 + 200 + 2 + 3 + + + se.sics.cooja.plugins.ScriptRunner + + [CONFIG_DIR]/hello-world.js + true + + 592 + 0 + 618 + 318 + 61 + + + diff --git a/tools/cooja/contiki_tests/esb_helloworld.csc b/tools/cooja/contiki_tests/esb_helloworld.csc index 8fa3806fe..0124455fc 100644 --- a/tools/cooja/contiki_tests/esb_helloworld.csc +++ b/tools/cooja/contiki_tests/esb_helloworld.csc @@ -1,125 +1,83 @@ - - - [CONTIKI_DIR]/tools/cooja/apps/mrm - [CONTIKI_DIR]/tools/cooja/apps/mspsim - [CONTIKI_DIR]/tools/cooja/apps/avrora - - My simulation - 0 - generated - 1000000 - - se.sics.cooja.radiomediums.UDGM - 50.0 - 100.0 - 1.0 - 1.0 - - - 40000 - - - se.sics.cooja.mspmote.ESBMoteType - esb1 - ESB Mote Type #esb1 - [CONTIKI_DIR]/examples/hello-world/hello-world.c - make clean TARGET=esb -make hello-world.esb TARGET=esb - [CONTIKI_DIR]/examples/hello-world/hello-world.esb - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.RimeAddress - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.mspmote.interfaces.MspSerial - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.ESBLED - se.sics.cooja.mspmote.interfaces.ESBButton - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.TR1001Radio - se.sics.cooja.interfaces.Mote2MoteRelations - - - se.sics.cooja.mspmote.ESBMote - - - se.sics.cooja.interfaces.Position - 57.296459690977144 - 73.20759478605089 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 1 - - esb1 - - - - se.sics.cooja.plugins.SimControl - 259 - 6 - 184 - 60 - 60 - false - - - se.sics.cooja.plugins.Visualizer - - se.sics.cooja.plugins.skins.IDVisualizerSkin - se.sics.cooja.plugins.skins.LogVisualizerSkin - 0.9090909090909091 0.0 0.0 0.9090909090909091 91.91230937183896 53.4476411035901 - - 300 - 3 - 300 - 945 - 0 - false - - - se.sics.cooja.plugins.LogListener - - - - 1245 - 5 - 150 - 0 - 530 - false - - - se.sics.cooja.plugins.TimeLine - - 0 - - - - 109 - 9 - - 1245 - 1 - 150 - 0 - 680 - false - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 600 - 0 - 453 - 337 - 25 - false - - - + + + + Hello World (ESB) + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.ESBMoteType + esb1 + ESB Mote Type #esb1 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make hello-world.esb TARGET=esb + [CONTIKI_DIR]/examples/hello-world/hello-world.esb + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.ESBLED + se.sics.cooja.mspmote.interfaces.ESBButton + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.TR1001Radio + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + + + + + se.sics.cooja.interfaces.Position + 57.296459690977144 + 73.20759478605089 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + esb1 + + + + se.sics.cooja.plugins.LogListener + + + + 623 + 1 + 270 + 29 + 256 + + + se.sics.cooja.plugins.ScriptRunner + + [CONFIG_DIR]/hello-world.js + true + + 600 + 0 + 453 + 337 + 25 + + + se.sics.cooja.plugins.SimControl + 280 + 2 + 160 + 20 + 23 + + + diff --git a/tools/cooja/contiki_tests/exp5438_helloworld.csc b/tools/cooja/contiki_tests/exp5438_helloworld.csc new file mode 100644 index 000000000..e2672c7a5 --- /dev/null +++ b/tools/cooja/contiki_tests/exp5438_helloworld.csc @@ -0,0 +1,83 @@ + + + + Hello World (Exp5438) + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.Exp5438MoteType + exp5438#1 + Exp5438 Mote Type exp5438#1 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make hello-world.exp5438 TARGET=exp5438 + [CONTIKI_DIR]/examples/hello-world/hello-world.exp5438 + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.Msp802154Radio + se.sics.cooja.mspmote.interfaces.UsciA1Serial + se.sics.cooja.mspmote.interfaces.Exp5438LED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + + + + + se.sics.cooja.interfaces.Position + 26.321738050614275 + 34.93092009073432 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + exp5438#1 + + + + se.sics.cooja.plugins.SimControl + 280 + 2 + 160 + 38 + 49 + + + se.sics.cooja.plugins.LogListener + + + + 680 + 1 + 240 + 86 + 384 + + + se.sics.cooja.plugins.ScriptRunner + + [CONFIG_DIR]/hello-world.js + true + + 600 + 0 + 700 + 347 + 21 + + + diff --git a/tools/cooja/contiki_tests/hello-world.js b/tools/cooja/contiki_tests/hello-world.js new file mode 100644 index 000000000..5afaabe18 --- /dev/null +++ b/tools/cooja/contiki_tests/hello-world.js @@ -0,0 +1,9 @@ +TIMEOUT(5000); + +while(true) { + log.log("> " + msg + "\n"); + if (msg.equals('Hello, world')) { + log.testOK(); + } + YIELD(); +} diff --git a/tools/cooja/contiki_tests/micaz_helloworld.csc b/tools/cooja/contiki_tests/micaz_helloworld.csc index 4906774f9..c8c9a04d8 100644 --- a/tools/cooja/contiki_tests/micaz_helloworld.csc +++ b/tools/cooja/contiki_tests/micaz_helloworld.csc @@ -1,120 +1,79 @@ - - - ../apps/mrm - ../apps/mspsim - ../apps/avrora - - My simulation - 0 - generated - 1000000 - - se.sics.cooja.radiomediums.UDGM - 50.0 - 100.0 - 1.0 - 1.0 - - - 40000 - - - se.sics.cooja.avrmote.MicaZMoteType - micaz1 - MicaZ Mote Type #micaz1 - ../../../examples/hello-world/hello-world.c - make clean TARGET=micaz -make hello-world.elf TARGET=micaz - ../../../examples/hello-world/hello-world.elf - se.sics.cooja.interfaces.Position - se.sics.cooja.avrmote.interfaces.MicaZID - se.sics.cooja.avrmote.interfaces.MicaZLED - se.sics.cooja.avrmote.interfaces.MicaZRadio - se.sics.cooja.avrmote.interfaces.MicaClock - se.sics.cooja.avrmote.interfaces.MicaSerial - - - se.sics.cooja.avrmote.MicaZMote - micaz1 - - se.sics.cooja.interfaces.Position - 68.44103812985554 - 35.6791174319418 - 0.0 - - - se.sics.cooja.avrmote.interfaces.MicaZID - 1 - - - - - se.sics.cooja.plugins.SimControl - 259 - 4 - 184 - 0 - 0 - false - - - se.sics.cooja.plugins.Visualizer - - se.sics.cooja.plugins.skins.IDVisualizerSkin - se.sics.cooja.plugins.skins.LogVisualizerSkin - 0.9090909090909091 0.0 0.0 0.9090909090909091 81.78087442740406 87.56443869823474 - - 300 - 1 - 300 - 456 - 0 - false - - - se.sics.cooja.plugins.LogListener - - - - 756 - 2 - 150 - 0 - 286 - false - - - se.sics.cooja.plugins.TimeLine - - 0 - - - - 109 - 9 - - 756 - 3 - 150 - 0 - 436 - false - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 600 - 0 - 305 - 89 - 211 - false - - - + + + + Hello World (MicaZ) + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.avrmote.MicaZMoteType + micaz1 + MicaZ Mote Type #micaz1 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make hello-world.elf TARGET=micaz + [CONTIKI_DIR]/examples/hello-world/hello-world.elf + se.sics.cooja.interfaces.Position + se.sics.cooja.avrmote.interfaces.MicaZID + se.sics.cooja.avrmote.interfaces.MicaZLED + se.sics.cooja.avrmote.interfaces.MicaZRadio + se.sics.cooja.avrmote.interfaces.MicaClock + se.sics.cooja.avrmote.interfaces.MicaSerial + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + + + + se.sics.cooja.interfaces.Position + 36.478849033811386 + 97.17795415366507 + 0.0 + + + se.sics.cooja.avrmote.interfaces.MicaZID + 1 + + micaz1 + + + + se.sics.cooja.plugins.SimControl + 280 + 2 + 160 + 17 + 16 + + + se.sics.cooja.plugins.LogListener + + + + 680 + 1 + 240 + 20 + 285 + + + se.sics.cooja.plugins.ScriptRunner + + [CONFIG_DIR]/hello-world.js + true + + 600 + 0 + 535 + 403 + 23 + + + diff --git a/tools/cooja/contiki_tests/sky_helloworld.csc b/tools/cooja/contiki_tests/sky_helloworld.csc index e97b4f6d7..fb216a3ee 100644 --- a/tools/cooja/contiki_tests/sky_helloworld.csc +++ b/tools/cooja/contiki_tests/sky_helloworld.csc @@ -1,80 +1,82 @@ - - - ../apps/mrm - ../apps/mspsim - ../apps/avrora - ../apps/native_gateway - - Hello World (Sky) - 0 - generated - 1000000 - - se.sics.cooja.radiomediums.UDGM - 50.0 - 100.0 - 1.0 - 1.0 - - - se.sics.cooja.mspmote.SkyMoteType - sky1 - Sky Mote Type #1 - ../../../examples/hello-world/hello-world.c - make clean TARGET=sky -make hello-world.sky TARGET=sky - ../../../examples/hello-world/hello-world.sky - se.sics.cooja.interfaces.Position - se.sics.cooja.interfaces.IPAddress - se.sics.cooja.interfaces.Mote2MoteRelations - se.sics.cooja.mspmote.interfaces.MspClock - se.sics.cooja.mspmote.interfaces.MspMoteID - se.sics.cooja.mspmote.interfaces.SkyButton - se.sics.cooja.mspmote.interfaces.SkyFlash - se.sics.cooja.mspmote.interfaces.SkyByteRadio - se.sics.cooja.mspmote.interfaces.SkySerial - se.sics.cooja.mspmote.interfaces.SkyLED - - - se.sics.cooja.mspmote.SkyMote - sky1 - - - se.sics.cooja.interfaces.Position - 64.11203103628397 - 93.06735634828134 - 0.0 - - - se.sics.cooja.mspmote.interfaces.MspMoteID - 1 - - - - - se.sics.cooja.plugins.SimControl - 248 - 1 - 200 - 0 - 0 - false - - - se.sics.cooja.plugins.ScriptRunner - - - true - - 541 - 0 - 448 - 248 - -1 - false - - - + + + + Hello World test (Sky) + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.SkyMoteType + sky1 + Sky Mote Type #1 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make hello-world.sky TARGET=sky + [CONTIKI_DIR]/examples/hello-world/hello-world.sky + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.SkyButton + se.sics.cooja.mspmote.interfaces.SkyFlash + se.sics.cooja.mspmote.interfaces.Msp802154Radio + se.sics.cooja.mspmote.interfaces.MspSerial + se.sics.cooja.mspmote.interfaces.SkyLED + + + + + se.sics.cooja.interfaces.Position + 64.11203103628397 + 93.06735634828134 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + sky1 + + + + se.sics.cooja.plugins.ScriptRunner + + [CONFIG_DIR]/hello-world.js + true + + 541 + 0 + 448 + 299 + 7 + + + se.sics.cooja.plugins.SimControl + 280 + 2 + 160 + 7 + 10 + + + se.sics.cooja.plugins.LogListener + + + + 680 + 1 + 240 + 51 + 288 + + + diff --git a/tools/cooja/contiki_tests/wismote_helloworld.csc b/tools/cooja/contiki_tests/wismote_helloworld.csc new file mode 100644 index 000000000..52a16396e --- /dev/null +++ b/tools/cooja/contiki_tests/wismote_helloworld.csc @@ -0,0 +1,84 @@ + + + + Hello World (Wismote) + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.WismoteMoteType + wismote1 + Wismote Mote Type #wismote1 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make hello-world.wismote TARGET=wismote + [CONTIKI_DIR]/examples/hello-world/hello-world.wismote + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.MspButton + se.sics.cooja.mspmote.interfaces.Msp802154Radio + se.sics.cooja.mspmote.interfaces.MspDefaultSerial + se.sics.cooja.mspmote.interfaces.MspLED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + + + + + se.sics.cooja.interfaces.Position + 36.76551518369201 + 29.330591009779383 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + wismote1 + + + + se.sics.cooja.plugins.SimControl + 280 + 2 + 160 + 22 + 14 + + + se.sics.cooja.plugins.LogListener + + + + 680 + 1 + 240 + 84 + 408 + + + se.sics.cooja.plugins.ScriptRunner + + [CONFIG_DIR]/hello-world.js + true + + 600 + 0 + 548 + 335 + 22 + + + diff --git a/tools/cooja/contiki_tests/z1_helloworld.csc b/tools/cooja/contiki_tests/z1_helloworld.csc new file mode 100644 index 000000000..3af73dc00 --- /dev/null +++ b/tools/cooja/contiki_tests/z1_helloworld.csc @@ -0,0 +1,83 @@ + + + + Hello World (Z1) + generated + 1000000 + + se.sics.cooja.radiomediums.UDGM + 50.0 + 100.0 + 1.0 + 1.0 + + + 40000 + + + se.sics.cooja.mspmote.Z1MoteType + z11 + Z1 Mote Type #z11 + [CONTIKI_DIR]/examples/hello-world/hello-world.c + make hello-world.z1 TARGET=z1 + [CONTIKI_DIR]/examples/hello-world/hello-world.z1 + se.sics.cooja.interfaces.Position + se.sics.cooja.interfaces.RimeAddress + se.sics.cooja.interfaces.IPAddress + se.sics.cooja.interfaces.Mote2MoteRelations + se.sics.cooja.interfaces.MoteAttributes + se.sics.cooja.mspmote.interfaces.MspClock + se.sics.cooja.mspmote.interfaces.MspMoteID + se.sics.cooja.mspmote.interfaces.Msp802154Radio + se.sics.cooja.mspmote.interfaces.MspDefaultSerial + se.sics.cooja.mspmote.interfaces.MspLED + se.sics.cooja.mspmote.interfaces.MspDebugOutput + + + + + se.sics.cooja.interfaces.Position + 94.96401380574989 + 21.247662337471553 + 0.0 + + + se.sics.cooja.mspmote.interfaces.MspMoteID + 1 + + z11 + + + + se.sics.cooja.plugins.SimControl + 280 + 2 + 160 + 38 + 13 + + + se.sics.cooja.plugins.LogListener + + + + 680 + 1 + 240 + 109 + 377 + + + se.sics.cooja.plugins.ScriptRunner + + [CONFIG_DIR]/hello-world.js + true + + 600 + 0 + 700 + 330 + 24 + + +