From eb4bdde9ca6ce7f2b20089d2cf097512f9986f78 Mon Sep 17 00:00:00 2001 From: Timofei Istomin Date: Fri, 5 Jun 2015 15:13:45 +0200 Subject: [PATCH] Finish the transmission at the end of a correct packet This patch restores the original behaviour of Cooja when the transmitted packet is correct (which is true in a vast majority of cases). In case of a wrong outgoing packet (wrong length, wrong preamble) the transmission will end when the radio changes its state (which should always happen after transmitting a packet). Benchmarks with RPL (33 runs, 50 nodes, 3 hours of simulated time each) yield the same results (PDR, delay, number of transmitted packets) as with the unmodified Cooja. --- .../org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java b/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java index 9937e6a74..31aa30377 100644 --- a/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java +++ b/tools/cooja/apps/mspsim/src/org/contikios/cooja/mspmote/interfaces/Msp802154Radio.java @@ -146,7 +146,7 @@ public class Msp802154Radio extends Radio implements CustomDataRadio { setChanged(); notifyObservers(); } - isSynchronized = false; + finishTransmission(); } } }); /* addRFListener */