Split the collect test into collect and collect-lossy to make each individual
travis build complete faster. Also changed the armgcc download link to a github location.
This commit is contained in:
parent
f5a1ffa90d
commit
49bf7626f1
26 changed files with 3 additions and 1 deletions
1
regression-tests/10-ipv4/Makefile
Normal file
1
regression-tests/10-ipv4/Makefile
Normal file
|
@ -0,0 +1 @@
|
|||
include ../Makefile.simulation-test
|
281
regression-tests/10-ipv4/x01-ip-cooja-telnet-ping.csc
Normal file
281
regression-tests/10-ipv4/x01-ip-cooja-telnet-ping.csc
Normal file
|
@ -0,0 +1,281 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>-2147483648</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<radiomedium>
|
||||
se.sics.cooja.radiomediums.UDGM
|
||||
<transmitting_range>25.0</transmitting_range>
|
||||
<interference_range>0.0</interference_range>
|
||||
<success_ratio_tx>1.0</success_ratio_tx>
|
||||
<success_ratio_rx>1.0</success_ratio_rx>
|
||||
</radiomedium>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.contikimote.ContikiMoteType
|
||||
<identifier>mtype696</identifier>
|
||||
<description>Telnet server example</description>
|
||||
<source>[CONTIKI_DIR]/examples/telnet-server/telnet-server.c</source>
|
||||
<commands>make telnet-server.cooja TARGET=cooja</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.interfaces.RimeAddress</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>
|
||||
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<symbols>false</symbols>
|
||||
</motetype>
|
||||
<mote>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype696</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>20.0</x>
|
||||
<y>0.0</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype696</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>40.0</x>
|
||||
<y>0.0</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype696</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>60.0</x>
|
||||
<y>0.0</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>4</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype696</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>80.0</x>
|
||||
<y>0.0</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||
<id>5</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>mtype696</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>273</width>
|
||||
<z>5</z>
|
||||
<height>201</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.TrafficVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||
<viewport>3.9267917714869 0.0 0.0 3.9267917714869 52.173676425591204 89.17520347194386</viewport>
|
||||
<hidden />
|
||||
</plugin_config>
|
||||
<width>443</width>
|
||||
<z>2</z>
|
||||
<height>203</height>
|
||||
<location_x>271</location_x>
|
||||
<location_y>0</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(900000);
|
||||
|
||||
/* conf */
|
||||
NR_MOTES = 5;
|
||||
NR_PINGS = 20;
|
||||
NR_PINGS_MIN = 10;
|
||||
osName = java.lang.System.getProperty("os.name").toLowerCase();
|
||||
if (osName.startsWith("win")) {
|
||||
pingCmd = "ping -w 10000 -n " + NR_PINGS + " "; /* + ip */
|
||||
} else {
|
||||
pingCmd = "ping -i 4 -c " + NR_PINGS + " "; /* + ip */
|
||||
}
|
||||
var nrReplies = new Array();
|
||||
replyMsg = "from "; /* + ip */
|
||||
|
||||
/* wait for all motes to boot */
|
||||
currentMote = 1;
|
||||
while (currentMote <= NR_MOTES) {
|
||||
YIELD_THEN_WAIT_UNTIL(msg.contains('Telnet server'));
|
||||
log.log("Mote " + id + " booted\n");
|
||||
|
||||
currentMote++;
|
||||
}
|
||||
|
||||
GENERATE_MSG(1000, "continue");
|
||||
WAIT_UNTIL(msg.equals("continue"));
|
||||
|
||||
/* override simulation speed limit to realtime */
|
||||
mote.getSimulation().setSpeedLimit(1.0);
|
||||
|
||||
/* ping motes */
|
||||
currentMote = 1;
|
||||
while (currentMote <= NR_MOTES) {
|
||||
nrReplies[currentMote] = 0;
|
||||
ip = mote.getSimulation().getMoteWithID(currentMote).getInterfaces().getIPAddress().getIPString();
|
||||
log.log("Pinging mote " + currentMote + "\n");
|
||||
motePingCmd = pingCmd + ip;
|
||||
log.log("> " + motePingCmd + "\n");
|
||||
|
||||
/* ping process */
|
||||
var pingRunnable = new Object();
|
||||
pingRunnable.run = function() {
|
||||
pingProcess = new java.lang.Runtime.getRuntime().exec(motePingCmd);
|
||||
stdIn = new java.io.BufferedReader(new java.io.InputStreamReader(pingProcess.getInputStream()));
|
||||
while ((line = stdIn.readLine()) != null) {
|
||||
if (line != null && !line.trim().equals("")) {
|
||||
log.log("< " + line + "\n");
|
||||
}
|
||||
if (line.contains(replyMsg + ip)) {
|
||||
nrReplies[currentMote]++;
|
||||
}
|
||||
}
|
||||
pingProcess.destroy();
|
||||
}
|
||||
var thread = new java.lang.Thread(new java.lang.Runnable(pingRunnable));
|
||||
thread.start();
|
||||
|
||||
while (thread.isAlive()) {
|
||||
GENERATE_MSG(500, "continue");
|
||||
YIELD_THEN_WAIT_UNTIL(msg.equals("continue"));
|
||||
}
|
||||
|
||||
currentMote++;
|
||||
}
|
||||
|
||||
log.log("\nTEST SUMMARY:\n")
|
||||
testOK = 1;
|
||||
currentMote = 1;
|
||||
while (currentMote <= NR_MOTES) {
|
||||
log.log("Ping replies from mote " + currentMote + ": " + nrReplies[currentMote] + "/" + NR_PINGS + "\n")
|
||||
if (nrReplies[currentMote] < NR_PINGS_MIN) {
|
||||
testOK = 0;
|
||||
}
|
||||
|
||||
currentMote++;
|
||||
}
|
||||
|
||||
if (testOK == 1) {
|
||||
log.testOK();
|
||||
}
|
||||
log.testFailed();</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>565</width>
|
||||
<z>0</z>
|
||||
<height>517</height>
|
||||
<location_x>715</location_x>
|
||||
<location_y>1</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.LogListener
|
||||
<plugin_config>
|
||||
<filter />
|
||||
<coloring />
|
||||
</plugin_config>
|
||||
<width>1280</width>
|
||||
<z>4</z>
|
||||
<height>310</height>
|
||||
<location_x>0</location_x>
|
||||
<location_y>519</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.NativeIPGateway
|
||||
<mote_arg>0</mote_arg>
|
||||
<plugin_config>
|
||||
<network_interface>lo</network_interface>
|
||||
<register_routes>true</register_routes>
|
||||
</plugin_config>
|
||||
<width>388</width>
|
||||
<z>3</z>
|
||||
<height>321</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>200</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.RadioLogger
|
||||
<plugin_config>
|
||||
<split>150</split>
|
||||
</plugin_config>
|
||||
<width>324</width>
|
||||
<z>6</z>
|
||||
<height>321</height>
|
||||
<location_x>389</location_x>
|
||||
<location_y>200</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.TimeLine
|
||||
<plugin_config>
|
||||
<mote>0</mote>
|
||||
<mote>1</mote>
|
||||
<mote>2</mote>
|
||||
<mote>3</mote>
|
||||
<mote>4</mote>
|
||||
<showRadioRXTX />
|
||||
<split>26</split>
|
||||
<zoomfactor>16662.274975375385</zoomfactor>
|
||||
</plugin_config>
|
||||
<width>1278</width>
|
||||
<z>1</z>
|
||||
<height>149</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>831</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
173
regression-tests/10-ipv4/x02-ip-sky-telnet-ping.csc
Normal file
173
regression-tests/10-ipv4/x02-ip-sky-telnet-ping.csc
Normal file
|
@ -0,0 +1,173 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>-2147483648</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<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>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Telnet server example</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/sky-ip/sky-telnet-server.c</source>
|
||||
<commands EXPORT="discard">make sky-telnet-server.sky TARGET=sky</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/sky-ip/sky-telnet-server.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>86.60672552430381</x>
|
||||
<y>5.401254433278691</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspSerial
|
||||
<history></history>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>261</width>
|
||||
<z>3</z>
|
||||
<height>206</height>
|
||||
<location_x>7</location_x>
|
||||
<location_y>4</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.NativeIPGateway
|
||||
<mote_arg>0</mote_arg>
|
||||
<plugin_config>
|
||||
<network_interface>lo</network_interface>
|
||||
<register_routes>true</register_routes>
|
||||
</plugin_config>
|
||||
<width>388</width>
|
||||
<z>1</z>
|
||||
<height>350</height>
|
||||
<location_x>75</location_x>
|
||||
<location_y>599</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>0</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>550</width>
|
||||
<z>0</z>
|
||||
<height>357</height>
|
||||
<location_x>39</location_x>
|
||||
<location_y>223</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.Visualizer
|
||||
<plugin_config>
|
||||
<skin>se.sics.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||
<viewport>1.473063973063973 0.0 0.0 1.473063973063973 21.959789842145003 40.69175483313324</viewport>
|
||||
</plugin_config>
|
||||
<width>313</width>
|
||||
<z>4</z>
|
||||
<height>169</height>
|
||||
<location_x>294</location_x>
|
||||
<location_y>27</location_y>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(180000);
|
||||
|
||||
/* conf */
|
||||
nrReplies = 0;
|
||||
ipAddress = "172.16.1.0";
|
||||
osName = java.lang.System.getProperty("os.name").toLowerCase();
|
||||
if (osName.startsWith("win")) {
|
||||
pingOnceCmd = "ping -n 1 " + ipAddress;
|
||||
pingCmd = "ping -w 10000 -n 10 " + ipAddress;
|
||||
} else {
|
||||
pingOnceCmd = "ping -c 1 " + ipAddress;
|
||||
pingCmd = "ping -i 4 -c 10 " + ipAddress;
|
||||
}
|
||||
replyMsg = "from " + ipAddress;
|
||||
|
||||
/* wait for mote startup */
|
||||
GENERATE_MSG(5000, "continue");
|
||||
WAIT_UNTIL(msg.equals("continue"));
|
||||
|
||||
/* make gateway */
|
||||
pingOnceProcess = new java.lang.Runtime.getRuntime().exec(pingOnceCmd);
|
||||
GENERATE_MSG(5000, "continue");
|
||||
WAIT_UNTIL(msg.equals("continue"));
|
||||
|
||||
/* override simulation speed limit to realtime */
|
||||
mote.getSimulation().setSpeedLimit(1.0);
|
||||
|
||||
/* start ping process */
|
||||
var runnableObj = new Object();
|
||||
runnableObj.run = function() {
|
||||
pingProcess = new java.lang.Runtime.getRuntime().exec(pingCmd);
|
||||
log.log("cmd> " + pingCmd + "\n");
|
||||
|
||||
stdIn = new java.io.BufferedReader(new java.io.InputStreamReader(pingProcess.getInputStream()));
|
||||
while ((line = stdIn.readLine()) != null) {
|
||||
log.log("> " + line + "\n");
|
||||
if (line.contains(replyMsg)) {
|
||||
nrReplies++;
|
||||
//log.log("reply #" + nrReplies + "\n");
|
||||
}
|
||||
}
|
||||
pingProcess.destroy();
|
||||
|
||||
if (nrReplies > 5) {
|
||||
log.testOK(); /* Report test success and quit */
|
||||
} else {
|
||||
log.log("Only " + nrReplies + "/10 ping replies was received\n");
|
||||
log.testFailed();
|
||||
}
|
||||
}
|
||||
var thread = new java.lang.Thread(new java.lang.Runnable(runnableObj));
|
||||
thread.start();</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>589</width>
|
||||
<z>2</z>
|
||||
<height>900</height>
|
||||
<location_x>631</location_x>
|
||||
<location_y>38</location_y>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
221
regression-tests/10-ipv4/x03-ip-sky-webserver-wget.csc
Normal file
221
regression-tests/10-ipv4/x03-ip-sky-webserver-wget.csc
Normal file
|
@ -0,0 +1,221 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<simconf>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mrm</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/mspsim</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/avrora</project>
|
||||
<project EXPORT="discard">[CONTIKI_DIR]/tools/cooja/apps/native_gateway</project>
|
||||
<simulation>
|
||||
<title>My simulation</title>
|
||||
<delaytime>0</delaytime>
|
||||
<randomseed>generated</randomseed>
|
||||
<motedelay_us>1000000</motedelay_us>
|
||||
<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>
|
||||
<events>
|
||||
<logoutput>40000</logoutput>
|
||||
</events>
|
||||
<motetype>
|
||||
se.sics.cooja.mspmote.SkyMoteType
|
||||
<identifier>sky1</identifier>
|
||||
<description>Sky Mote Type #1</description>
|
||||
<source EXPORT="discard">[CONTIKI_DIR]/examples/sky-shell-webserver/sky-shell-webserver.c</source>
|
||||
<commands EXPORT="discard">make clean TARGET=sky
|
||||
make sky-shell-webserver.sky TARGET=sky DEFINES=NETSTACK_MAC=nullmac_driver,NETSTACK_RDC=nullrdc_driver</commands>
|
||||
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/sky-shell-webserver/sky-shell-webserver.sky</firmware>
|
||||
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
||||
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
||||
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
||||
</motetype>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>16.08449565170202</x>
|
||||
<y>26.59851562245121</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>1</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>42.81612608990057</x>
|
||||
<y>41.95359330906976</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>2</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<interface_config>
|
||||
se.sics.cooja.interfaces.Position
|
||||
<x>70.00470747576063</x>
|
||||
<y>60.92771287468932</y>
|
||||
<z>0.0</z>
|
||||
</interface_config>
|
||||
<interface_config>
|
||||
se.sics.cooja.mspmote.interfaces.MspMoteID
|
||||
<id>3</id>
|
||||
</interface_config>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
<mote>
|
||||
<breakpoints />
|
||||
<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>
|
||||
<motetype_identifier>sky1</motetype_identifier>
|
||||
</mote>
|
||||
</simulation>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.SimControl
|
||||
<width>248</width>
|
||||
<z>4</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>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
||||
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||
<viewport>2.228374754476065 0.0 0.0 2.228374754476065 17.670417676175877 -52.816915265062036</viewport>
|
||||
</plugin_config>
|
||||
<width>305</width>
|
||||
<z>3</z>
|
||||
<height>201</height>
|
||||
<location_x>248</location_x>
|
||||
<location_y>0</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>3</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>551</width>
|
||||
<z>1</z>
|
||||
<height>258</height>
|
||||
<location_x>2</location_x>
|
||||
<location_y>471</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.MoteInterfaceViewer
|
||||
<mote_arg>0</mote_arg>
|
||||
<plugin_config>
|
||||
<interface>Serial port</interface>
|
||||
<scrollpos>0,0</scrollpos>
|
||||
</plugin_config>
|
||||
<width>553</width>
|
||||
<z>2</z>
|
||||
<height>272</height>
|
||||
<location_x>1</location_x>
|
||||
<location_y>200</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
<plugin>
|
||||
se.sics.cooja.plugins.ScriptRunner
|
||||
<plugin_config>
|
||||
<script>TIMEOUT(90000, log.log("last message: " + msg + "\n"));
|
||||
|
||||
mote1 = null;
|
||||
mote4 = null;
|
||||
nr_boot = 0;
|
||||
|
||||
/* Wait until all nodes have booted */
|
||||
while (true) {
|
||||
if (msg.contains('Starting')) {
|
||||
nr_boot++;
|
||||
if (id == 1) mote1 = mote;
|
||||
if (id == 4) mote4 = mote;
|
||||
}
|
||||
if (nr_boot == 4) break;
|
||||
YIELD();
|
||||
}
|
||||
log.log("All motes booted\n");
|
||||
|
||||
/* Wait one second */
|
||||
GENERATE_MSG(1000, "continue");
|
||||
WAIT_UNTIL(msg.equals("continue"));
|
||||
|
||||
/* Create file on node 1 */
|
||||
log.log("Node 1 creating data... ");
|
||||
write(mote1, "echo FROM1 FROM1 | write node1file.txt\n");
|
||||
log.log("done!\n");
|
||||
|
||||
/* Wait one second */
|
||||
GENERATE_MSG(1000, "continue2");
|
||||
WAIT_UNTIL(msg.equals("continue2"));
|
||||
|
||||
/* Download node1file.txt to node 4 */
|
||||
log.log("Node 4 downloading from node 1... ");
|
||||
write(mote4, "wget 172.16.1.0/node1file.txt | write node4file.txt\n");
|
||||
WAIT_UNTIL(id == 4 && msg.contains("FROM1"));
|
||||
log.log("done!\n");
|
||||
|
||||
/* Wait one second */
|
||||
GENERATE_MSG(1000, "continue3");
|
||||
WAIT_UNTIL(msg.equals("continue3"));
|
||||
|
||||
/* Extend data */
|
||||
log.log("Node 4 appending data... ");
|
||||
write(mote4, "echo FROM4 FROM4 | append node4file.txt\n");
|
||||
log.log("done!\n");
|
||||
|
||||
/* Wait one second */
|
||||
GENERATE_MSG(1000, "continue4");
|
||||
WAIT_UNTIL(msg.equals("continue4"));
|
||||
|
||||
/* Download node4file.txt at node 1 */
|
||||
log.log("Node 1 downloading from node 4..");
|
||||
write(mote1, "wget 172.16.4.0/node4file.txt\n");
|
||||
WAIT_UNTIL(id == 1 && msg.contains("FROM1"));
|
||||
WAIT_UNTIL(id == 1 && msg.contains("FROM4"));
|
||||
log.log("done!\n");
|
||||
|
||||
log.testOK();</script>
|
||||
<active>true</active>
|
||||
</plugin_config>
|
||||
<width>610</width>
|
||||
<z>0</z>
|
||||
<height>730</height>
|
||||
<location_x>552</location_x>
|
||||
<location_y>0</location_y>
|
||||
<minimized>false</minimized>
|
||||
</plugin>
|
||||
</simconf>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue