2013-08-11 20:47:06 +00:00
|
|
|
<?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>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.radiomediums.UDGM
|
2013-08-11 20:47:06 +00:00
|
|
|
<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>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.ContikiMoteType
|
2013-08-11 20:47:06 +00:00
|
|
|
<identifier>mtype743</identifier>
|
|
|
|
<description>Sender</description>
|
|
|
|
<source>[CONFIG_DIR]/code/sender-node.c</source>
|
|
|
|
<commands>make clean TARGET=cooja
|
|
|
|
make sender-node.cooja TARGET=cooja</commands>
|
2013-11-19 11:17:37 +00:00
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
2013-08-11 20:47:06 +00:00
|
|
|
<symbols>false</symbols>
|
|
|
|
</motetype>
|
|
|
|
<motetype>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.ContikiMoteType
|
2013-08-11 20:47:06 +00:00
|
|
|
<identifier>mtype452</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>
|
2013-11-19 11:17:37 +00:00
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
2013-08-11 20:47:06 +00:00
|
|
|
<symbols>false</symbols>
|
|
|
|
</motetype>
|
|
|
|
<motetype>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.ContikiMoteType
|
2013-08-11 20:47:06 +00:00
|
|
|
<identifier>mtype782</identifier>
|
|
|
|
<description>Receiver</description>
|
|
|
|
<source>[CONFIG_DIR]/code/receiver-node.c</source>
|
|
|
|
<commands>make clean TARGET=cooja
|
|
|
|
make receiver-node.cooja TARGET=cooja</commands>
|
2013-11-19 11:17:37 +00:00
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Position</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Battery</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiVib</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiMoteID</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRS232</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiBeeper</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.RimeAddress</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiIPAddress</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiRadio</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiButton</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiPIR</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiClock</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiLED</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.contikimote.interfaces.ContikiCFS</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.Mote2MoteRelations</moteinterface>
|
|
|
|
<moteinterface>org.contikios.cooja.interfaces.MoteAttributes</moteinterface>
|
2013-08-11 20:47:06 +00:00
|
|
|
<symbols>false</symbols>
|
|
|
|
</motetype>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>-22.5728586847096</x>
|
|
|
|
<y>123.9358664968653</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>1</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype782</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>116.13379149678028</x>
|
|
|
|
<y>88.36698920455684</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>2</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype743</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>-1.39303771455413</x>
|
|
|
|
<y>100.21446701029119</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>4</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype782</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>95.25095618820441</x>
|
|
|
|
<y>63.14998053005015</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>5</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype782</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>66.09378990830604</x>
|
|
|
|
<y>38.32698761608261</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>6</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype782</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>29.05630841762433</x>
|
|
|
|
<y>30.840688165838436</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>7</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype782</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>10.931583432822638</x>
|
|
|
|
<y>69.848248459216</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>8</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype782</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
<mote>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.interfaces.Position
|
2013-08-11 20:47:06 +00:00
|
|
|
<x>0.0</x>
|
|
|
|
<y>0.0</y>
|
|
|
|
<z>0.0</z>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
2013-08-11 20:47:06 +00:00
|
|
|
<id>3</id>
|
|
|
|
</interface_config>
|
|
|
|
<interface_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
2013-08-11 20:47:06 +00:00
|
|
|
<bitrate>250.0</bitrate>
|
|
|
|
</interface_config>
|
|
|
|
<motetype_identifier>mtype452</motetype_identifier>
|
|
|
|
</mote>
|
|
|
|
</simulation>
|
|
|
|
<plugin>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.plugins.SimControl
|
2013-08-11 20:47:06 +00:00
|
|
|
<width>280</width>
|
|
|
|
<z>1</z>
|
|
|
|
<height>160</height>
|
|
|
|
<location_x>400</location_x>
|
|
|
|
<location_y>0</location_y>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.plugins.Visualizer
|
2013-08-11 20:47:06 +00:00
|
|
|
<plugin_config>
|
2013-11-19 11:17:37 +00:00
|
|
|
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
|
|
|
|
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
|
|
|
|
<skin>org.contikios.cooja.plugins.skins.GridVisualizerSkin</skin>
|
|
|
|
<skin>org.contikios.cooja.plugins.skins.MoteTypeVisualizerSkin</skin>
|
2013-08-11 20:47:06 +00:00
|
|
|
<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>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.plugins.LogListener
|
2013-08-11 20:47:06 +00:00
|
|
|
<plugin_config>
|
|
|
|
<filter />
|
|
|
|
</plugin_config>
|
|
|
|
<width>1184</width>
|
|
|
|
<z>3</z>
|
|
|
|
<height>240</height>
|
|
|
|
<location_x>402</location_x>
|
|
|
|
<location_y>162</location_y>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.plugins.Notes
|
2013-08-11 20:47:06 +00:00
|
|
|
<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>
|
2013-11-19 11:17:37 +00:00
|
|
|
org.contikios.cooja.plugins.ScriptRunner
|
2013-08-11 20:47:06 +00:00
|
|
|
<plugin_config>
|
|
|
|
<script>GENERATE_MSG(0000000, "add-sink");
|
|
|
|
//GENERATE_MSG(1000000, "remove-sink");
|
|
|
|
//GENERATE_MSG(1020000, "add-sink");
|
|
|
|

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

|
|
|
|
TIMEOUT(1000000, if(lostMsgs == 0) { 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.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");
|
|
|
|
// 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>962</width>
|
|
|
|
<z>0</z>
|
|
|
|
<height>596</height>
|
|
|
|
<location_x>603</location_x>
|
|
|
|
<location_y>43</location_y>
|
|
|
|
</plugin>
|
|
|
|
</simconf>
|
|
|
|
|