Merge branch 'contiki'

Conflicts:
	cpu/cc26xx-cc13xx/lib/cc13xxware
	cpu/cc26xx-cc13xx/lib/cc26xxware
This commit is contained in:
Harald Pichler 2017-01-31 15:00:59 +01:00
commit 2f8549aaae
319 changed files with 58114 additions and 6745 deletions

View file

@ -362,7 +362,7 @@ make example-collect.sky TARGET=sky</commands>
<plugin>
org.contikios.cooja.plugins.ScriptRunner
<plugin_config>
<script>TIMEOUT(600000);
<script>TIMEOUT(450000);
num_nodes = mote.getSimulation().getMotesCount();
@ -408,6 +408,8 @@ while(true) {
dups = received[source].substr(seqno, 1);
if(dups == "_") {
dups = 1;
} else if (dups == "") {
continue;
} else if(dups &lt; 9) {
dups++;
}

View file

@ -21,25 +21,29 @@
<logoutput>40000</logoutput>
</events>
<motetype>
org.contikios.cooja.mspmote.Z1MoteType
org.contikios.cooja.contikimote.ContikiMoteType
<identifier>z11</identifier>
<description>Z1 Mote Type #z11</description>
<description>Cooja Mote Type #z11</description>
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-tsch/node.c</source>
<commands EXPORT="discard">make TARGET=z1 clean
make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-tsch/node.z1</firmware>
<commands EXPORT="discard">make TARGET=cooja clean
make node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</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.interfaces.IPAddress</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>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspButton</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDefaultSerial</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspLED</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
<symbols>false</symbols>
</motetype>
<mote>
<breakpoints />
@ -50,12 +54,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>1</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -68,12 +72,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>2</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>2</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -86,12 +90,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>3</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>3</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -104,12 +108,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>4</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>4</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -122,12 +126,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>5</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>5</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -140,12 +144,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>6</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>6</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -158,12 +162,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>7</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>7</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -176,12 +180,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>8</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>8</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -194,12 +198,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>9</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>9</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -270,9 +274,9 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=0</commands>
<script>TIMEOUT(300000); /* Time out after 5 minutes */&#xD;
&#xD;
/* Wait until a node (can only be the DAGRoot) has&#xD;
* 8 routing entries (i.e. can reach every node) */&#xD;
* 9 routing entries including one for the root (i.e. can reach every node) */&#xD;
log.log("Waiting for routing tables to fill\n");&#xD;
WAIT_UNTIL(msg.endsWith("Routing links (8 in total):"));&#xD;
WAIT_UNTIL(msg.endsWith("Routing links (9 in total):"));&#xD;
log.log("Root routing table ready\n");&#xD;
&#xD;
log.testOK(); /* Report test success and quit */</script>

View file

@ -21,25 +21,31 @@
<logoutput>40000</logoutput>
</events>
<motetype>
org.contikios.cooja.mspmote.Z1MoteType
org.contikios.cooja.contikimote.ContikiMoteType
<identifier>z11</identifier>
<description>Z1 Mote Type #z11</description>
<description>Cooja Mote Type #z11</description>
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-tsch/node.c</source>
<commands EXPORT="discard">make TARGET=z1 clean
make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-tsch/node.z1</firmware>
<commands EXPORT="discard">make TARGET=cooja clean
make node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<firmware
EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-tsch/node.z1</firmware>
<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.interfaces.IPAddress</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>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspButton</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDefaultSerial</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspLED</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
<symbols>false</symbols>
</motetype>
<mote>
<breakpoints />
@ -50,12 +56,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>1</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -68,12 +74,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>2</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>2</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -86,12 +92,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>3</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>3</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -104,12 +110,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>4</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>4</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -122,12 +128,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>5</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>5</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -140,12 +146,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>6</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>6</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -158,12 +164,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>7</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>7</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -176,12 +182,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>8</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>8</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -194,12 +200,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=1 MAKE_WITH_SECURITY=0</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>9</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>9</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -275,9 +281,9 @@ WAIT_UNTIL(msg.startsWith("Orchestra:"));&#xD;
log.log("Orchestra started\n");&#xD;
&#xD;
/* Wait until a node (can only be the DAGRoot) has&#xD;
* 8 routing entries (i.e. can reach every node) */&#xD;
* 9 routing entries including one for the root (i.e. can reach every node) */&#xD;
log.log("Waiting for routing tables to fill\n");&#xD;
WAIT_UNTIL(msg.endsWith("Routing links (8 in total):"));&#xD;
WAIT_UNTIL(msg.endsWith("Routing links (9 in total):"));&#xD;
log.log("Root routing table ready\n");&#xD;
&#xD;
log.testOK(); /* Report test success and quit */</script>

View file

@ -21,25 +21,29 @@
<logoutput>40000</logoutput>
</events>
<motetype>
org.contikios.cooja.mspmote.Z1MoteType
org.contikios.cooja.contikimote.ContikiMoteType
<identifier>z11</identifier>
<description>Z1 Mote Type #z11</description>
<description>Cooja Mote Type #z11</description>
<source EXPORT="discard">[CONTIKI_DIR]/examples/ipv6/rpl-tsch/node.c</source>
<commands EXPORT="discard">make TARGET=z1 clean
make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<firmware EXPORT="copy">[CONTIKI_DIR]/examples/ipv6/rpl-tsch/node.z1</firmware>
<commands EXPORT="discard">make TARGET=cooja clean
make node.cooja TARGET=cooja MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</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.interfaces.IPAddress</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>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspClock</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspMoteID</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspButton</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.Msp802154Radio</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDefaultSerial</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspLED</moteinterface>
<moteinterface>org.contikios.cooja.mspmote.interfaces.MspDebugOutput</moteinterface>
<symbols>false</symbols>
</motetype>
<mote>
<breakpoints />
@ -50,12 +54,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>1</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -68,12 +72,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>2</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>2</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -86,12 +90,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>3</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>3</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -104,12 +108,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>4</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>4</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -122,12 +126,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>5</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>5</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -140,12 +144,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>6</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>6</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -158,12 +162,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>7</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>7</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -176,12 +180,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>8</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>8</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -194,12 +198,12 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
<z>0.0</z>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspClock
<deviation>1.0</deviation>
org.contikios.cooja.contikimote.interfaces.ContikiMoteID
<id>9</id>
</interface_config>
<interface_config>
org.contikios.cooja.mspmote.interfaces.MspMoteID
<id>9</id>
org.contikios.cooja.contikimote.interfaces.ContikiRadio
<bitrate>250.0</bitrate>
</interface_config>
<motetype_identifier>z11</motetype_identifier>
</mote>
@ -272,9 +276,9 @@ make node.z1 TARGET=z1 MAKE_WITH_ORCHESTRA=0 MAKE_WITH_SECURITY=1</commands>
log.log("Waiting for association with security\n");&#xD;
&#xD;
/* Wait until a node (can only be the DAGRoot) has&#xD;
* 8 routing entries (i.e. can reach every node) */&#xD;
* 9 routing entries including one for the root (i.e. can reach every node) */&#xD;
log.log("Waiting for routing tables to fill\n");&#xD;
WAIT_UNTIL(msg.endsWith("Routing links (8 in total):"));&#xD;
WAIT_UNTIL(msg.endsWith("Routing links (9 in total):"));&#xD;
log.log("Root routing table ready\n");&#xD;
&#xD;
log.testOK(); /* Report test success and quit */</script>

View file

@ -1,5 +1,5 @@
#undef UIP_CONF_ND6_SEND_NA
#define UIP_CONF_ND6_SEND_NA 1
#undef UIP_CONF_ND6_SEND_NS
#define UIP_CONF_ND6_SEND_NS 1
#ifdef BUFSIZE
#undef UIP_CONF_BUFFER_SIZE

View file

@ -1,5 +1,5 @@
#undef UIP_CONF_ND6_SEND_NA
#define UIP_CONF_ND6_SEND_NA 1
#undef UIP_CONF_ND6_SEND_NS
#define UIP_CONF_ND6_SEND_NS 1
#ifdef BUFSIZE
#undef UIP_CONF_BUFFER_SIZE

View file

@ -286,14 +286,14 @@
GENERATE_MSG(0000000, "add-sink-2");&#xD;
GENERATE_MSG(0000000, "remove-sink-3");&#xD;
&#xD;
GENERATE_MSG(2000000, "remove-sink-1");&#xD;
GENERATE_MSG(4000000, "remove-sink-2");&#xD;
GENERATE_MSG(4000000, "add-sink-3");&#xD;
GENERATE_MSG(6000000, "remove-sink-1");&#xD;
GENERATE_MSG(12000000, "remove-sink-2");&#xD;
GENERATE_MSG(12000000, "add-sink-3");&#xD;
&#xD;
lostMsgs = 0;&#xD;
newDagOk = 0;&#xD;
&#xD;
TIMEOUT(6000000, if(newDagOk == 2) { log.testOK(); } );&#xD;
TIMEOUT(18000000, if(newDagOk == 2) { log.testOK(); } );&#xD;
&#xD;
lastMsg = -1;&#xD;
newSink = 0;&#xD;

View file

@ -32,6 +32,7 @@ cc2538-common/crypto/zoul \
cc2538-common/pka/zoul \
zolertia/zoul/zoul \
zolertia/zoul/cc1200-demo/zoul \
zolertia/zoul/orion/ip64-router/zoul:BOARD=orion \
openmote-cc2538/openmote-cc2538 \
er-rest-example/zoul \
ipso-objects/zoul \
@ -54,6 +55,7 @@ sensniff/ev-aducrf101mkxz \
cfs-coffee/cc2538dk \
cfs-coffee/openmote-cc2538 \
cfs-coffee/zoul \
fat/zoul:BOARD=remote-revb \
ipv6/rpl-tsch/zoul \
ipv6/rpl-tsch/zoul:MAKE_WITH_ORCHESTRA=1 \
ipv6/rpl-tsch/zoul:MAKE_WITH_SECURITY=1

View file

@ -286,14 +286,14 @@
GENERATE_MSG(0000000, "add-sink-2");&#xD;
GENERATE_MSG(0000000, "remove-sink-3");&#xD;
&#xD;
GENERATE_MSG(2000000, "remove-sink-1");&#xD;
GENERATE_MSG(4000000, "remove-sink-2");&#xD;
GENERATE_MSG(4000000, "add-sink-3");&#xD;
GENERATE_MSG(6000000, "remove-sink-1");&#xD;
GENERATE_MSG(12000000, "remove-sink-2");&#xD;
GENERATE_MSG(12000000, "add-sink-3");&#xD;
&#xD;
lostMsgs = 0;&#xD;
newDagOk = 0;&#xD;
&#xD;
TIMEOUT(6000000, if(newDagOk == 2) { log.testOK(); } );&#xD;
TIMEOUT(18000000, if(newDagOk == 2) { log.testOK(); } );&#xD;
&#xD;
lastMsg = -1;&#xD;
newSink = 0;&#xD;

View file

@ -0,0 +1,92 @@
<?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>
<project EXPORT="discard">[APPS_DIR]/radiologger-headless</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>100.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>mtype740</identifier>
<description>Cooja Mote Type #1</description>
<source>[CONTIKI_DIR]/regression-tests/25-ieee802154/code/test-panid-handling.c</source>
<commands>make test-panid-handling.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.contikimote.interfaces.ContikiEEPROM</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>57.636765279141336</x>
<y>56.661654369889035</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>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
</interface_config>
<motetype_identifier>mtype740</motetype_identifier>
</mote>
</simulation>
<plugin>
org.contikios.cooja.plugins.ScriptRunner
<plugin_config>
<scriptfile>[CONFIG_DIR]/js/01-panid-handling.js</scriptfile>
<active>true</active>
</plugin_config>
<width>495</width>
<z>0</z>
<height>525</height>
<location_x>279</location_x>
<location_y>2</location_y>
</plugin>
<plugin>
org.contikios.cooja.plugins.SimControl
<width>280</width>
<z>1</z>
<height>160</height>
<location_x>-2</location_x>
<location_y>0</location_y>
</plugin>
</simconf>

View file

@ -0,0 +1,203 @@
<?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>
<project EXPORT="discard">[APPS_DIR]/radiologger-headless</project>
<simulation>
<title>My simulation</title>
<randomseed>123456</randomseed>
<motedelay_us>1000000</motedelay_us>
<radiomedium>
org.contikios.cooja.radiomediums.UDGM
<transmitting_range>0.0</transmitting_range>
<interference_range>0.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>mtype713</identifier>
<description>default</description>
<source>[CONTIKI_DIR]/regression-tests/25-ieee802154/code/test-tsch-packet.c</source>
<commands>make TARGET=cooja clean
make TEST_CONFIG_TYPE=DEFAULT test-tsch-packet.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.contikimote.interfaces.ContikiEEPROM</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>mtype740</identifier>
<description>security on</description>
<source>[CONTIKI_DIR]/regression-tests/25-ieee802154/code/test-tsch-packet.c</source>
<commands>make TARGET=cooja clean
make TEST_CONFIG_TYPE=SECURITY_ON test-tsch-packet.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.contikimote.interfaces.ContikiEEPROM</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>mtype399</identifier>
<description>all enabled</description>
<source>[CONTIKI_DIR]/regression-tests/25-ieee802154/code/test-tsch-packet.c</source>
<commands>make TARGET=cooja clean
make TEST_CONFIG_TYPE=ALL_ENABLED test-tsch-packet.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.contikimote.interfaces.ContikiEEPROM</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>-49.23869609407765</x>
<y>-36.33693008116223</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>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
</interface_config>
<motetype_identifier>mtype713</motetype_identifier>
</mote>
<mote>
<interface_config>
org.contikios.cooja.interfaces.Position
<x>-17.772442808950224</x>
<y>-36.862574776701464</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>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
</interface_config>
<motetype_identifier>mtype740</motetype_identifier>
</mote>
<mote>
<interface_config>
org.contikios.cooja.interfaces.Position
<x>14.488632230762605</x>
<y>-35.15143001217301</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>
<interface_config>
org.contikios.cooja.contikimote.interfaces.ContikiEEPROM
<eeprom>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</eeprom>
</interface_config>
<motetype_identifier>mtype399</motetype_identifier>
</mote>
</simulation>
<plugin>
org.contikios.cooja.plugins.SimControl
<width>280</width>
<z>2</z>
<height>160</height>
<location_x>400</location_x>
<location_y>0</location_y>
</plugin>
<plugin>
org.contikios.cooja.plugins.Visualizer
<plugin_config>
<moterelations>true</moterelations>
<skin>org.contikios.cooja.plugins.skins.IDVisualizerSkin</skin>
<skin>org.contikios.cooja.plugins.skins.GridVisualizerSkin</skin>
<skin>org.contikios.cooja.plugins.skins.UDGMVisualizerSkin</skin>
<skin>org.contikios.cooja.plugins.skins.AttributeVisualizerSkin</skin>
<viewport>3.714690054486387 0.0 0.0 3.714690054486387 248.5428583129116 318.25485368648356</viewport>
</plugin_config>
<width>400</width>
<z>0</z>
<height>400</height>
<location_x>1</location_x>
<location_y>1</location_y>
</plugin>
<plugin>
org.contikios.cooja.plugins.ScriptRunner
<plugin_config>
<scriptfile>[CONTIKI_DIR]/regression-tests/25-ieee802154/js/02-tsch-packet-create.js</scriptfile>
<active>true</active>
</plugin_config>
<width>495</width>
<z>1</z>
<height>525</height>
<location_x>185</location_x>
<location_y>162</location_y>
</plugin>
</simconf>

View file

@ -0,0 +1 @@
include ../Makefile.simulation-test

View file

@ -0,0 +1,23 @@
# Regression Tests of IEEE 802.15.4 Fundamentals
## 01-panid-handling
Test return values by `frame802154_has_panid()` in
[frame802154.c](../../core/net/mac/frame802154.c).
### Test Code
A test vector is implemented in
[test-panid-handling.c](./code/test-panid-handling.c) according to Section
7.2.1.5, IEEE 802.15.4-2015. The testee mote outputs a test result to the
console with the prefix, `"=check-me="`.
[01-panid-handling.js](./js/01-panid-handling.js) examines each console output
containing `"=check-me="`. If it finds `"DONE"` without having had any
`"FAILED"`, the test is considered SUCCESS, `log.testOK()` is called. Otherwise,
FAILED.
### References
* https://standards.ieee.org/findstds/standard/802.15.4-2015.html
* https://github.com/contiki-os/contiki/pull/1914

View file

@ -0,0 +1,22 @@
all: test-panid-handling test-tcsh-create-packet
APPS += unit-test
MODULES += core/net/mac/tsch
CFLAGS += -D PROJECT_CONF_H=\"project-conf.h\"
WITH_TSCH ?= 0
TEST_CONFIG_TYPE ?= DEFAULT
CFLAGS += -D WITH_TSCH=1
ifeq ($(TEST_CONFIG_TYPE), SECURITY_ON)
CFLAGS += -D WITH_SECURITY_ON=1
endif
ifeq ($(TEST_CONFIG_TYPE), ALL_ENABLED)
CFLAGS += -D WITH_ALL_ENABLED=1
endif
CONTIKI = ../../..
CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

View file

@ -0,0 +1,41 @@
/*
* Copyright (c) 2016, Yasuyuki Tanaka
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _PROJECT_CONF_H_
#define _PROJECT_CONF_H_
#define UNIT_TEST_PRINT_FUNCTION test_print_report
#if WITH_TSCH
#include "project-tsch-conf.h"
#endif
#endif /* !_PROJECT_CONF_H_ */

View file

@ -0,0 +1,73 @@
/*
* Copyright (c) 2016, Yasuyuki Tanaka
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _PROJECT_TSCH_CONF_H
#define _PROJECT_TSCH_CONF_H
#undef FRAME802154_CONF_VERSION
#define FRAME802154_CONF_VERSION FRAME802154_IEEE802154E_2012
#undef NETSTACK_CONF_MAC
#define NETSTACK_CONF_MAC tschmac_driver
#undef NETSTACK_CONF_RDC
#define NETSTACK_CONF_RDC nordc_driver
#undef NETSTACK_CONF_FRAMER
#define NETSTACK_CONF_FRAMER framer_802154
#if WITH_SECURITY_ON
#define TEST_CONFIG_TYPE SECURITY_ON
#undef LLSEC802154_CONF_ENABLED
#define LLSEC802154_CONF_ENABLED 1
#undef LLSEC802154_CONF_USES_EXPLICIT_KEYS
#define LLSEC802154_CONF_USES_EXPLICIT_KEYS 1
#undef LLSEC802154_CONF_USES_FRAME_COUNTER
#define LLSEC802154_CONF_USES_FRAME_COUNTER 0
#elif WITH_ALL_ENABLED
#define TEST_CONFIG_TYPE ALL_ENABLED
#undef TSCH_PACKET_CONF_EACK_WITH_DEST_ADDR
#define TSCH_PACKET_CONF_EACK_WITH_DEST_ADDR 1
#undef TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR
#define TSCH_PACKET_CONF_EACK_WITH_SRC_ADDR 1
#undef TSCH_PACKET_CONF_EB_WITH_TIMESLOT_TIMING
#define TSCH_PACKET_CONF_EB_WITH_TIMESLOT_TIMING 1
#undef TSCH_PACKET_CONF_EB_WITH_HOPPING_SEQUENCE
#define TSCH_PACKET_CONF_EB_WITH_HOPPING_SEQUENCE 1
#undef TSCH_PACKET_EB_WITH_SLOTFRAME_AND_LINK
#define TSCH_PACKET_CONF_EB_WITH_SLOTFRAME_AND_LINK 1
#endif
#endif /* !_PROJECT_TSCH_CONF_H */

View file

@ -0,0 +1,319 @@
/*
* Copyright (c) 2016, Yasuyuki Tanaka
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "contiki.h"
#include "unit-test.h"
#include "net/mac/frame802154.h"
#include <stdio.h>
#define VERBOSE 0
PROCESS(test_process, "frame802154.c test");
AUTOSTART_PROCESSES(&test_process);
typedef enum {SUCCESS, FAILURE} result_t;
typedef enum {NO_ADDR, SHORT, LONG} addr_mode_t;
typedef enum {NOT_PRESENT, PRESENT} panid_mode_t;
typedef enum {OFF, ON} panid_cmpr_mode_t;
typedef struct {
addr_mode_t dest_addr_mode;
addr_mode_t src_addr_mode;
panid_mode_t dest_panid_mode;
panid_mode_t src_panid_mode;
panid_cmpr_mode_t panid_cmpr_mode;
} panid_test_def;
/* IEEE 802.15.4-2015, the itemization in Section 7.2.1.5 */
/* This is applied to frames but Acknowledge */
static panid_test_def panid_table_0b00_0b01[] = {
/* dest_addr, src_addr, dest_panid, src_panid, panid_cmp */
//{ NO_ADDR, NO_ADDR, UNDEFINED, UNDEFINED, OFF},
//{ NO_ADDR, NO_ADDR, UNDEFINED, UNDEFINED, ON},
{ SHORT, SHORT, PRESENT, NOT_PRESENT, ON},
{ LONG, SHORT, PRESENT, NOT_PRESENT, ON},
{ SHORT, LONG, PRESENT, NOT_PRESENT, ON},
{ LONG, LONG, PRESENT, NOT_PRESENT, ON},
{ SHORT, SHORT, PRESENT, PRESENT, OFF},
{ LONG, SHORT, PRESENT, PRESENT, OFF},
{ SHORT, LONG, PRESENT, PRESENT, OFF},
{ LONG, LONG, PRESENT, PRESENT, OFF},
{ SHORT, NO_ADDR, PRESENT, NOT_PRESENT, OFF},
{ LONG, NO_ADDR, PRESENT, NOT_PRESENT, OFF},
{ NO_ADDR, SHORT, NOT_PRESENT, PRESENT, OFF},
{ NO_ADDR, LONG, NOT_PRESENT, PRESENT, OFF},
//{ SHORT, NO_ADDR, UNDEFINED, UNDEFINED, ON},
//{ LONG, NO_ADDR, UNDEFINED, UNDEFINED, ON},
//{ NO_ADDR, SHORT, UNDEFINED, UNDEFINED, ON},
//{ NO_ADDR, LONG, UNDEFINED, UNDEFINED, ON},
};
/* IEEE 802.15.4-2015, Table 7-2 in Section 7.2.1.5 */
static panid_test_def panid_table_0b10[] = {
/* dest_addr, src_addr, dest_panid, src_panid, panid_cmp */
{ NO_ADDR, NO_ADDR, NOT_PRESENT, NOT_PRESENT, OFF}, // index 0, row-1
{ NO_ADDR, NO_ADDR, PRESENT, NOT_PRESENT, ON}, // index 1, row-2
{ SHORT, NO_ADDR, PRESENT, NOT_PRESENT, OFF}, // index 2, row-3-1
{ SHORT, NO_ADDR, NOT_PRESENT, NOT_PRESENT, ON}, // index 3, row-4-1
{ NO_ADDR, SHORT, NOT_PRESENT, PRESENT, OFF}, // index 4, row-5-1
{ NO_ADDR, SHORT, NOT_PRESENT, NOT_PRESENT, ON}, // index 5 row-6-1
{ LONG, LONG, PRESENT, NOT_PRESENT, OFF}, // index 6, row-7
{ LONG, LONG, NOT_PRESENT, NOT_PRESENT, ON}, // index 7, row-8
{ SHORT, SHORT, PRESENT, PRESENT, OFF}, // index 8, row-9, *1
{ SHORT, LONG, PRESENT, PRESENT, OFF}, // index 9, row-10, *1
{ LONG, SHORT, PRESENT, PRESENT, OFF}, // index 10, row-11, *1
{ SHORT, LONG, PRESENT, NOT_PRESENT, ON}, // index 11, row-12, *2
{ LONG, SHORT, PRESENT, NOT_PRESENT, ON}, // index 12, row-13, *2
{ SHORT, SHORT, PRESENT, NOT_PRESENT, ON}, // index 13, row-14, *2
{ LONG, NO_ADDR, PRESENT, NOT_PRESENT, OFF}, // index 14, row-3-2
{ LONG, NO_ADDR, NOT_PRESENT, NOT_PRESENT, ON}, // index 15, row-4-2
{ NO_ADDR, LONG, NOT_PRESENT, PRESENT, OFF}, // index 16, row-5-2
{ NO_ADDR, LONG, NOT_PRESENT, NOT_PRESENT, ON}, // index 17, row-6-2
/* *1: contradict row-12 in Table 2a of IEEE 802.15.4e-2012 */
/* *2: contradict row-13 in Table 2a of IEEE 802.15.4e-2012 */
};
typedef void (*setup_fcf_p)(const panid_test_def *, frame802154_fcf_t *);
UNIT_TEST_REGISTER(panid_frame_ver_0b00, "PAN ID Cmpr Handing (frame-ver: 0b00)");
UNIT_TEST_REGISTER(panid_frame_ver_0b01, "PAN ID Cmpr Handing (frame-ver: 0b01)");
UNIT_TEST_REGISTER(panid_frame_ver_0b10, "PAN ID Cmpr Handing (frame-ver: 0b10)");
static void
test_print_report(const unit_test_t *utp)
{
printf("=check-me= ");
if(utp->result == unit_test_failure) {
printf("FAILED - %s: at test index %d\n", utp->descr, utp->exit_line);
} else {
printf("SUCEEDED - %s\n", utp->descr);
}
}
static void
setup_addr_mode(addr_mode_t mode, uint8_t *addr_mode)
{
switch(mode) {
case NO_ADDR:
*addr_mode = FRAME802154_NOADDR;
break;
case SHORT:
*addr_mode = FRAME802154_SHORTADDRMODE;
break;
case LONG:
*addr_mode = FRAME802154_LONGADDRMODE;
break;
default:
break;
}
}
static void
setup_panid_cmpr_mode(panid_cmpr_mode_t panid_cmpr_mode, frame802154_fcf_t *fcf)
{
switch(panid_cmpr_mode) {
case OFF:
fcf->panid_compression = 0;
break;
case ON:
fcf->panid_compression = 1;
break;
default:
break;
}
}
static void
setup_frame802154_2003_fcf(const panid_test_def *t, frame802154_fcf_t *fcf)
{
fcf->frame_version = FRAME802154_IEEE802154_2003;
fcf->frame_type = FRAME802154_DATAFRAME;
setup_addr_mode(t->dest_addr_mode, &fcf->dest_addr_mode);
setup_addr_mode(t->src_addr_mode, &fcf->src_addr_mode);
setup_panid_cmpr_mode(t->panid_cmpr_mode, fcf);
}
static void
setup_frame802154_2006_fcf(const panid_test_def *t, frame802154_fcf_t *fcf)
{
fcf->frame_version = FRAME802154_IEEE802154_2006;
fcf->frame_type = FRAME802154_DATAFRAME;
setup_addr_mode(t->dest_addr_mode, &fcf->dest_addr_mode);
setup_addr_mode(t->src_addr_mode, &fcf->src_addr_mode);
setup_panid_cmpr_mode(t->panid_cmpr_mode, fcf);
}
static void
setup_frame802154_2015_fcf(const panid_test_def *t, frame802154_fcf_t *fcf)
{
fcf->frame_version = FRAME802154_IEEE802154E_2012;
setup_addr_mode(t->dest_addr_mode, &fcf->dest_addr_mode);
setup_addr_mode(t->src_addr_mode, &fcf->src_addr_mode);
setup_panid_cmpr_mode(t->panid_cmpr_mode, fcf);
}
static int
panid_run_test(const panid_test_def table[], size_t table_size,
setup_fcf_p setup_fcf)
{
int i;
int num_of_tests = table_size / sizeof(panid_test_def);
frame802154_fcf_t fcf;
int has_src_pan_id, has_dest_pan_id;
const panid_test_def *test;
result_t result;
for(i = 0; i < num_of_tests; i++) {
test = &table[i];
setup_fcf(test, &fcf);
has_src_pan_id = 0;
has_dest_pan_id = 0;
frame802154_has_panid(&fcf, &has_src_pan_id, &has_dest_pan_id);
result = FAILURE;
switch(test->dest_panid_mode) {
case NOT_PRESENT:
if(has_dest_pan_id == 0) {
result = SUCCESS;
}
break;
case PRESENT:
if(has_dest_pan_id == 1) {
result = SUCCESS;
}
break;
}
if(result == SUCCESS) {
result = FAILURE;
switch(test->src_panid_mode) {
case NOT_PRESENT:
if(has_src_pan_id == 0) {
result = SUCCESS;
}
break;
case PRESENT:
if(has_src_pan_id == 1) {
result = SUCCESS;
}
break;
}
}
#if VERBOSE == 1
printf("%d, %d, %d, %d, %d\n",
test->dest_addr_mode,
test->src_addr_mode,
has_dest_pan_id,
has_src_pan_id,
test->panid_cmpr_mode);
#else
printf("%s", result == SUCCESS ? "." : "E");
#endif
if(result == FAILURE) {
break;
}
}
printf("\n");
return i;
}
UNIT_TEST(panid_frame_ver_0b00)
{
int index;
int num_of_tests = sizeof(panid_table_0b00_0b01) / sizeof(panid_test_def);
UNIT_TEST_BEGIN();
UNIT_TEST_ASSERT((index = panid_run_test(panid_table_0b00_0b01,
sizeof(panid_table_0b00_0b01),
setup_frame802154_2003_fcf)) ==
num_of_tests);
UNIT_TEST_END();
utp->exit_line = index;
}
UNIT_TEST(panid_frame_ver_0b01)
{
int index;
int num_of_tests = sizeof(panid_table_0b00_0b01) / sizeof(panid_test_def);
UNIT_TEST_BEGIN();
UNIT_TEST_ASSERT((index = panid_run_test(panid_table_0b00_0b01,
sizeof(panid_table_0b00_0b01),
setup_frame802154_2006_fcf)) ==
num_of_tests);
UNIT_TEST_END();
utp->exit_line = index;
}
UNIT_TEST(panid_frame_ver_0b10)
{
int index;
int num_of_tests = sizeof(panid_table_0b10) / sizeof(panid_test_def);
UNIT_TEST_BEGIN();
UNIT_TEST_ASSERT((index = panid_run_test(panid_table_0b10,
sizeof(panid_table_0b10),
setup_frame802154_2015_fcf)) ==
num_of_tests);
UNIT_TEST_END();
utp->exit_line = index;
}
PROCESS_THREAD(test_process, ev, data)
{
PROCESS_BEGIN();
printf("Run unit-test\n");
printf("---\n");
UNIT_TEST_RUN(panid_frame_ver_0b00);
UNIT_TEST_RUN(panid_frame_ver_0b01);
UNIT_TEST_RUN(panid_frame_ver_0b10);
printf("=check-me= DONE\n");
PROCESS_END();
}

View file

@ -0,0 +1,386 @@
/*
* Copyright (c) 2016, Yasuyuki Tanaka
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "contiki.h"
#include "unit-test.h"
#include "net/linkaddr.h"
#include "net/mac/tsch/tsch.h"
#include "net/mac/tsch/tsch-asn.h"
#include "net/mac/tsch/tsch-packet.h"
#include "net/mac/tsch/tsch-schedule.h"
#include <stdio.h>
#include <string.h>
#ifndef TEST_CONFIG_TYPE
#define TEST_CONFIG_TYPE DEFAULT
#endif
typedef enum { SUCCESS, FAILURE } result_t;
typedef enum { DEFAULT = 0, SECURITY_ON, ALL_ENABLED } config_type_t;
typedef struct {
size_t len;
uint8_t buf[TSCH_PACKET_MAX_LEN];
} frame_t;
#define NODE1 {{ 0xc1, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}
#define NODE2 {{ 0xc1, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}
/*
* The following vectors are obtained with
* examples/ipv6/rpl-tsch/rpl-tsch-z1.csc except for the enhanced beacon for
* ALL_ENABLED. The raw frame was generated with rpl-tsch-cooja.csc because
* there is an issue in TSCH Timeslot IE generated by z1 mote.
*/
typedef struct {
linkaddr_t src;
uint64_t asn;
uint8_t hdr_len;
frame_t frame;
} eb_test_vector_t;
static const eb_test_vector_t eb_test_vectors[] = {
{ /* DEFAULT */
NODE1, 7, 18,
{ 37, { 0x00, 0xeb, 0xcd, 0xab, 0xff, 0xff, 0xcd, 0xab,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc1,
0x00, 0x3f, 0x11, 0x88, 0x06, 0x1a, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x00, 0x01,
0xc8, 0x00, 0x01, 0x1b, 0x00 }
}
},
{ /* SECURITY_ON */
NODE1, 2, 20,
{ 43, { 0x08, 0xeb, 0xcd, 0xab, 0xff, 0xff, 0xcd, 0xab,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc1,
0x69, 0x01, 0x00, 0x3f, 0x11, 0x88, 0x06, 0x1a,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1c,
0x00, 0x01, 0xc8, 0x00, 0x01, 0x1b, 0x00, 0x7d,
0x3e, 0x39, 0x9a, 0x6f, 0x7b }
}
},
{ /* ALL_ENABLED */
NODE1, 12, 18,
{ 85, { 0x00, 0xeb, 0xcd, 0xab, 0xff, 0xff, 0xcd, 0xab,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc1,
0x00, 0x3f, 0x41, 0x88, 0x06, 0x1a, 0x0c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x19, 0x1c, 0x01, 0x08,
0x07, 0x80, 0x00, 0x48, 0x08, 0xfc, 0x03, 0x20,
0x03, 0xe8, 0x03, 0x98, 0x08, 0x90, 0x01, 0xc0,
0x00, 0x60, 0x09, 0xa0, 0x10, 0x10, 0x27, 0x10,
0xc8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x04, 0x00, 0x0f, 0x19, 0x1a, 0x14, 0x00,
0x00, 0x0a, 0x1b, 0x01, 0x00, 0x07, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x0f }
}
}
};
typedef struct {
linkaddr_t src;
linkaddr_t dest;
uint64_t asn; // used only for the SECURITY_ON case
uint8_t seqno;
uint16_t drift;
uint8_t nack;
frame_t frame;
} eack_test_vector_t;
static const eack_test_vector_t eack_test_vectors[] = {
{ /* DEFAULT */
NODE1, NODE2, 0, 1, 214, 0,
{ 17, { 0x02, 0x2e, 0x01, 0xcd, 0xab, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0c, 0xc1, 0x02, 0x0f, 0xd6,
0x00 }
}
},
{ /* SECURITY_ON */
NODE1, NODE2, 108, 1, 214, 0,
{ 23, { 0x0a, 0x2e, 0x01, 0xcd, 0xab, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0c, 0xc1, 0x6d, 0x02, 0x02,
0x0f, 0xd6, 0x00, 0x5e, 0x20, 0x84, 0xda }
}
},
{ /* ALL_ENABLED */
NODE1, NODE2, 0, 1, 214, 0,
{ 25, { 0x02, 0xee, 0x01, 0xcd, 0xab, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0c, 0xc1, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0c, 0xc1, 0x02, 0x0f, 0xd6,
0x00 }
}
}
};
PROCESS(test_process, "tsch-packet-create test");
AUTOSTART_PROCESSES(&test_process);
static void
print_hex(const uint8_t *p, size_t len)
{
int i;
for(i = 0; i < len; i++) {
printf("%02x", p[i]);
}
}
static void
update_current_asn(uint64_t asn)
{
tsch_current_asn.ls4b = (uint32_t)(asn & 0xffffffff);
tsch_current_asn.ms1b = (uint8_t)((asn >> 32) & 0xff);
}
static result_t
test_create_eb(const eb_test_vector_t *v)
{
uint8_t buf[TSCH_PACKET_MAX_LEN];
int len;
uint8_t hdr_len;
uint8_t tsch_sync_ie_offset;
memset(buf, 0, sizeof(buf));
linkaddr_copy(&linkaddr_node_addr, &v->src);
update_current_asn(v->asn);
len = tsch_packet_create_eb(buf, sizeof(buf),
&hdr_len, &tsch_sync_ie_offset);
tsch_packet_update_eb(buf, len, tsch_sync_ie_offset);
#if WITH_SECURITY_ON
len += tsch_security_secure_frame(buf, buf,
hdr_len, len - hdr_len,
&tsch_current_asn);
#endif
printf("%s: len=%u, hdr_len=%u, buf=", __func__, len, hdr_len);
print_hex(buf, len);
printf("\n");
if(len != v->frame.len ||
hdr_len != v->hdr_len ||
memcmp(buf, v->frame.buf, len) != 0) {
return FAILURE;
}
return SUCCESS;
}
static result_t
test_parse_eb(const eb_test_vector_t *v)
{
frame802154_t frame;
struct ieee802154_ies ies;
uint8_t hdr_len;
int frame_without_mic;
int len;
uint64_t asn;
linkaddr_t src_addr;
#if WITH_SECURITY_ON
frame_without_mic = 0;
update_current_asn(v->asn);
#else
frame_without_mic = 1;
#endif
memset(&frame, 0, sizeof(frame));
memset(&ies, 0, sizeof(ies));
hdr_len = 0;
len = tsch_packet_parse_eb(v->frame.buf, v->frame.len, &frame, &ies, &hdr_len,
frame_without_mic);
asn = ((uint64_t)ies.ie_asn.ms1b << 32) + ies.ie_asn.ls4b;
printf("%s: len=%u, hdr_len=%u, asn=%llu\n", __func__, len, hdr_len, asn);
#if WITH_SECURITY_ON
/* adjust 'len' with the length of MIC which is included in a raw frame */
len += tsch_security_mic_len(&frame);
#endif
if(frame.fcf.frame_type != FRAME802154_BEACONFRAME ||
frame.fcf.frame_version != FRAME802154_IEEE802154E_2012) {
return FAILURE;
}
if(len != v->frame.len ||
hdr_len != v->hdr_len ||
asn != v->asn) {
return FAILURE;
}
if(frame802154_extract_linkaddr(&frame, &src_addr, NULL) == 0||
linkaddr_cmp(&src_addr, &v->src) == 0) {
return FAILURE;
}
return SUCCESS;
}
static result_t
test_create_eack(const eack_test_vector_t *v)
{
uint8_t buf[TSCH_PACKET_MAX_LEN];
int len;
#if WITH_SECURITY_ON
int data_len = 0;
#endif
memset(buf, 0, sizeof(buf));
linkaddr_copy(&linkaddr_node_addr, &v->src);
len = tsch_packet_create_eack(buf, sizeof(buf),
&v->dest, v->seqno, v->drift, v->nack);
#if WITH_SECURITY_ON
update_current_asn(v->asn);
len += tsch_security_secure_frame(buf, buf,
len, data_len,
&tsch_current_asn);
#endif
printf("%s: len=%u, buf=", __func__, len);
print_hex(buf, len);
printf("\n");
if(len != v->frame.len ||
memcmp(buf, v->frame.buf, len) != 0) {
return FAILURE;
}
return SUCCESS;
}
static result_t
test_parse_eack(const eack_test_vector_t *v)
{
frame802154_t frame;
struct ieee802154_ies ies;
uint8_t hdr_len;
int len;
#if TSCH_PACKET_EACK_WITH_SRC_ADDR
linkaddr_t src_addr;
#endif
#if TSCH_PACKET_EACK_WITH_DEST_ADDR
linkaddr_t dest_addr;
#endif
#if WITH_SECURITY_ON
update_current_asn(v->asn);
#endif
memset(&frame, 0, sizeof(frame));
memset(&ies, 0, sizeof(ies));
hdr_len = 0;
linkaddr_copy(&linkaddr_node_addr, &v->dest);
len = tsch_packet_parse_eack(v->frame.buf, v->frame.len, v->seqno,
&frame, &ies, &hdr_len);
printf("%s: len=%u, seqno=%u, drift=%u, nack=%u\n",
__func__, len, frame.seq, ies.ie_time_correction, ies.ie_is_nack);
#if WITH_SECURITY_ON
/* adjust 'len' with the length of MIC which is included in a raw frame */
len += tsch_security_mic_len(&frame);
#endif
if(frame.fcf.frame_type != FRAME802154_ACKFRAME ||
frame.fcf.frame_version != FRAME802154_IEEE802154E_2012) {
return FAILURE;
}
if(len != v->frame.len ||
frame.seq != v->seqno ||
ies.ie_time_correction != v->drift ||
ies.ie_is_nack != v->nack) {
return FAILURE;
}
#if TSCH_PACKET_EACK_WITH_SRC_ADDR
if(frame802154_extract_linkaddr(&frame, &src_addr, NULL) == 0||
linkaddr_cmp(&src_addr, &v->src) == 0) {
return FAILURE;
}
#endif
#if TSCH_PACKET_EACK_WITH_DEST_ADDR
if(frame802154_extract_linkaddr(&frame, NULL, &dest_addr) == 0||
linkaddr_cmp(&dest_addr, &v->dest) == 0) {
return FAILURE;
}
#endif
return SUCCESS;
}
PROCESS_THREAD(test_process, ev, data)
{
static struct etimer et;
const eb_test_vector_t *eb_v;
const eack_test_vector_t *eack_v;
PROCESS_BEGIN();
tsch_set_coordinator(1);
#if WITH_SECURITY_ON
tsch_set_pan_secured(1);
#endif
etimer_set(&et, CLOCK_SECOND);
/* wait for minimal schedule installed */
while(1) {
PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&et));
if(tsch_schedule_get_link_by_handle(0) != NULL) {
break;
}
etimer_reset(&et);
}
eb_v = &eb_test_vectors[TEST_CONFIG_TYPE];
printf("==check-me== %s\n",
test_create_eb(eb_v) == SUCCESS ? "SUCCEEDED" : "FAILED");
printf("==check-me== %s\n",
test_parse_eb(eb_v) == SUCCESS ? "SUCCEEDED" : "FAILED");
eack_v = &eack_test_vectors[TEST_CONFIG_TYPE];
printf("==check-me== %s\n",
test_create_eack(eack_v) == SUCCESS ? "SUCCEEDED" : "FAILED");
printf("==check-me== %s\n",
test_parse_eack(eack_v) == SUCCESS ? "SUCCEEDED" : "FAILED");
printf("==check-me== DONE\n");
PROCESS_END();
}

View file

@ -0,0 +1,21 @@
TIMEOUT(10000, log.testFailed());
while(true) {
YIELD();
log.log(time + " " + id + " "+ msg + "\n");
if(msg.contains("=check-me=") == false) {
continue;
}
if(msg.contains("FAILED")) {
log.testFailed();
}
if(msg.contains("DONE")) {
log.testOK();
break;
}
}

View file

@ -0,0 +1,27 @@
TIMEOUT(10000, log.testFailed());
num_of_motes = sim.getMotesCount();
while(true) {
YIELD();
log.log(time + " node-" + id + ": "+ msg + "\n");
if(msg.contains("=check-me=") == false) {
continue;
}
if(msg.contains("FAILED")) {
log.testFailed();
break;
}
if(msg.contains("DONE")) {
num_of_motes -= 1;
if(num_of_motes == 0) {
log.testOK();
break;
}
}
}