mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-17 21:09:03 +00:00
648 lines
23 KiB
Plaintext
648 lines
23 KiB
Plaintext
<?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>
|
|
org.contikios.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>
|
|
org.contikios.cooja.contikimote.ContikiMoteType
|
|
<identifier>mtype419</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>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>
|
|
<symbols>false</symbols>
|
|
</motetype>
|
|
<motetype>
|
|
org.contikios.cooja.contikimote.ContikiMoteType
|
|
<identifier>mtype484</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>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>
|
|
<symbols>false</symbols>
|
|
</motetype>
|
|
<motetype>
|
|
org.contikios.cooja.contikimote.ContikiMoteType
|
|
<identifier>mtype718</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>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>
|
|
<symbols>false</symbols>
|
|
</motetype>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>-0.4799968467515439</x>
|
|
<y>98.79087181374759</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>1</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>99.56423154395364</x>
|
|
<y>50.06466731257512</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>2</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype419</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>-0.4799968467515439</x>
|
|
<y>0.30173505605854883</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>3</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype484</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>12.779318616702257</x>
|
|
<y>8.464865358169643</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>4</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>9.391922400291703</x>
|
|
<y>49.22878206790311</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>5</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>48.16367625505583</x>
|
|
<y>33.27520746599595</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>6</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>16.582742473429345</x>
|
|
<y>24.932911331640646</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>7</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>8.445564421140666</x>
|
|
<y>6.770205395698742</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>8</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>87.04968129458189</x>
|
|
<y>34.46536562612724</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>9</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>94.47123252519145</x>
|
|
<y>18.275940194868184</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>10</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>95.28044254364556</x>
|
|
<y>17.683438211793558</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>11</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>56.124622439456076</x>
|
|
<y>33.88966252832571</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>12</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>98.33149749474546</x>
|
|
<y>37.448034626592744</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>13</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>58.75337436025891</x>
|
|
<y>68.64082018992522</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>14</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>66.83816496627988</x>
|
|
<y>68.38008376830592</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>15</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>90.88648665466316</x>
|
|
<y>50.942053906416575</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>16</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>68.80089833632896</x>
|
|
<y>84.17294684073734</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>17</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>73.6760846183129</x>
|
|
<y>81.76699743886633</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>18</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>0.2960103456537466</x>
|
|
<y>98.5587829617092</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>19</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>8.130479493904208</x>
|
|
<y>57.642099520821645</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>20</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>30.550120982984865</x>
|
|
<y>85.58346736403402</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>21</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>29.65300377698182</x>
|
|
<y>63.50257213104861</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>22</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
<mote>
|
|
<interface_config>
|
|
org.contikios.cooja.interfaces.Position
|
|
<x>34.92110687576687</x>
|
|
<y>70.71381297232249</y>
|
|
<z>0.0</z>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
|
|
<id>23</id>
|
|
</interface_config>
|
|
<interface_config>
|
|
org.contikios.cooja.contikimote.interfaces.ContikiRadio
|
|
<bitrate>250.0</bitrate>
|
|
</interface_config>
|
|
<motetype_identifier>mtype718</motetype_identifier>
|
|
</mote>
|
|
</simulation>
|
|
<plugin>
|
|
org.contikios.cooja.plugins.SimControl
|
|
<width>280</width>
|
|
<z>1</z>
|
|
<height>160</height>
|
|
<location_x>400</location_x>
|
|
<location_y>0</location_y>
|
|
</plugin>
|
|
<plugin>
|
|
org.contikios.cooja.plugins.Visualizer
|
|
<plugin_config>
|
|
<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>
|
|
<viewport>1.92914676942954 0.0 0.0 1.92914676942954 75.9259843662471 55.41790879138101</viewport>
|
|
</plugin_config>
|
|
<width>400</width>
|
|
<z>2</z>
|
|
<height>400</height>
|
|
<location_x>1</location_x>
|
|
<location_y>1</location_y>
|
|
</plugin>
|
|
<plugin>
|
|
org.contikios.cooja.plugins.LogListener
|
|
<plugin_config>
|
|
<filter />
|
|
<formatted_time />
|
|
<coloring />
|
|
</plugin_config>
|
|
<width>1184</width>
|
|
<z>3</z>
|
|
<height>500</height>
|
|
<location_x>402</location_x>
|
|
<location_y>162</location_y>
|
|
</plugin>
|
|
<plugin>
|
|
org.contikios.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>
|
|
org.contikios.cooja.plugins.ScriptRunner
|
|
<plugin_config>
|
|
<script>function place(id, x, y) {
|
|
var node = sim.getMoteWithID(id);
|
|
node.getInterfaces().getPosition().setCoordinates(x, y, 0);
|
|
}
|
|

