A set of RPL regression tests that the RPL network is able to survive the replacement of one node. The different tests test different placements of the moving node, with a varying number of hops from the root
This commit is contained in:
parent
4cfefe80e4
commit
2af2478166
362
regression-tests/12-rpl/08-rpl-dao-route-loss-0.csc
Normal file
362
regression-tests/12-rpl/08-rpl-dao-route-loss-0.csc
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<simconf>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||||
|
<simulation>
|
||||||
|
<title>My simulation</title>
|
||||||
|
<randomseed>123456</randomseed>
|
||||||
|
<motedelay_us>1000000</motedelay_us>
|
||||||
|
<radiomedium>
|
||||||
|
se.sics.cooja.radiomediums.UDGM
|
||||||
|
<transmitting_range>50.0</transmitting_range>
|
||||||
|
<interference_range>50.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>mtype921</identifier>
|
||||||
|
<description>Sender</description>
|
||||||
|
<source>[CONFIG_DIR]/code/sender-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make sender-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype873</identifier>
|
||||||
|
<description>RPL root</description>
|
||||||
|
<source>[CONFIG_DIR]/code/root-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make root-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype812</identifier>
|
||||||
|
<description>Receiver</description>
|
||||||
|
<source>[CONFIG_DIR]/code/receiver-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make receiver-node.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>-7.199692787830563</x>
|
||||||
|
<y>98.21738321803603</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>1</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype812</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>116.13379149678028</x>
|
||||||
|
<y>88.36698920455684</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>2</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype921</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>12.0</x>
|
||||||
|
<y>68.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>4</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype812</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>95.25095618820441</x>
|
||||||
|
<y>63.14998053005015</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>5</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype812</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>66.09378990830604</x>
|
||||||
|
<y>38.32698761608261</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>6</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype812</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>29.05630841762433</x>
|
||||||
|
<y>30.840688165838436</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>7</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype812</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>58.0</x>
|
||||||
|
<y>108.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>8</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype812</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>-40.352178879596096</x>
|
||||||
|
<y>102.66976131212861</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>3</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype873</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
</simulation>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.SimControl
|
||||||
|
<width>280</width>
|
||||||
|
<z>3</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>400</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Visualizer
|
||||||
|
<plugin_config>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||||
|
<viewport>1.6480321712565114 0.0 0.0 1.6480321712565114 98.5016889738719 55.796930342384904</viewport>
|
||||||
|
</plugin_config>
|
||||||
|
<width>400</width>
|
||||||
|
<z>0</z>
|
||||||
|
<height>400</height>
|
||||||
|
<location_x>1</location_x>
|
||||||
|
<location_y>1</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.LogListener
|
||||||
|
<plugin_config>
|
||||||
|
<filter />
|
||||||
|
<formatted_time />
|
||||||
|
<coloring />
|
||||||
|
</plugin_config>
|
||||||
|
<width>1184</width>
|
||||||
|
<z>2</z>
|
||||||
|
<height>500</height>
|
||||||
|
<location_x>402</location_x>
|
||||||
|
<location_y>162</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Notes
|
||||||
|
<plugin_config>
|
||||||
|
<notes>Enter notes here</notes>
|
||||||
|
<decorations>true</decorations>
|
||||||
|
</plugin_config>
|
||||||
|
<width>904</width>
|
||||||
|
<z>4</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>680</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
|
<plugin_config>
|
||||||
|
<script>GENERATE_MSG(0000000, "add-sink");
|
||||||
|
//GENERATE_MSG(1000000, "remove-sink");
|
||||||
|
//GENERATE_MSG(1020000, "add-sink");
|
||||||
|
GENERATE_MSG(000000, 'init-8-and-4');
|
||||||
|
GENERATE_MSG(600000, 'move-8-and-4');
|
||||||
|

|
||||||
|

|
||||||
|
lostMsgs = 0;
|
||||||
|
seenMsgs = 0;
|
||||||
|

|
||||||
|
TIMEOUT(2000000, if(seenMsgs > 15) { log.testOK(); } );
|
||||||
|

|
||||||
|
lastMsg = -1;
|
||||||
|
packets = "_________";
|
||||||
|
hops = 0;
|
||||||
|

