2009-02-04 17:53:16 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<simconf>
|
2009-03-11 13:25:40 +00:00
|
|
|
<project>../apps/mrm</project>
|
|
|
|
<project>../apps/mspsim</project>
|
2009-06-24 14:42:50 +00:00
|
|
|
<project>../apps/avrora</project>
|
2009-03-11 13:25:40 +00:00
|
|
|
<project>../apps/native_gateway</project>
|
2009-02-04 17:53:16 +00:00
|
|
|
<simulation>
|
|
|
|
<title>My simulation</title>
|
|
|
|
<delaytime>0</delaytime>
|
2009-06-24 14:42:50 +00:00
|
|
|
<randomseed>generated</randomseed>
|
|
|
|
<motedelay_us>1000000</motedelay_us>
|
2009-02-04 17:53:16 +00:00
|
|
|
<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>
|
2009-02-15 08:45:30 +00:00
|
|
|
<source>../../../examples/sky-shell/sky-checkpoint.c</source>
|
2010-02-03 21:16:13 +00:00
|
|
|
<commands>make clean TARGET=sky
|
|
|
|
make sky-checkpoint.sky TARGET=sky</commands>
|
2009-03-11 13:25:40 +00:00
|
|
|
<firmware>../../../examples/sky-shell/sky-checkpoint.sky</firmware>
|
|
|
|
<moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
|
2009-06-24 14:42:50 +00:00
|
|
|
<moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
|
2009-03-11 13:25:40 +00:00
|
|
|
<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.SkySerial</moteinterface>
|
|
|
|
<moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
|
2009-02-04 17:53:16 +00:00
|
|
|
</motetype>
|
|
|
|
<mote>
|
|
|
|
se.sics.cooja.mspmote.SkyMote
|
|
|
|
<motetype_identifier>sky1</motetype_identifier>
|
2009-06-24 14:42:50 +00:00
|
|
|
<breakpoints />
|
2009-02-04 17:53:16 +00:00
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.interfaces.Position
|
|
|
|
<x>3.537694077190867</x>
|
|
|
|
<y>25.877706916818877</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
|
|
|
se.sics.cooja.mspmote.interfaces.MspMoteID
|
|
|
|
<id>1</id>
|
|
|
|
</interface_config>
|
|
|
|
</mote>
|
|
|
|
</simulation>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.SimControl
|
|
|
|
<width>248</width>
|
2009-03-11 13:25:40 +00:00
|
|
|
<z>3</z>
|
2009-02-04 17:53:16 +00:00
|
|
|
<height>200</height>
|
|
|
|
<location_x>0</location_x>
|
|
|
|
<location_y>0</location_y>
|
|
|
|
<minimized>false</minimized>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
2009-06-24 14:42:50 +00:00
|
|
|
se.sics.cooja.plugins.Visualizer
|
|
|
|
<plugin_config>
|
|
|
|
<skin>Mote IDs</skin>
|
|
|
|
<skin>Radio environment (UDGM)</skin>
|
|
|
|
</plugin_config>
|
|
|
|
<width>246</width>
|
2009-03-11 13:25:40 +00:00
|
|
|
<z>2</z>
|
2009-06-24 14:42:50 +00:00
|
|
|
<height>210</height>
|
|
|
|
<location_x>2</location_x>
|
|
|
|
<location_y>199</location_y>
|
2009-02-04 17:53:16 +00:00
|
|
|
<minimized>false</minimized>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
se.sics.cooja.plugins.LogListener
|
|
|
|
<plugin_config>
|
|
|
|
<filter />
|
|
|
|
</plugin_config>
|
2009-06-24 14:42:50 +00:00
|
|
|
<width>849</width>
|
|
|
|
<z>1</z>
|
|
|
|
<height>246</height>
|
2009-02-04 17:53:16 +00:00
|
|
|
<location_x>0</location_x>
|
2009-06-24 14:42:50 +00:00
|
|
|
<location_y>409</location_y>
|
2009-02-04 17:53:16 +00:00
|
|
|
<minimized>false</minimized>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
2009-06-24 14:42:50 +00:00
|
|
|
se.sics.cooja.plugins.ScriptRunner
|
2009-02-04 17:53:16 +00:00
|
|
|
<plugin_config>
|
2009-09-28 09:46:54 +00:00
|
|
|
<script>TIMEOUT(360000, log.log("timeout at phase " + phase + ". last message: " + msg + "\n"));
|
2009-06-24 14:42:50 +00:00
|
|
|
phase=0;
|
|
|
|
|
|
|
|
/* Wait until node has booted */
|
|
|
|
WAIT_UNTIL(msg.startsWith('Starting'));
|
|
|
|
log.log("Shell started\n");
|
|
|
|
phase++;
|
|
|
|
|
|
|
|
/* 1. BACKGROUND PROCESS - NO CHECKPOINTING */
|
|
|
|
write(mote, "repeat 10 1 echo bg process &\n");
|
|
|
|
log.log("Starting background process without checkpointing\n");
|
|
|
|
expected=10;
|
|
|
|
while (expected > 0) {
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
|
|
|
|
expected--;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Make sure background process has exited */
|
|
|
|
GENERATE_MSG(3000, "continue");
|
|
|
|
while (!msg.contains('continue')) {
|
|
|
|
YIELD();
|
|
|
|
if (msg.contains('bg process')) {
|
|
|
|
log.log("Too many bg messages at phase: " + phase + "\n");
|
|
|
|
log.testFailed(); /* We are done! */
|
|
|
|
while (true) YIELD();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.log("Background process without checkpointing done\n\n");
|
|
|
|
phase++;
|
|
|
|
|
|
|
|
/* 2. BACKGROUND PROCESS - CHECKPOINTING EVERY SECOND */
|
|
|
|
write(mote, "repeat 10 1 echo bg process &\n");
|
|
|
|
log.log("Starting background process with periodic checkpointing\n");
|
|
|
|
expected=10;
|
|
|
|
while (expected > 0) {
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
|
|
|
|
expected--;
|
|
|
|
write(mote, "checkpoint file" + expected + "\n");
|
|
|
|
log.log("> checkpoint file" + expected + "\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Make sure background process has exited */
|
|
|
|
GENERATE_MSG(3000, "continue");
|
|
|
|
while (!msg.contains('continue')) {
|
|
|
|
YIELD();
|
|
|
|
if (msg.contains('bg process')) {
|
|
|
|
log.log("Too many bg messages at phase: " + phase + "\n");
|
|
|
|
log.testFailed(); /* We are done! */
|
|
|
|
while (true) YIELD();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.log("Background process with periodic checkpointing done\n\n");
|
|
|
|
phase++;
|
|
|
|
|
|
|
|
/* 3. LIST ALL FILES */
|
|
|
|
write(mote, "ls");
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file9'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file8'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file7'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file6'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file5'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file4'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file3'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file2'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file1'));
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('file0'));
|
|
|
|
GENERATE_MSG(1000, "continue");
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('continue'));
|
|
|
|
log.log("All checkpoints are stored in the filesystem\n\n");
|
|
|
|
phase++;
|
|
|
|
|
|
|
|
/* 4. ROLLBACK TO RESTORE BACKGROUND PROCESS */
|
|
|
|
write(mote, "rollback file7");
|
|
|
|
log.log("Rolling back background process at count 7\n");
|
|
|
|
expected=7;
|
|
|
|
while (expected > 0) {
|
|
|
|
YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
|
|
|
|
expected--;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Make sure background process has exited */
|
|
|
|
GENERATE_MSG(3000, "continue");
|
|
|
|
while (!msg.contains('continue')) {
|
|
|
|
YIELD();
|
|
|
|
if (msg.contains('bg process')) {
|
|
|
|
log.log("Too many bg messages at phase: " + phase + "\n");
|
|
|
|
log.testFailed(); /* We are done! */
|
|
|
|
while (true) YIELD();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.log("Background process was rolled back successfully\n\n");
|
|
|
|
phase++;
|
|
|
|
|
|
|
|
|
|
|
|
log.testOK(); /* We are done! */</script>
|
|
|
|
<active>true</active>
|
2009-02-04 17:53:16 +00:00
|
|
|
</plugin_config>
|
2009-06-24 14:42:50 +00:00
|
|
|
<width>604</width>
|
|
|
|
<z>0</z>
|
|
|
|
<height>409</height>
|
|
|
|
<location_x>246</location_x>
|
|
|
|
<location_y>0</location_y>
|
2009-02-04 17:53:16 +00:00
|
|
|
<minimized>false</minimized>
|
|
|
|
</plugin>
|
|
|
|
</simconf>
|
|
|
|
|