|
|
function getRandom(min, max) {
|
|
return Math.random() * (max - min) + min;
|
|
}
|
|

|
|
// From: http://bost.ocks.org/mike/shuffle/
|
|
function shuffle(array) {
|
|
var m = array.length, t, i;
|
|

|
|
// While there remain elements to shuffle…
|
|
while (m) {
|
|

|
|
// Pick a remaining element…
|
|
i = Math.floor(Math.random() * m--);
|
|

|
|
// And swap it with the current element.
|
|
t = array[m];
|
|
array[m] = array[i];
|
|
array[i] = t;
|
|
}
|
|

|
|
return array;
|
|
}
|
|

|
|
GENERATE_MSG(000000, 'randomize-nodes');
|
|
GENERATE_MSG(1200000, 'randomize-nodes');
|
|
GENERATE_MSG(2400000, 'randomize-nodes');
|
|
GENERATE_MSG(3600000, 'randomize-nodes');
|
|

|
|
var numForwarders = 20;
|
|
var forwardIDStart = 4;
|
|
packetsReceived = [];
|
|
var hops;
|
|

|
|
TIMEOUT(6000000, if(packetsReceived.length > 50) { log.testOK(); } );
|
|

|
|
while(true) {
|
|
YIELD();
|
|
if(msg.equals("randomize-nodes")) {
|
|
log.log('Rearranging network\n');
|
|
var allnodes = [];
|
|
for(var i = 0; i < numForwarders; i++) {
|
|
allnodes.push(i);
|
|
}
|
|
shuffle(allnodes);
|
|
/* Place 1/4 of the nodes in the first quadrant. */
|
|
var i = 0;
|
|
for(; i < numForwarders / 4; i++) {
|
|
place(i + forwardIDStart, 
|
|
getRandom(0, 50),
|
|
getRandom(0, 50));
|
|
}
|
|
/* Place 1/4 of the nodes in the second quadrant. */
|
|
for(; i < 2 * numForwarders / 4; i++) {
|
|
place(i + forwardIDStart, 
|
|
getRandom(50, 100),
|
|
getRandom(0, 50));
|
|
}
|
|
/* Place 1/4 of the nodes in the third quadrant. */
|
|
for(; i < 3 * numForwarders / 4; i++) {
|
|
place(i + forwardIDStart, 
|
|
getRandom(50, 100),
|
|
getRandom(50, 100));
|
|
} 
|
|
/* Place 1/4 of the nodes in the fourth quadrant. */
|
|
for(; i < 4 * numForwarders / 4; i++) {
|
|
place(i + forwardIDStart, 
|
|
getRandom(0, 50),
|
|
getRandom(50, 100));
|
|
} 
|
|
} else if(msg.startsWith("Sending")) {
|
|
hops = 0;
|
|
} else if(msg.startsWith("#L")) {
|
|
hops++;
|
|
} else if(msg.startsWith("Data")) {
|
|
var data = msg.split(" ");
|
|
var num = parseInt(data[14]);
|
|
packetsReceived.push(num);
|
|

|
|
/* Copy packetsReceived array to the packets array. */
|
|
var packets = packetsReceived.slice();
|
|
var recvstr = '';
|
|
for(var i = 0; i < num; i++) {
|
|
if(packets[0] == i) {
|
|
recvstr += '*';
|
|
packets.shift();
|
|
} else {
|
|
recvstr += '_'; 
|
|
} 
|
|
}
|
|
log.log(packetsReceived.length + ' packets received: ' + recvstr + '\n');
|
|
}
|
|
}</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>
|
|
|