|
||||||
|
while(true) {
|
||||||
|
YIELD();
|
||||||
|
if(msg.equals("remove-sink")) {
|
||||||
|
m = sim.getMoteWithID(3);
|
||||||
|
sim.removeMote(m);
|
||||||
|
log.log("removed sink\n");
|
||||||
|
} else if(msg.equals("add-sink")) {
|
||||||
|
if(!sim.getMoteWithID(3)) {
|
||||||
|
m = sim.getMoteTypes()[1].generateMote(sim);
|
||||||
|
m.getInterfaces().getMoteID().setMoteID(3);
|
||||||
|
sim.addMote(m);
|
||||||
|
log.log("added sink\n");
|
||||||
|
} else {
|
||||||
|
log.log("did not add sink as it was already there\n"); 
|
||||||
|
}
|
||||||
|
} else if(msg.equals("init-8-and-4")) { 
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.equals("move-8-and-4")) {
|
||||||
|
log.log('Moving nodes 8 and 4\n');
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.startsWith("Sending")) {
|
||||||
|
hops = 0;
|
||||||
|
} else if(msg.startsWith("#L")) {
|
||||||
|
hops++;
|
||||||
|
} else if(msg.startsWith("Data")) {
|
||||||
|
// log.log("" + msg + "\n"); 
|
||||||
|
data = msg.split(" ");
|
||||||
|
num = parseInt(data[14]);
|
||||||
|
packets = packets.substr(0, num) + "*";
|
||||||
|
log.log("" + hops + " " + packets + "\n");
|
||||||
|
seenMsgs++;
|
||||||
|
// log.log("Num " + num + "\n");
|
||||||
|
if(lastMsg != -1) {
|
||||||
|
if(num != lastMsg + 1) {
|
||||||
|
numMissed = num - lastMsg;
|
||||||
|
lostMsgs += numMissed;
|
||||||
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
|
for(i = 0; i < numMissed; i++) {
|
||||||
|
packets = packets.substr(0, lastMsg + i) + "_"; 
|
||||||
|
}
|
||||||
|
} 
|
||||||
|
}
|
||||||
|
lastMsg = num;
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
<active>true</active>
|
||||||
|
</plugin_config>
|
||||||
|
<width>612</width>
|
||||||
|
<z>1</z>
|
||||||
|
<height>726</height>
|
||||||
|
<location_x>953</location_x>
|
||||||
|
<location_y>43</location_y>
|
||||||
|
</plugin>
|
||||||
|
</simconf>
|
||||||
|
|
362
regression-tests/12-rpl/08-rpl-dao-route-loss-1.csc
Normal file
362
regression-tests/12-rpl/08-rpl-dao-route-loss-1.csc
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<simconf>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||||
|
<simulation>
|
||||||
|
<title>My simulation</title>
|
||||||
|
<randomseed>123456</randomseed>
|
||||||
|
<motedelay_us>1000000</motedelay_us>
|
||||||
|
<radiomedium>
|
||||||
|
se.sics.cooja.radiomediums.UDGM
|
||||||
|
<transmitting_range>50.0</transmitting_range>
|
||||||
|
<interference_range>50.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>mtype672</identifier>
|
||||||
|
<description>Sender</description>
|
||||||
|
<source>[CONFIG_DIR]/code/sender-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make sender-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype780</identifier>
|
||||||
|
<description>RPL root</description>
|
||||||
|
<source>[CONFIG_DIR]/code/root-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make root-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype36</identifier>
|
||||||
|
<description>Receiver</description>
|
||||||
|
<source>[CONFIG_DIR]/code/receiver-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make receiver-node.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>-7.199692787830563</x>
|
||||||
|
<y>98.21738321803603</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>1</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>116.13379149678028</x>
|
||||||
|
<y>88.36698920455684</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>2</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype672</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>12.0</x>
|
||||||
|
<y>68.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>4</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>95.25095618820441</x>
|
||||||
|
<y>63.14998053005015</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>5</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>66.09378990830604</x>
|
||||||
|
<y>38.32698761608261</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>6</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>29.05630841762433</x>
|
||||||
|
<y>30.840688165838436</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>7</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>58.0</x>
|
||||||
|
<y>108.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>8</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>-25.71843353317142</x>
|
||||||
|
<y>43.05517674255262</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>3</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype780</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
</simulation>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.SimControl
|
||||||
|
<width>280</width>
|
||||||
|
<z>3</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>400</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Visualizer
|
||||||
|
<plugin_config>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||||
|
<viewport>2.5379695437350276 0.0 0.0 2.5379695437350276 75.2726010197627 15.727272727272757</viewport>
|
||||||
|
</plugin_config>
|
||||||
|
<width>400</width>
|
||||||
|
<z>2</z>
|
||||||
|
<height>400</height>
|
||||||
|
<location_x>1</location_x>
|
||||||
|
<location_y>1</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.LogListener
|
||||||
|
<plugin_config>
|
||||||
|
<filter />
|
||||||
|
<formatted_time />
|
||||||
|
<coloring />
|
||||||
|
</plugin_config>
|
||||||
|
<width>1184</width>
|
||||||
|
<z>1</z>
|
||||||
|
<height>500</height>
|
||||||
|
<location_x>402</location_x>
|
||||||
|
<location_y>162</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Notes
|
||||||
|
<plugin_config>
|
||||||
|
<notes>Enter notes here</notes>
|
||||||
|
<decorations>true</decorations>
|
||||||
|
</plugin_config>
|
||||||
|
<width>904</width>
|
||||||
|
<z>4</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>680</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
|
<plugin_config>
|
||||||
|
<script>GENERATE_MSG(0000000, "add-sink");
|
||||||
|
//GENERATE_MSG(1000000, "remove-sink");
|
||||||
|
//GENERATE_MSG(1020000, "add-sink");
|
||||||
|
GENERATE_MSG(000000, 'init-8-and-4');
|
||||||
|
GENERATE_MSG(600000, 'move-8-and-4');
|
||||||
|

|
||||||
|

|
||||||
|
lostMsgs = 0;
|
||||||
|
seenMsgs = 0;
|
||||||
|

|
||||||
|
TIMEOUT(2000000, if(seenMsgs > 15) { log.testOK(); } );
|
||||||
|

|
||||||
|
lastMsg = -1;
|
||||||
|
packets = "_________";
|
||||||
|
hops = 0;
|
||||||
|

|
||||||
|
while(true) {
|
||||||
|
YIELD();
|
||||||
|
if(msg.equals("remove-sink")) {
|
||||||
|
m = sim.getMoteWithID(3);
|
||||||
|
sim.removeMote(m);
|
||||||
|
log.log("removed sink\n");
|
||||||
|
} else if(msg.equals("add-sink")) {
|
||||||
|
if(!sim.getMoteWithID(3)) {
|
||||||
|
m = sim.getMoteTypes()[1].generateMote(sim);
|
||||||
|
m.getInterfaces().getMoteID().setMoteID(3);
|
||||||
|
sim.addMote(m);
|
||||||
|
log.log("added sink\n");
|
||||||
|
} else {
|
||||||
|
log.log("did not add sink as it was already there\n"); 
|
||||||
|
}
|
||||||
|
} else if(msg.equals("init-8-and-4")) { 
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.equals("move-8-and-4")) {
|
||||||
|
log.log('Moving nodes 8 and 4\n');
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.startsWith("Sending")) {
|
||||||
|
hops = 0;
|
||||||
|
} else if(msg.startsWith("#L")) {
|
||||||
|
hops++;
|
||||||
|
} else if(msg.startsWith("Data")) {
|
||||||
|
// log.log("" + msg + "\n"); 
|
||||||
|
data = msg.split(" ");
|
||||||
|
num = parseInt(data[14]);
|
||||||
|
packets = packets.substr(0, num) + "*";
|
||||||
|
log.log("" + hops + " " + packets + "\n");
|
||||||
|
seenMsgs++;
|
||||||
|
// log.log("Num " + num + "\n");
|
||||||
|
if(lastMsg != -1) {
|
||||||
|
if(num != lastMsg + 1) {
|
||||||
|
numMissed = num - lastMsg;
|
||||||
|
lostMsgs += numMissed;
|
||||||
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
|
for(i = 0; i < numMissed; i++) {
|
||||||
|
packets = packets.substr(0, lastMsg + i) + "_"; 
|
||||||
|
}
|
||||||
|
} 
|
||||||
|
}
|
||||||
|
lastMsg = num;
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
<active>true</active>
|
||||||
|
</plugin_config>
|
||||||
|
<width>612</width>
|
||||||
|
<z>0</z>
|
||||||
|
<height>726</height>
|
||||||
|
<location_x>953</location_x>
|
||||||
|
<location_y>43</location_y>
|
||||||
|
</plugin>
|
||||||
|
</simconf>
|
||||||
|
|
362
regression-tests/12-rpl/08-rpl-dao-route-loss-2.csc
Normal file
362
regression-tests/12-rpl/08-rpl-dao-route-loss-2.csc
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<simconf>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||||
|
<simulation>
|
||||||
|
<title>My simulation</title>
|
||||||
|
<randomseed>123456</randomseed>
|
||||||
|
<motedelay_us>1000000</motedelay_us>
|
||||||
|
<radiomedium>
|
||||||
|
se.sics.cooja.radiomediums.UDGM
|
||||||
|
<transmitting_range>50.0</transmitting_range>
|
||||||
|
<interference_range>50.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>mtype672</identifier>
|
||||||
|
<description>Sender</description>
|
||||||
|
<source>[CONFIG_DIR]/code/sender-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make sender-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype780</identifier>
|
||||||
|
<description>RPL root</description>
|
||||||
|
<source>[CONFIG_DIR]/code/root-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make root-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype36</identifier>
|
||||||
|
<description>Receiver</description>
|
||||||
|
<source>[CONFIG_DIR]/code/receiver-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make receiver-node.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>-7.199692787830563</x>
|
||||||
|
<y>98.21738321803603</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>1</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>116.13379149678028</x>
|
||||||
|
<y>88.36698920455684</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>2</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype672</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>12.0</x>
|
||||||
|
<y>68.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>4</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>95.25095618820441</x>
|
||||||
|
<y>63.14998053005015</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>5</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>66.09378990830604</x>
|
||||||
|
<y>38.32698761608261</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>6</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>29.05630841762433</x>
|
||||||
|
<y>30.840688165838436</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>7</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>58.0</x>
|
||||||
|
<y>108.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>8</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>16.0472370839803</x>
|
||||||
|
<y>6.017695251870905</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>3</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype780</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
</simulation>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.SimControl
|
||||||
|
<width>280</width>
|
||||||
|
<z>3</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>400</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Visualizer
|
||||||
|
<plugin_config>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||||
|
<viewport>2.5379695437350276 0.0 0.0 2.5379695437350276 75.2726010197627 15.727272727272757</viewport>
|
||||||
|
</plugin_config>
|
||||||
|
<width>400</width>
|
||||||
|
<z>0</z>
|
||||||
|
<height>400</height>
|
||||||
|
<location_x>1</location_x>
|
||||||
|
<location_y>1</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.LogListener
|
||||||
|
<plugin_config>
|
||||||
|
<filter />
|
||||||
|
<formatted_time />
|
||||||
|
<coloring />
|
||||||
|
</plugin_config>
|
||||||
|
<width>1184</width>
|
||||||
|
<z>2</z>
|
||||||
|
<height>500</height>
|
||||||
|
<location_x>402</location_x>
|
||||||
|
<location_y>162</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Notes
|
||||||
|
<plugin_config>
|
||||||
|
<notes>Enter notes here</notes>
|
||||||
|
<decorations>true</decorations>
|
||||||
|
</plugin_config>
|
||||||
|
<width>904</width>
|
||||||
|
<z>4</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>680</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
|
<plugin_config>
|
||||||
|
<script>GENERATE_MSG(0000000, "add-sink");
|
||||||
|
//GENERATE_MSG(1000000, "remove-sink");
|
||||||
|
//GENERATE_MSG(1020000, "add-sink");
|
||||||
|
GENERATE_MSG(000000, 'init-8-and-4');
|
||||||
|
GENERATE_MSG(600000, 'move-8-and-4');
|
||||||
|

|
||||||
|

|
||||||
|
lostMsgs = 0;
|
||||||
|
seenMsgs = 0;
|
||||||
|

|
||||||
|
TIMEOUT(2000000, if(seenMsgs > 15) { log.testOK(); } );
|
||||||
|

|
||||||
|
lastMsg = -1;
|
||||||
|
packets = "_________";
|
||||||
|
hops = 0;
|
||||||
|

|
||||||
|
while(true) {
|
||||||
|
YIELD();
|
||||||
|
if(msg.equals("remove-sink")) {
|
||||||
|
m = sim.getMoteWithID(3);
|
||||||
|
sim.removeMote(m);
|
||||||
|
log.log("removed sink\n");
|
||||||
|
} else if(msg.equals("add-sink")) {
|
||||||
|
if(!sim.getMoteWithID(3)) {
|
||||||
|
m = sim.getMoteTypes()[1].generateMote(sim);
|
||||||
|
m.getInterfaces().getMoteID().setMoteID(3);
|
||||||
|
sim.addMote(m);
|
||||||
|
log.log("added sink\n");
|
||||||
|
} else {
|
||||||
|
log.log("did not add sink as it was already there\n"); 
|
||||||
|
}
|
||||||
|
} else if(msg.equals("init-8-and-4")) { 
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.equals("move-8-and-4")) {
|
||||||
|
log.log('Moving nodes 8 and 4\n');
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.startsWith("Sending")) {
|
||||||
|
hops = 0;
|
||||||
|
} else if(msg.startsWith("#L")) {
|
||||||
|
hops++;
|
||||||
|
} else if(msg.startsWith("Data")) {
|
||||||
|
// log.log("" + msg + "\n"); 
|
||||||
|
data = msg.split(" ");
|
||||||
|
num = parseInt(data[14]);
|
||||||
|
packets = packets.substr(0, num) + "*";
|
||||||
|
log.log("" + hops + " " + packets + "\n");
|
||||||
|
seenMsgs++;
|
||||||
|
// log.log("Num " + num + "\n");
|
||||||
|
if(lastMsg != -1) {
|
||||||
|
if(num != lastMsg + 1) {
|
||||||
|
numMissed = num - lastMsg;
|
||||||
|
lostMsgs += numMissed;
|
||||||
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
|
for(i = 0; i < numMissed; i++) {
|
||||||
|
packets = packets.substr(0, lastMsg + i) + "_"; 
|
||||||
|
}
|
||||||
|
} 
|
||||||
|
}
|
||||||
|
lastMsg = num;
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
<active>true</active>
|
||||||
|
</plugin_config>
|
||||||
|
<width>612</width>
|
||||||
|
<z>1</z>
|
||||||
|
<height>726</height>
|
||||||
|
<location_x>953</location_x>
|
||||||
|
<location_y>43</location_y>
|
||||||
|
</plugin>
|
||||||
|
</simconf>
|
||||||
|
|
362
regression-tests/12-rpl/08-rpl-dao-route-loss-3.csc
Normal file
362
regression-tests/12-rpl/08-rpl-dao-route-loss-3.csc
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<simconf>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||||
|
<simulation>
|
||||||
|
<title>My simulation</title>
|
||||||
|
<randomseed>123456</randomseed>
|
||||||
|
<motedelay_us>1000000</motedelay_us>
|
||||||
|
<radiomedium>
|
||||||
|
se.sics.cooja.radiomediums.UDGM
|
||||||
|
<transmitting_range>50.0</transmitting_range>
|
||||||
|
<interference_range>50.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>mtype672</identifier>
|
||||||
|
<description>Sender</description>
|
||||||
|
<source>[CONFIG_DIR]/code/sender-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make sender-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype780</identifier>
|
||||||
|
<description>RPL root</description>
|
||||||
|
<source>[CONFIG_DIR]/code/root-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make root-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype36</identifier>
|
||||||
|
<description>Receiver</description>
|
||||||
|
<source>[CONFIG_DIR]/code/receiver-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make receiver-node.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>-7.199692787830563</x>
|
||||||
|
<y>98.21738321803603</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>1</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>116.13379149678028</x>
|
||||||
|
<y>88.36698920455684</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>2</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype672</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>12.0</x>
|
||||||
|
<y>68.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>4</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>95.25095618820441</x>
|
||||||
|
<y>63.14998053005015</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>5</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>66.09378990830604</x>
|
||||||
|
<y>38.32698761608261</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>6</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>29.05630841762433</x>
|
||||||
|
<y>30.840688165838436</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>7</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>58.0</x>
|
||||||
|
<y>108.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>8</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype36</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>79.48377453078622</x>
|
||||||
|
<y>4.835647970253402</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>3</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype780</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
</simulation>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.SimControl
|
||||||
|
<width>280</width>
|
||||||
|
<z>3</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>400</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Visualizer
|
||||||
|
<plugin_config>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||||
|
<viewport>2.5379695437350276 0.0 0.0 2.5379695437350276 70.27260101976269 60.72727272727276</viewport>
|
||||||
|
</plugin_config>
|
||||||
|
<width>400</width>
|
||||||
|
<z>0</z>
|
||||||
|
<height>400</height>
|
||||||
|
<location_x>1</location_x>
|
||||||
|
<location_y>1</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.LogListener
|
||||||
|
<plugin_config>
|
||||||
|
<filter />
|
||||||
|
<formatted_time />
|
||||||
|
<coloring />
|
||||||
|
</plugin_config>
|
||||||
|
<width>1184</width>
|
||||||
|
<z>2</z>
|
||||||
|
<height>500</height>
|
||||||
|
<location_x>402</location_x>
|
||||||
|
<location_y>162</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Notes
|
||||||
|
<plugin_config>
|
||||||
|
<notes>Enter notes here</notes>
|
||||||
|
<decorations>true</decorations>
|
||||||
|
</plugin_config>
|
||||||
|
<width>904</width>
|
||||||
|
<z>4</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>680</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
|
<plugin_config>
|
||||||
|
<script>GENERATE_MSG(0000000, "add-sink");
|
||||||
|
//GENERATE_MSG(1000000, "remove-sink");
|
||||||
|
//GENERATE_MSG(1020000, "add-sink");
|
||||||
|
GENERATE_MSG(000000, 'init-8-and-4');
|
||||||
|
GENERATE_MSG(600000, 'move-8-and-4');
|
||||||
|

|
||||||
|

|
||||||
|
lostMsgs = 0;
|
||||||
|
seenMsgs = 0;
|
||||||
|

|
||||||
|
TIMEOUT(2000000, if(seenMsgs > 15) { log.testOK(); } );
|
||||||
|

|
||||||
|
lastMsg = -1;
|
||||||
|
packets = "_________";
|
||||||
|
hops = 0;
|
||||||
|

|
||||||
|
while(true) {
|
||||||
|
YIELD();
|
||||||
|
if(msg.equals("remove-sink")) {
|
||||||
|
m = sim.getMoteWithID(3);
|
||||||
|
sim.removeMote(m);
|
||||||
|
log.log("removed sink\n");
|
||||||
|
} else if(msg.equals("add-sink")) {
|
||||||
|
if(!sim.getMoteWithID(3)) {
|
||||||
|
m = sim.getMoteTypes()[1].generateMote(sim);
|
||||||
|
m.getInterfaces().getMoteID().setMoteID(3);
|
||||||
|
sim.addMote(m);
|
||||||
|
log.log("added sink\n");
|
||||||
|
} else {
|
||||||
|
log.log("did not add sink as it was already there\n"); 
|
||||||
|
}
|
||||||
|
} else if(msg.equals("init-8-and-4")) { 
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.equals("move-8-and-4")) {
|
||||||
|
log.log('Moving nodes 8 and 4\n');
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.startsWith("Sending")) {
|
||||||
|
hops = 0;
|
||||||
|
} else if(msg.startsWith("#L")) {
|
||||||
|
hops++;
|
||||||
|
} else if(msg.startsWith("Data")) {
|
||||||
|
// log.log("" + msg + "\n"); 
|
||||||
|
data = msg.split(" ");
|
||||||
|
num = parseInt(data[14]);
|
||||||
|
packets = packets.substr(0, num) + "*";
|
||||||
|
log.log("" + hops + " " + packets + "\n");
|
||||||
|
seenMsgs++;
|
||||||
|
// log.log("Num " + num + "\n");
|
||||||
|
if(lastMsg != -1) {
|
||||||
|
if(num != lastMsg + 1) {
|
||||||
|
numMissed = num - lastMsg;
|
||||||
|
lostMsgs += numMissed;
|
||||||
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
|
for(i = 0; i < numMissed; i++) {
|
||||||
|
packets = packets.substr(0, lastMsg + i) + "_"; 
|
||||||
|
}
|
||||||
|
} 
|
||||||
|
}
|
||||||
|
lastMsg = num;
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
<active>true</active>
|
||||||
|
</plugin_config>
|
||||||
|
<width>612</width>
|
||||||
|
<z>1</z>
|
||||||
|
<height>726</height>
|
||||||
|
<location_x>953</location_x>
|
||||||
|
<location_y>43</location_y>
|
||||||
|
</plugin>
|
||||||
|
</simconf>
|
||||||
|
|
362
regression-tests/12-rpl/08-rpl-dao-route-loss-4.csc
Normal file
362
regression-tests/12-rpl/08-rpl-dao-route-loss-4.csc
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<simconf>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||||
|
<simulation>
|
||||||
|
<title>My simulation</title>
|
||||||
|
<randomseed>123456</randomseed>
|
||||||
|
<motedelay_us>1000000</motedelay_us>
|
||||||
|
<radiomedium>
|
||||||
|
se.sics.cooja.radiomediums.UDGM
|
||||||
|
<transmitting_range>50.0</transmitting_range>
|
||||||
|
<interference_range>50.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>mtype192</identifier>
|
||||||
|
<description>Sender</description>
|
||||||
|
<source>[CONFIG_DIR]/code/sender-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make sender-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype575</identifier>
|
||||||
|
<description>RPL root</description>
|
||||||
|
<source>[CONFIG_DIR]/code/root-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make root-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype912</identifier>
|
||||||
|
<description>Receiver</description>
|
||||||
|
<source>[CONFIG_DIR]/code/receiver-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make receiver-node.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>-7.199692787830563</x>
|
||||||
|
<y>98.21738321803603</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>1</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype912</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>116.13379149678028</x>
|
||||||
|
<y>88.36698920455684</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>2</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype192</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>12.0</x>
|
||||||
|
<y>68.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>4</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype912</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>95.25095618820441</x>
|
||||||
|
<y>63.14998053005015</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>5</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype912</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>66.09378990830604</x>
|
||||||
|
<y>38.32698761608261</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>6</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype912</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>29.05630841762433</x>
|
||||||
|
<y>30.840688165838436</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>7</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype912</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>58.0</x>
|
||||||
|
<y>108.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>8</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype912</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>122.82550819009461</x>
|
||||||
|
<y>29.658640884220933</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>3</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype575</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
</simulation>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.SimControl
|
||||||
|
<width>280</width>
|
||||||
|
<z>3</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>400</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Visualizer
|
||||||
|
<plugin_config>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||||
|
<viewport>2.5379695437350276 0.0 0.0 2.5379695437350276 70.27260101976269 60.72727272727276</viewport>
|
||||||
|
</plugin_config>
|
||||||
|
<width>400</width>
|
||||||
|
<z>0</z>
|
||||||
|
<height>400</height>
|
||||||
|
<location_x>1</location_x>
|
||||||
|
<location_y>1</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.LogListener
|
||||||
|
<plugin_config>
|
||||||
|
<filter />
|
||||||
|
<formatted_time />
|
||||||
|
<coloring />
|
||||||
|
</plugin_config>
|
||||||
|
<width>1184</width>
|
||||||
|
<z>2</z>
|
||||||
|
<height>500</height>
|
||||||
|
<location_x>402</location_x>
|
||||||
|
<location_y>162</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Notes
|
||||||
|
<plugin_config>
|
||||||
|
<notes>Enter notes here</notes>
|
||||||
|
<decorations>true</decorations>
|
||||||
|
</plugin_config>
|
||||||
|
<width>904</width>
|
||||||
|
<z>4</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>680</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
|
<plugin_config>
|
||||||
|
<script>GENERATE_MSG(0000000, "add-sink");
|
||||||
|
//GENERATE_MSG(1000000, "remove-sink");
|
||||||
|
//GENERATE_MSG(1020000, "add-sink");
|
||||||
|
GENERATE_MSG(000000, 'init-8-and-4');
|
||||||
|
GENERATE_MSG(600000, 'move-8-and-4');
|
||||||
|

|
||||||
|

|
||||||
|
lostMsgs = 0;
|
||||||
|
seenMsgs = 0;
|
||||||
|

|
||||||
|
TIMEOUT(2000000, if(seenMsgs > 15) { log.testOK(); } );
|
||||||
|

|
||||||
|
lastMsg = -1;
|
||||||
|
packets = "_________";
|
||||||
|
hops = 0;
|
||||||
|

|
||||||
|
while(true) {
|
||||||
|
YIELD();
|
||||||
|
if(msg.equals("remove-sink")) {
|
||||||
|
m = sim.getMoteWithID(3);
|
||||||
|
sim.removeMote(m);
|
||||||
|
log.log("removed sink\n");
|
||||||
|
} else if(msg.equals("add-sink")) {
|
||||||
|
if(!sim.getMoteWithID(3)) {
|
||||||
|
m = sim.getMoteTypes()[1].generateMote(sim);
|
||||||
|
m.getInterfaces().getMoteID().setMoteID(3);
|
||||||
|
sim.addMote(m);
|
||||||
|
log.log("added sink\n");
|
||||||
|
} else {
|
||||||
|
log.log("did not add sink as it was already there\n"); 
|
||||||
|
}
|
||||||
|
} else if(msg.equals("init-8-and-4")) { 
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.equals("move-8-and-4")) {
|
||||||
|
log.log('Moving nodes 8 and 4\n');
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.startsWith("Sending")) {
|
||||||
|
hops = 0;
|
||||||
|
} else if(msg.startsWith("#L")) {
|
||||||
|
hops++;
|
||||||
|
} else if(msg.startsWith("Data")) {
|
||||||
|
// log.log("" + msg + "\n"); 
|
||||||
|
data = msg.split(" ");
|
||||||
|
num = parseInt(data[14]);
|
||||||
|
packets = packets.substr(0, num) + "*";
|
||||||
|
log.log("" + hops + " " + packets + "\n");
|
||||||
|
seenMsgs++;
|
||||||
|
// log.log("Num " + num + "\n");
|
||||||
|
if(lastMsg != -1) {
|
||||||
|
if(num != lastMsg + 1) {
|
||||||
|
numMissed = num - lastMsg;
|
||||||
|
lostMsgs += numMissed;
|
||||||
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
|
for(i = 0; i < numMissed; i++) {
|
||||||
|
packets = packets.substr(0, lastMsg + i) + "_"; 
|
||||||
|
}
|
||||||
|
} 
|
||||||
|
}
|
||||||
|
lastMsg = num;
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
<active>true</active>
|
||||||
|
</plugin_config>
|
||||||
|
<width>612</width>
|
||||||
|
<z>1</z>
|
||||||
|
<height>726</height>
|
||||||
|
<location_x>953</location_x>
|
||||||
|
<location_y>43</location_y>
|
||||||
|
</plugin>
|
||||||
|
</simconf>
|
||||||
|
|
362
regression-tests/12-rpl/08-rpl-dao-route-loss-5.csc
Normal file
362
regression-tests/12-rpl/08-rpl-dao-route-loss-5.csc
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<simconf>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mrm</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/mspsim</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/avrora</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/serial_socket</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/collect-view</project>
|
||||||
|
<project EXPORT="discard">[APPS_DIR]/powertracker</project>
|
||||||
|
<simulation>
|
||||||
|
<title>My simulation</title>
|
||||||
|
<randomseed>123456</randomseed>
|
||||||
|
<motedelay_us>1000000</motedelay_us>
|
||||||
|
<radiomedium>
|
||||||
|
se.sics.cooja.radiomediums.UDGM
|
||||||
|
<transmitting_range>50.0</transmitting_range>
|
||||||
|
<interference_range>50.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>mtype372</identifier>
|
||||||
|
<description>Sender</description>
|
||||||
|
<source>[CONFIG_DIR]/code/sender-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make sender-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype229</identifier>
|
||||||
|
<description>RPL root</description>
|
||||||
|
<source>[CONFIG_DIR]/code/root-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make root-node.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>
|
||||||
|
<motetype>
|
||||||
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
|
<identifier>mtype424</identifier>
|
||||||
|
<description>Receiver</description>
|
||||||
|
<source>[CONFIG_DIR]/code/receiver-node.c</source>
|
||||||
|
<commands>make clean TARGET=cooja
|
||||||
|
make receiver-node.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>-7.199692787830563</x>
|
||||||
|
<y>98.21738321803603</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>1</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype424</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>116.13379149678028</x>
|
||||||
|
<y>88.36698920455684</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>2</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype372</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>12.0</x>
|
||||||
|
<y>68.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>4</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype424</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>95.25095618820441</x>
|
||||||
|
<y>63.14998053005015</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>5</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype424</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>66.09378990830604</x>
|
||||||
|
<y>38.32698761608261</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>6</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype424</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>29.05630841762433</x>
|
||||||
|
<y>30.840688165838436</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>7</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype424</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>58.0</x>
|
||||||
|
<y>108.0</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>8</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype424</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
<mote>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Position
|
||||||
|
<x>145.93059238811136</x>
|
||||||
|
<y>111.16474110935306</y>
|
||||||
|
<z>0.0</z>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
|
<id>3</id>
|
||||||
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.contikimote.interfaces.ContikiRadio
|
||||||
|
<bitrate>250.0</bitrate>
|
||||||
|
</interface_config>
|
||||||
|
<motetype_identifier>mtype229</motetype_identifier>
|
||||||
|
</mote>
|
||||||
|
</simulation>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.SimControl
|
||||||
|
<width>280</width>
|
||||||
|
<z>3</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>400</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Visualizer
|
||||||
|
<plugin_config>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.IDVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.GridVisualizerSkin</skin>
|
||||||
|
<skin>se.sics.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
||||||
|
<viewport>1.6480321712565114 0.0 0.0 1.6480321712565114 98.5016889738719 55.796930342384904</viewport>
|
||||||
|
</plugin_config>
|
||||||
|
<width>400</width>
|
||||||
|
<z>0</z>
|
||||||
|
<height>400</height>
|
||||||
|
<location_x>1</location_x>
|
||||||
|
<location_y>1</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.LogListener
|
||||||
|
<plugin_config>
|
||||||
|
<filter />
|
||||||
|
<formatted_time />
|
||||||
|
<coloring />
|
||||||
|
</plugin_config>
|
||||||
|
<width>1184</width>
|
||||||
|
<z>2</z>
|
||||||
|
<height>500</height>
|
||||||
|
<location_x>402</location_x>
|
||||||
|
<location_y>162</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.Notes
|
||||||
|
<plugin_config>
|
||||||
|
<notes>Enter notes here</notes>
|
||||||
|
<decorations>true</decorations>
|
||||||
|
</plugin_config>
|
||||||
|
<width>904</width>
|
||||||
|
<z>4</z>
|
||||||
|
<height>160</height>
|
||||||
|
<location_x>680</location_x>
|
||||||
|
<location_y>0</location_y>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
se.sics.cooja.plugins.ScriptRunner
|
||||||
|
<plugin_config>
|
||||||
|
<script>GENERATE_MSG(0000000, "add-sink");
|
||||||
|
//GENERATE_MSG(1000000, "remove-sink");
|
||||||
|
//GENERATE_MSG(1020000, "add-sink");
|
||||||
|
GENERATE_MSG(000000, 'init-8-and-4');
|
||||||
|
GENERATE_MSG(600000, 'move-8-and-4');
|
||||||
|

|
||||||
|

|
||||||
|
lostMsgs = 0;
|
||||||
|
seenMsgs = 0;
|
||||||
|

|
||||||
|
TIMEOUT(2000000, if(seenMsgs > 15) { log.testOK(); } );
|
||||||
|

|
||||||
|
lastMsg = -1;
|
||||||
|
packets = "_________";
|
||||||
|
hops = 0;
|
||||||
|

|
||||||
|
while(true) {
|
||||||
|
YIELD();
|
||||||
|
if(msg.equals("remove-sink")) {
|
||||||
|
m = sim.getMoteWithID(3);
|
||||||
|
sim.removeMote(m);
|
||||||
|
log.log("removed sink\n");
|
||||||
|
} else if(msg.equals("add-sink")) {
|
||||||
|
if(!sim.getMoteWithID(3)) {
|
||||||
|
m = sim.getMoteTypes()[1].generateMote(sim);
|
||||||
|
m.getInterfaces().getMoteID().setMoteID(3);
|
||||||
|
sim.addMote(m);
|
||||||
|
log.log("added sink\n");
|
||||||
|
} else {
|
||||||
|
log.log("did not add sink as it was already there\n"); 
|
||||||
|
}
|
||||||
|
} else if(msg.equals("init-8-and-4")) { 
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.equals("move-8-and-4")) {
|
||||||
|
log.log('Moving nodes 8 and 4\n');
|
||||||
|
var node4 = sim.getMoteWithID(4);
|
||||||
|
var node8 = sim.getMoteWithID(8);
|
||||||
|
node4.getInterfaces().getPosition().setCoordinates(12, 68, 0);
|
||||||
|
node8.getInterfaces().getPosition().setCoordinates(58, 108, 0);
|
||||||
|
} else if(msg.startsWith("Sending")) {
|
||||||
|
hops = 0;
|
||||||
|
} else if(msg.startsWith("#L")) {
|
||||||
|
hops++;
|
||||||
|
} else if(msg.startsWith("Data")) {
|
||||||
|
// log.log("" + msg + "\n"); 
|
||||||
|
data = msg.split(" ");
|
||||||
|
num = parseInt(data[14]);
|
||||||
|
packets = packets.substr(0, num) + "*";
|
||||||
|
log.log("" + hops + " " + packets + "\n");
|
||||||
|
seenMsgs++;
|
||||||
|
// log.log("Num " + num + "\n");
|
||||||
|
if(lastMsg != -1) {
|
||||||
|
if(num != lastMsg + 1) {
|
||||||
|
numMissed = num - lastMsg;
|
||||||
|
lostMsgs += numMissed;
|
||||||
|
log.log("Missed messages " + numMissed + " before " + num + "\n"); 
|
||||||
|
for(i = 0; i < numMissed; i++) {
|
||||||
|
packets = packets.substr(0, lastMsg + i) + "_"; 
|
||||||
|
}
|
||||||
|
} 
|
||||||
|
}
|
||||||
|
lastMsg = num;
|
||||||
|
}
|
||||||
|
}</script>
|
||||||
|
<active>true</active>
|
||||||
|
</plugin_config>
|
||||||
|
<width>612</width>
|
||||||
|
<z>1</z>
|
||||||
|
<height>726</height>
|
||||||
|
<location_x>953</location_x>
|
||||||
|
<location_y>43</location_y>
|
||||||
|
</plugin>
|
||||||
|
</simconf>
|
||||||
|
|
Loading…
Reference in a new issue