2009-04-20 15:04:20 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<simconf>
|
|
|
|
<simulation>
|
|
|
|
<title>My simulation</title>
|
2012-05-29 13:50:36 +02:00
|
|
|
<delaytime>-2147483648</delaytime>
|
2009-04-20 15:04:20 +02:00
|
|
|
<randomseed>generated</randomseed>
|
2009-06-24 16:42:50 +02:00
|
|
|
<motedelay_us>1000000</motedelay_us>
|
2009-04-20 15:04:20 +02:00
|
|
|
<radiomedium>
|
|
|
|
se.sics.cooja.radiomediums.UDGM
|
|
|
|
<transmitting_range>100.0</transmitting_range>
|
|
|
|
<interference_range>100.0</interference_range>
|
|
|
|
<success_ratio_tx>0.95</success_ratio_tx>
|
|
|
|
<success_ratio_rx>1.0</success_ratio_rx>
|
|
|
|
</radiomedium>
|
2010-01-22 17:57:56 +01:00
|
|
|
<events>
|
|
|
|
<logoutput>40000</logoutput>
|
|
|
|
</events>
|
2009-04-20 15:04:20 +02:00
|
|
|
<motetype>
|
|
|
|
se.sics.cooja.mspmote.SkyMoteType
|
|
|
|
<identifier>sky1</identifier>
|
2012-05-29 13:50:36 +02:00
|
|
|
<description>Contiki shell with download command</description>
|
|
|
|
<source EXPORT="discard">[CONTIKI_DIR]/examples/sky-shell/sky-checkpoint.c</source>
|
|
|
|
<commands EXPORT="discard">make sky-checkpoint.sky TARGET=sky</commands>
|
|
|
|
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/sky-shell/sky-checkpoint.sky</firmware>
|
2009-04-20 15:04:20 +02:00
|
|
|
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
2012-05-29 13:50:36 +02:00
|
|
|
<moteinterface>se.sics.cooja.interfaces.RimeAddress</moteinterface>
|
2009-06-24 16:42:50 +02:00
|
|
|
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
2009-04-20 15:04:20 +02:00
|
|
|
<moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
2012-05-29 13:50:36 +02:00
|
|
|
<moteinterface>se.sics.cooja.interfaces.MoteAttributes</moteinterface>
|
2009-04-20 15:04:20 +02:00
|
|
|
<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>
|
2012-05-29 13:50:36 +02:00
|
|
|
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyCoffeeFilesystem</moteinterface>
|
2009-04-20 15:04:20 +02:00
|
|
|
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
|
2010-01-22 17:57:56 +01:00
|
|
|
<moteinterface>se.sics.cooja.mspmote.interfaces.MspSerial</moteinterface>
|
2009-04-20 15:04:20 +02:00
|
|
|
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
2012-05-29 13:50:36 +02:00
|
|
|
<moteinterface>se.sics.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
|
|
|
|
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyTemperature</moteinterface>
|
2009-04-20 15:04:20 +02:00
|
|
|
</motetype>
|
|
|
|
<mote>
|
2009-06-24 16:42:50 +02:00
|
|
|
<breakpoints />
|
2009-04-20 15:04:20 +02:00
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.interfaces.Position
|
|
|
|
<x>-16.136777727943556</x>
|
|
|
|
<y>85.85963282955879</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.mspmote.interfaces.MspMoteID
|
|
|
|
<id>1</id>
|
|
|
|
</interface_config>
|
2012-05-29 13:50:36 +02:00
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.mspmote.interfaces.MspSerial
|
|
|
|
<history>l~;asd~;~K~;download 2.0 file25.txt | write file26.txt | null~;ls~;~K~;download 2.0 file25.txt | write file26.txt | null~;~K~;download 2.0 file25.txt | write file26.txt~;~K~;download 2.0 file25.txt | write file26.txt~;~K~;read file26.txt~;download 2.0 file25.txt | write file26.txt~;~K~;download 2.0 file25.txt | write file26.txt~;~K~;download 2.0 file25.txt | write file26.txt~;a~;~K~;download 2.0 file25.txt | write file26.txt~;~K~;download 2.0 file23.txt | write file26.txt~;download 2.0 file25.txt | write file26.txt~;~K~;download 2.0 file25.txt | write file26.txt~;download 2.0 file25.txt~;download 2.0 file27.txt~;ls~;read file30.txt~;read file30.txt 0 13~;read file30.txt 0 12~;</history>
|
|
|
|
</interface_config>
|
2010-01-22 17:57:56 +01:00
|
|
|
<motetype_identifier>sky1</motetype_identifier>
|
2009-04-20 15:04:20 +02:00
|
|
|
</mote>
|
|
|
|
<mote>
|
2009-06-24 16:42:50 +02:00
|
|
|
<breakpoints />
|
2009-04-20 15:04:20 +02:00
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.interfaces.Position
|
|
|
|
<x>11.712359274594053</x>
|
|
|
|
<y>84.42239042889724</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.mspmote.interfaces.MspMoteID
|
|
|
|
<id>2</id>
|
|
|
|
</interface_config>
|
2012-05-29 13:50:36 +02:00
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.mspmote.interfaces.MspSerial
|
|
|
|
<history>ls~;read file25.txt~;</history>
|
|
|
|
</interface_config>
|
2010-01-22 17:57:56 +01:00
|
|
|
<motetype_identifier>sky1</motetype_identifier>
|
2009-04-20 15:04:20 +02:00
|
|
|
</mote>
|
|
|
|
</simulation>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.SimControl
|
2009-06-24 16:42:50 +02:00
|
|
|
<width>268</width>
|
2012-05-29 13:50:36 +02:00
|
|
|
<z>2</z>
|
2009-06-24 16:42:50 +02:00
|
|
|
<height>201</height>
|
|
|
|
<location_x>0</location_x>
|
|
|
|
<location_y>1</location_y>
|
2009-04-20 15:04:20 +02:00
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.MoteInterfaceViewer
|
|
|
|
<mote_arg>0</mote_arg>
|
|
|
|
<plugin_config>
|
|
|
|
<interface>Serial port</interface>
|
|
|
|
<scrollpos>0,0</scrollpos>
|
|
|
|
</plugin_config>
|
2010-01-22 17:57:56 +01:00
|
|
|
<width>378</width>
|
2012-05-29 13:50:36 +02:00
|
|
|
<z>1</z>
|
|
|
|
<height>361</height>
|
2009-06-24 16:42:50 +02:00
|
|
|
<location_x>2</location_x>
|
|
|
|
<location_y>201</location_y>
|
2009-04-20 15:04:20 +02:00
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.MoteInterfaceViewer
|
|
|
|
<mote_arg>1</mote_arg>
|
|
|
|
<plugin_config>
|
|
|
|
<interface>Serial port</interface>
|
|
|
|
<scrollpos>0,0</scrollpos>
|
|
|
|
</plugin_config>
|
2010-01-22 17:57:56 +01:00
|
|
|
<width>395</width>
|
|
|
|
<z>3</z>
|
2012-05-29 13:50:36 +02:00
|
|
|
<height>361</height>
|
2010-01-22 17:57:56 +01:00
|
|
|
<location_x>379</location_x>
|
|
|
|
<location_y>201</location_y>
|
2009-04-20 15:04:20 +02:00
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.Visualizer
|
|
|
|
<plugin_config>
|
2010-01-22 17:57:56 +01:00
|
|
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
|
|
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
|
|
|
<skin>se.sics.cooja.plugins.skins.TrafficVisualizerSkin</skin>
|
|
|
|
<skin>se.sics.cooja.plugins.skins.AddressVisualizerSkin</skin>
|
|
|
|
<skin>se.sics.cooja.plugins.skins.LogVisualizerSkin</skin>
|
2012-05-29 13:50:36 +02:00
|
|
|
<skin>se.sics.cooja.plugins.skins.LEDVisualizerSkin</skin>
|
|
|
|
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
|
|
|
<viewport>3.7763262850104686 0.0 0.0 3.7763262850104686 110.98456498740039 -253.59028307494597</viewport>
|
2009-04-20 15:04:20 +02:00
|
|
|
</plugin_config>
|
2012-05-29 13:50:36 +02:00
|
|
|
<width>221</width>
|
|
|
|
<z>7</z>
|
2010-01-22 17:57:56 +01:00
|
|
|
<height>200</height>
|
|
|
|
<location_x>269</location_x>
|
2009-06-24 16:42:50 +02:00
|
|
|
<location_y>1</location_y>
|
2009-04-20 15:04:20 +02:00
|
|
|
</plugin>
|
|
|
|
<plugin>
|
2009-06-24 16:42:50 +02:00
|
|
|
se.sics.cooja.plugins.ScriptRunner
|
|
|
|
<plugin_config>
|
2012-05-29 14:56:39 +02:00
|
|
|
<script>TIMEOUT(350000, log.log("last msg: " + msg + "\n"));
|
|
|
|
DELAY = 10000;
|
2009-06-24 16:42:50 +02:00
|
|
|
|
|
|
|
/* Wait for nodes to boot */
|
2012-05-29 13:50:36 +02:00
|
|
|
GENERATE_MSG(5000, "continue");
|
2009-06-24 16:42:50 +02:00
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.equals("continue"));
|
2012-05-29 13:50:36 +02:00
|
|
|
mote1 = sim.getMoteWithID(1);
|
|
|
|
mote2 = sim.getMoteWithID(2);
|
2009-06-24 16:42:50 +02:00
|
|
|
|
|
|
|
/* Generate initial file */
|
2010-01-22 17:57:56 +01:00
|
|
|
fileID = 10;
|
2012-05-29 13:50:36 +02:00
|
|
|
log.log("Generating initial file at mote 1\n");
|
2010-01-22 17:57:56 +01:00
|
|
|
command = "echo *mote1data" + fileID + " | write file" + fileID + ".txt";
|
|
|
|
log.log("mote1> " + command + "\n");
|
2009-06-24 16:42:50 +02:00
|
|
|
write(mote1, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 1 && msg.contains("Contiki>"));
|
|
|
|
|
|
|
|
/* Download and append files */
|
2010-01-22 17:57:56 +01:00
|
|
|
while (fileID < 30) {
|
2012-05-29 13:50:36 +02:00
|
|
|
/* Mote 1 -> Mote 2: conf */
|
2009-06-24 16:42:50 +02:00
|
|
|
srcFile = "file" + fileID + ".txt";
|
|
|
|
fileID++;
|
|
|
|
dstFile = "file" + fileID + ".txt";
|
2012-05-29 13:50:36 +02:00
|
|
|
|
|
|
|
/* Mote 1 -> Mote 2: download */
|
|
|
|
log.log("\nDownloading from mote 1 to mote 2\n");
|
2010-01-22 17:57:56 +01:00
|
|
|
command = "download 1.0 " + srcFile + " | write " + dstFile + " | null";
|
|
|
|
log.log("mote2> " + command + "\n");
|
2009-06-24 16:42:50 +02:00
|
|
|
write(mote2, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 2 && msg.contains("Contiki>"));
|
2012-05-29 13:50:36 +02:00
|
|
|
|
|
|
|
/* Mote 1 -> Mote 2: echo download */
|
|
|
|
command = "echo downloaded " + srcFile + "@1.0 -> " + dstFile;
|
|
|
|
log.log("mote2> " + command + "\n");
|
|
|
|
write(mote2, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 2 && msg.contains("Contiki>"));
|
|
|
|
|
|
|
|
/* Mote 2: append */
|
|
|
|
log.log("Appending to file at mote 2\n");
|
2010-01-22 17:57:56 +01:00
|
|
|
command = "echo *mote2data" + fileID + " | append " + dstFile + " | null";
|
|
|
|
log.log("mote2> " + command + "\n");
|
2009-06-24 16:42:50 +02:00
|
|
|
write(mote2, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 2 && msg.contains("Contiki>"));
|
|
|
|
|
2012-05-29 13:50:36 +02:00
|
|
|
/* Mote 2: echo append */
|
|
|
|
command = "echo appended to " + dstFile;
|
|
|
|
log.log("mote2> " + command + "\n");
|
|
|
|
write(mote2, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 2 && msg.contains("Contiki>"));
|
|
|
|
|
|
|
|
|
|
|
|
/* Delay */
|
2012-05-29 14:56:39 +02:00
|
|
|
GENERATE_MSG(DELAY, "continue");
|
2012-05-29 13:50:36 +02:00
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.equals("continue"));
|
|
|
|
|
|
|
|
|
|
|
|
/* Mote 2 -> Mote 1: conf */
|
2009-06-24 16:42:50 +02:00
|
|
|
srcFile = "file" + fileID + ".txt";
|
|
|
|
fileID++;
|
|
|
|
dstFile = "file" + fileID + ".txt";
|
2012-05-29 13:50:36 +02:00
|
|
|
|
|
|
|
/* Mote 2 -> Mote 1: download */
|
|
|
|
log.log("\nDownloading from mote 2 to mote 1\n");
|
2010-01-22 17:57:56 +01:00
|
|
|
command = "download 2.0 " + srcFile + " | write " + dstFile + " | null";
|
|
|
|
log.log("mote1> " + command + "\n");
|
2009-06-24 16:42:50 +02:00
|
|
|
write(mote1, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 1 && msg.contains("Contiki>"));
|
2012-05-29 13:50:36 +02:00
|
|
|
|
|
|
|
/* Mote 2 -> Mote 1: echo download */
|
|
|
|
command = "echo downloaded " + srcFile + "@2.0 -> " + dstFile;
|
|
|
|
log.log("mote1> " + command + "\n");
|
|
|
|
write(mote1, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 1 && msg.contains("Contiki>"));
|
|
|
|
|
|
|
|
/* Mote 1: append */
|
|
|
|
log.log("Appending to file at mote 1\n");
|
2010-01-22 17:57:56 +01:00
|
|
|
command = "echo *mote1data" + fileID + " | append " + dstFile + " | null";
|
|
|
|
log.log("mote1> " + command + "\n");
|
2009-06-24 16:42:50 +02:00
|
|
|
write(mote1, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 1 && msg.contains("Contiki>"));
|
2012-05-29 13:50:36 +02:00
|
|
|
|
|
|
|
/* Mote 1: echo append */
|
|
|
|
command = "echo appended to " + dstFile;
|
|
|
|
log.log("mote1> " + command + "\n");
|
|
|
|
write(mote1, command);
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 1 && msg.contains("Contiki>"));
|
|
|
|
|
|
|
|
|
|
|
|
/* Delay */
|
2012-05-29 14:56:39 +02:00
|
|
|
GENERATE_MSG(DELAY, "continue");
|
2012-05-29 13:50:36 +02:00
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.equals("continue"));
|
2009-06-24 16:42:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* List files, verify contents */
|
2010-01-22 17:57:56 +01:00
|
|
|
log.log("Locating file30.txt on mote 1\n");
|
|
|
|
write(mote1, "ls");
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 1 && msg.contains("file30.txt"));
|
2012-05-29 13:50:36 +02:00
|
|
|
if (!msg.contains("252 ")) {
|
|
|
|
log.log("Bad file size, should be 252 bytes: " + msg + "\n");
|
2009-06-24 16:42:50 +02:00
|
|
|
log.testFailed();
|
|
|
|
}
|
|
|
|
YIELD_THEN_WAIT_UNTIL(id == 1 && msg.contains("Contiki>"));
|
2010-01-22 17:57:56 +01:00
|
|
|
|
|
|
|
/* Wait 3 seconds (3000ms) */
|
|
|
|
GENERATE_MSG(3000, "continue");
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.equals("continue"));
|
|
|
|
|
|
|
|
fileID = 10;
|
2012-05-29 13:50:36 +02:00
|
|
|
command = "read file30.txt 0 12";
|
2010-01-22 17:57:56 +01:00
|
|
|
log.log("mote1> " + command + "\n");
|
|
|
|
write(mote1, command);
|
|
|
|
while (fileID < 30) {
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains("mote1data" + fileID));
|
|
|
|
fileID++;
|
|
|
|
log.log("> " + msg + "\n");
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains("mote2data" + fileID));
|
|
|
|
fileID++;
|
|
|
|
log.log("> " + msg + "\n");
|
|
|
|
}
|
2009-06-24 16:42:50 +02:00
|
|
|
|
|
|
|
log.log("Test finished at time: " + mote.getSimulation().getSimulationTime() + "\n");
|
|
|
|
|
|
|
|
log.testOK(); /* Report test success and quit */</script>
|
|
|
|
<active>true</active>
|
|
|
|
</plugin_config>
|
2012-05-29 13:50:36 +02:00
|
|
|
<width>506</width>
|
2009-06-24 16:42:50 +02:00
|
|
|
<z>0</z>
|
2012-05-29 13:50:36 +02:00
|
|
|
<height>689</height>
|
2010-01-22 17:57:56 +01:00
|
|
|
<location_x>774</location_x>
|
2012-05-29 13:50:36 +02:00
|
|
|
<location_y>-1</location_y>
|
2010-01-22 17:57:56 +01:00
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.TimeLine
|
|
|
|
<plugin_config>
|
|
|
|
<mote>0</mote>
|
|
|
|
<mote>1</mote>
|
2012-05-29 13:50:36 +02:00
|
|
|
<showLEDs />
|
2010-01-22 17:57:56 +01:00
|
|
|
<split>1</split>
|
2012-05-29 13:50:36 +02:00
|
|
|
<zoomfactor>22313.016014842982</zoomfactor>
|
2010-01-22 17:57:56 +01:00
|
|
|
</plugin_config>
|
|
|
|
<width>772</width>
|
2012-05-29 13:50:36 +02:00
|
|
|
<z>5</z>
|
2010-01-22 17:57:56 +01:00
|
|
|
<height>125</height>
|
2012-05-29 13:50:36 +02:00
|
|
|
<location_x>3</location_x>
|
|
|
|
<location_y>562</location_y>
|
2010-01-22 17:57:56 +01:00
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.LogListener
|
|
|
|
<plugin_config>
|
|
|
|
<filter />
|
2012-05-29 13:50:36 +02:00
|
|
|
<coloring />
|
2010-01-22 17:57:56 +01:00
|
|
|
</plugin_config>
|
2012-05-29 13:50:36 +02:00
|
|
|
<width>1279</width>
|
2010-01-22 17:57:56 +01:00
|
|
|
<z>4</z>
|
2012-05-29 13:50:36 +02:00
|
|
|
<height>287</height>
|
|
|
|
<location_x>1</location_x>
|
|
|
|
<location_y>686</location_y>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
PowerTracker
|
|
|
|
<width>287</width>
|
|
|
|
<z>6</z>
|
|
|
|
<height>199</height>
|
|
|
|
<location_x>490</location_x>
|
|
|
|
<location_y>2</location_y>
|
2009-04-20 15:04:20 +02:00
|
|
|
</plugin>
|
|
|
|
</simconf>
|
|
|
|
|