1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <project>../apps/mrm
</project>
4 <project>../apps/mspsim
</project>
5 <project>../apps/avrora
</project>
6 <project>../apps/native_gateway
</project>
8 <title>My simulation
</title>
9 <delaytime>0</delaytime>
10 <randomseed>generated
</randomseed>
11 <motedelay_us>1000000</motedelay_us>
13 se.sics.cooja.radiomediums.UDGM
14 <transmitting_range>50.0</transmitting_range>
15 <interference_range>100.0</interference_range>
16 <success_ratio_tx>1.0</success_ratio_tx>
17 <success_ratio_rx>1.0</success_ratio_rx>
20 se.sics.cooja.mspmote.SkyMoteType
21 <identifier>sky1
</identifier>
22 <description>Sky Mote Type #
1</description>
23 <source>../../../examples/sky-shell/sky-checkpoint.c
</source>
24 <commands>make clean TARGET=sky
25 make sky-checkpoint.sky TARGET=sky
</commands>
26 <firmware>../../../examples/sky-shell/sky-checkpoint.sky
</firmware>
27 <moteinterface>se.sics.cooja.interfaces.Position
</moteinterface>
28 <moteinterface>se.sics.cooja.interfaces.IPAddress
</moteinterface>
29 <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations
</moteinterface>
30 <moteinterface>se.sics.cooja.mspmote.interfaces.MspClock
</moteinterface>
31 <moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID
</moteinterface>
32 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton
</moteinterface>
33 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash
</moteinterface>
34 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio
</moteinterface>
35 <moteinterface>se.sics.cooja.mspmote.interfaces.SkySerial
</moteinterface>
36 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED
</moteinterface>
39 se.sics.cooja.mspmote.SkyMote
40 <motetype_identifier>sky1
</motetype_identifier>
43 se.sics.cooja.interfaces.Position
44 <x>3.537694077190867</x>
45 <y>25.877706916818877</y>
49 se.sics.cooja.mspmote.interfaces.MspMoteID
55 se.sics.cooja.plugins.SimControl
59 <location_x>0</location_x>
60 <location_y>0</location_y>
61 <minimized>false
</minimized>
64 se.sics.cooja.plugins.Visualizer
67 <skin>Radio environment (UDGM)
</skin>
72 <location_x>2</location_x>
73 <location_y>199</location_y>
74 <minimized>false
</minimized>
77 se.sics.cooja.plugins.LogListener
84 <location_x>0</location_x>
85 <location_y>409</location_y>
86 <minimized>false
</minimized>
89 se.sics.cooja.plugins.ScriptRunner
91 <script>TIMEOUT(
360000, log.log(
"timeout at phase " + phase +
". last message: " + msg +
"\n"));
94 /* Wait until node has booted */
95 WAIT_UNTIL(msg.startsWith('Starting'));
96 log.log(
"Shell started\n");
99 /*
1. BACKGROUND PROCESS - NO CHECKPOINTING */
100 write(mote,
"repeat 10 1 echo bg process &\n");
101 log.log(
"Starting background process without checkpointing\n");
103 while (expected
> 0) {
104 YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
108 /* Make sure background process has exited */
109 GENERATE_MSG(
3000,
"continue");
110 while (!msg.contains('continue')) {
112 if (msg.contains('bg process')) {
113 log.log(
"Too many bg messages at phase: " + phase +
"\n");
114 log.testFailed(); /* We are done! */
115 while (true) YIELD();
118 log.log(
"Background process without checkpointing done\n\n");
121 /*
2. BACKGROUND PROCESS - CHECKPOINTING EVERY SECOND */
122 write(mote,
"repeat 10 1 echo bg process &\n");
123 log.log(
"Starting background process with periodic checkpointing\n");
125 while (expected
> 0) {
126 YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
128 write(mote,
"checkpoint file" + expected +
"\n");
129 log.log(
"> checkpoint file" + expected +
"\n");
132 /* Make sure background process has exited */
133 GENERATE_MSG(
3000,
"continue");
134 while (!msg.contains('continue')) {
136 if (msg.contains('bg process')) {
137 log.log(
"Too many bg messages at phase: " + phase +
"\n");
138 log.testFailed(); /* We are done! */
139 while (true) YIELD();
142 log.log(
"Background process with periodic checkpointing done\n\n");
145 /*
3. LIST ALL FILES */
147 YIELD_THEN_WAIT_UNTIL(msg.contains('file9'));
148 YIELD_THEN_WAIT_UNTIL(msg.contains('file8'));
149 YIELD_THEN_WAIT_UNTIL(msg.contains('file7'));
150 YIELD_THEN_WAIT_UNTIL(msg.contains('file6'));
151 YIELD_THEN_WAIT_UNTIL(msg.contains('file5'));
152 YIELD_THEN_WAIT_UNTIL(msg.contains('file4'));
153 YIELD_THEN_WAIT_UNTIL(msg.contains('file3'));
154 YIELD_THEN_WAIT_UNTIL(msg.contains('file2'));
155 YIELD_THEN_WAIT_UNTIL(msg.contains('file1'));
156 YIELD_THEN_WAIT_UNTIL(msg.contains('file0'));
157 GENERATE_MSG(
1000,
"continue");
158 YIELD_THEN_WAIT_UNTIL(msg.contains('continue'));
159 log.log(
"All checkpoints are stored in the filesystem\n\n");
162 /*
4. ROLLBACK TO RESTORE BACKGROUND PROCESS */
163 write(mote,
"rollback file7");
164 log.log(
"Rolling back background process at count 7\n");
166 while (expected
> 0) {
167 YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
171 /* Make sure background process has exited */
172 GENERATE_MSG(
3000,
"continue");
173 while (!msg.contains('continue')) {
175 if (msg.contains('bg process')) {
176 log.log(
"Too many bg messages at phase: " + phase +
"\n");
177 log.testFailed(); /* We are done! */
178 while (true) YIELD();
181 log.log(
"Background process was rolled back successfully\n\n");
185 log.testOK(); /* We are done! */
</script>
186 <active>true
</active>
191 <location_x>246</location_x>
192 <location_y>0</location_y>
193 <minimized>false
</minimized>