added wget contiki test
This commit is contained in:
parent
008d4ba33f
commit
57584c7af6
138
tools/cooja/contiki_tests/ip_sky_webserver_wget.csc
Normal file
138
tools/cooja/contiki_tests/ip_sky_webserver_wget.csc
Normal file
@ -0,0 +1,138 @@
|
||||
<?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.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #1</description>
|
||||
<source>../../../examples/sky-shell-webserver/sky-shell-webserver.c</source>
|
||||
<command>make sky-shell-webserver.sky TARGET=sky</command>
|
||||
</motetype>
|
||||
<mote>
|
||||
se.sics.cooja.mspmote.SkyMote
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>67.00582793711605</x>
|
||||
<y>61.11208446062922</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
</mote>
|
||||
<mote>
|
||||
se.sics.cooja.mspmote.SkyMote
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>38.40617555763694</x>
|
||||
<y>38.97825356716085</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
</mote>
|
||||
<mote>
|
||||
se.sics.cooja.mspmote.SkyMote
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>17.479600645822952</x>
|
||||
<y>16.52364251581611</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
</mote>
|
||||
<mote>
|
||||
se.sics.cooja.mspmote.SkyMote
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>99.0932428018975</x>
|
||||
<y>84.52903598560302</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>4</id>
|
||||
</interface_config>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>248</width>
|
||||
<z>1</z>
|
||||
<height>200</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<history>256</history>
|
||||
</plugin_config>
|
||||
<width>998</width>
|
||||
<z>4</z>
|
||||
<height>166</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>704</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.radiomediums.UDGM$VisUDGM
|
||||
<width>300</width>
|
||||
<z>3</z>
|
||||
<height>169</height>
|
||||
<location_x>693</location_x>
|
||||
<location_y>6</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>2</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
</plugin_config>
|
||||
<width>758</width>
|
||||
<z>5</z>
|
||||
<height>245</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>202</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>3</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
</plugin_config>
|
||||
<width>683</width>
|
||||
<z>2</z>
|
||||
<height>244</height>
|
||||
<location_x>312</location_x>
|
||||
<location_y>452</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
1
tools/cooja/contiki_tests/ip_sky_webserver_wget.info
Normal file
1
tools/cooja/contiki_tests/ip_sky_webserver_wget.info
Normal file
@ -0,0 +1 @@
|
||||
Four Sky nodes running both the shell and a CFS webserver. Test uses shell commands write and wget to generate and transfer files.
|
32
tools/cooja/contiki_tests/ip_sky_webserver_wget.js
Normal file
32
tools/cooja/contiki_tests/ip_sky_webserver_wget.js
Normal file
@ -0,0 +1,32 @@
|
||||
TIMEOUT(30000, log.log("last message: " + msg + "\n"));
|
||||
|
||||
mote1 = null;
|
||||
mote4 = null;
|
||||
|
||||
/* Wait until both node 1 and 4 have booted */
|
||||
while (true) {
|
||||
if (msg.contains('Starting')) {
|
||||
if (id == 1) mote1 = mote;
|
||||
if (id == 4) mote4 = mote;
|
||||
}
|
||||
if (mote1 != null && mote4 != null) break;
|
||||
YIELD();
|
||||
}
|
||||
log.log("Mote 1 and mote 4 booted\n");
|
||||
|
||||
/* Wait one second */
|
||||
GENERATE_MSG(1000, "continue");
|
||||
WAIT_UNTIL(msg.equals("continue"));
|
||||
|
||||
/* Create file on node 1 */
|
||||
log.log("Creating data on node 1\n");
|
||||
write(mote1, "echo data generated at node 1 | write node1file.txt\n");
|
||||
|
||||
/* Fetch file to node 2 */
|
||||
log.log("Fetching data to node 4\n");
|
||||
write(mote4, "wget 172.16.1.0/node1file.txt | write node2file.txt\n");
|
||||
|
||||
WAIT_UNTIL(id == 4 && msg.contains("data generated at node 1"));
|
||||
log.log("Node 4 received data!\n");
|
||||
|
||||
log.testOK();
|
Loading…
Reference in New Issue
Block a user