added another ipv6 udp test:

identical setup as the sky_ipv6_udp test, but with contiki motes (native ipv6)
This commit is contained in:
fros4943 2009-04-01 18:09:20 +00:00
parent e4858a2ade
commit 9b41b02de1
3 changed files with 185 additions and 0 deletions

View file

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<simconf>
<simulation>
<title>My simulation</title>
<delaytime>0</delaytime>
<ticktime>1</ticktime>
<randomseed>123456</randomseed>
<motedelay>1000</motedelay>
<radiomedium>
se.sics.cooja.radiomediums.UDGM
<transmitting_range>50.0</transmitting_range>
<interference_range>100.0</interference_range>
<success_ratio_tx>1.0</success_ratio_tx>
<success_ratio_rx>1.0</success_ratio_rx>
</radiomedium>
<motetype>
se.sics.cooja.contikimote.ContikiMoteType
<identifier>mtype17</identifier>
<description>Receiver</description>
<contikiapp>../../../examples/udp-receiver-ipv6/example-udp-receiver.c</contikiapp>
<commands>make example-udp-receiver.cooja TARGET=cooja DEFINES=WITH_UIP6=1,UIP_CONF_IPV6=1,UDP_ADDR_A=0xfe80,UDP_ADDR_B=0,UDP_ADDR_C=0,UDP_ADDR_D=0,UDP_ADDR_E=0x2,UDP_ADDR_F=0x2ff,UDP_ADDR_G=0xfe02,UDP_ADDR_H=0x0202</commands>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Battery</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiButton</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiClock</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
<symbols>false</symbols>
<commstack>uIPv6</commstack>
</motetype>
<motetype>
se.sics.cooja.contikimote.ContikiMoteType
<identifier>mtype18</identifier>
<description>Sender</description>
<contikiapp>../../../examples/udp-sender-ipv6/example-udp-sender.c</contikiapp>
<commands>make example-udp-sender.cooja TARGET=cooja DEFINES=WITH_UIP6=1,UIP_CONF_IPV6=1,UDP_ADDR_A=0xfe80,UDP_ADDR_B=0,UDP_ADDR_C=0,UDP_ADDR_D=0,UDP_ADDR_E=0x301,UDP_ADDR_F=0x1ff,UDP_ADDR_G=0xfe01,UDP_ADDR_H=0x101</commands>
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Battery</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiVib</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiButton</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiClock</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiLED</moteinterface>
<moteinterface>se.sics.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
<symbols>false</symbols>
<commstack>uIPv6</commstack>
</motetype>
<mote>
se.sics.cooja.contikimote.ContikiMote
<motetype_identifier>mtype17</motetype_identifier>
<interface_config>
se.sics.cooja.interfaces.Position
<x>98.76075470611741</x>
<y>30.469519951198897</y>
<z>0.0</z>
</interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
<interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
</interface_config>
<interface_config>
se.sics.cooja.contikimote.interfaces.ContikiIPAddress
<ip>fe80.0000.0000.0000.0301.01ff.fe01.0101</ip>
</interface_config>
</mote>
<mote>
se.sics.cooja.contikimote.ContikiMote
<motetype_identifier>mtype18</motetype_identifier>
<interface_config>
se.sics.cooja.interfaces.Position
<x>58.59043340181549</x>
<y>22.264557758786697</y>
<z>0.0</z>
</interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
<interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>2</id>
</interface_config>
<interface_config>
se.sics.cooja.contikimote.interfaces.ContikiIPAddress
<ip>fe80.0000.0000.0000.0002.02ff.fe02.0202</ip>
</interface_config>
</mote>
</simulation>
<plugin>
se.sics.cooja.plugins.SimControl
<width>248</width>
<z>5</z>
<height>200</height>
<location_x>0</location_x>
<location_y>0</location_y>
<minimized>false</minimized>
</plugin>
<plugin>
se.sics.cooja.plugins.Visualizer
<plugin_config>
<skin>Radio environment (UDGM)</skin>
</plugin_config>
<width>300</width>
<z>3</z>
<height>300</height>
<location_x>714</location_x>
<location_y>0</location_y>
<minimized>false</minimized>
</plugin>
<plugin>
se.sics.cooja.plugins.LogListener
<plugin_config>
<filter>ID:1</filter>
<history>256</history>
</plugin_config>
<width>1014</width>
<z>1</z>
<height>284</height>
<location_x>0</location_x>
<location_y>564</location_y>
<minimized>false</minimized>
</plugin>
<plugin>
se.sics.cooja.plugins.Visualizer
<plugin_config>
<skin>printf()'s + LEDs</skin>
</plugin_config>
<width>300</width>
<z>4</z>
<height>300</height>
<location_x>414</location_x>
<location_y>1</location_y>
<minimized>false</minimized>
</plugin>
<plugin>
se.sics.cooja.plugins.RadioLogger
<width>1014</width>
<z>2</z>
<height>261</height>
<location_x>0</location_x>
<location_y>301</location_y>
<minimized>false</minimized>
</plugin>
</simconf>

View file

@ -0,0 +1 @@
Two COOJA nodes: examples/udp-receiver-ipv6/example-udp-receiver.c and examples/udp-sender-ipv6/example-udp-sender.c. Test success after 5 replies

View file

@ -0,0 +1,21 @@
TIMEOUT(100000, log.log("last msg: " + msg + "\n")); /* print last msg at timeout */
WAIT_UNTIL(msg.contains("Created connection"));
YIELD_THEN_WAIT_UNTIL(msg.contains("Created connection"));
log.log("Both nodes booted\n");
count = 0;
while (count++ < 5) {
/* Message from sender process to receiver process */
YIELD_THEN_WAIT_UNTIL(msg.contains("Sender sending"));
YIELD_THEN_WAIT_UNTIL(msg.contains("Receiver received"));
log.log(count + ": Sender -> Receiver OK\n");
/* Message from receiver process to sender process */
YIELD_THEN_WAIT_UNTIL(msg.contains("Receiver sending"));
YIELD_THEN_WAIT_UNTIL(msg.contains("Sender received"));
log.log(count + ": Receiver -> Sender OK\n");
}
log.testOK(); /* Report test success and quit */