diff --git a/java/org/contikios/cooja/radiomediums/DirectedGraphMedium.java b/java/org/contikios/cooja/radiomediums/DirectedGraphMedium.java index d2b71c370..5d19e6251 100644 --- a/java/org/contikios/cooja/radiomediums/DirectedGraphMedium.java +++ b/java/org/contikios/cooja/radiomediums/DirectedGraphMedium.java @@ -288,7 +288,13 @@ protected RadioConnection createConnections(Radio source) { newConn.addInterfered(dest.radio); continue; } - + + if (dest.radio.isTransmitting()) { + newConn.addInterfered(dest.radio); + dest.radio.interfereAnyReception(); + continue; + } + if (dest.radio.isReceiving()) { /* Fail: radio is already actively receiving */ /*logger.info(source + ": Fail, receiving");*/ diff --git a/java/org/contikios/cooja/radiomediums/LogisticLoss.java b/java/org/contikios/cooja/radiomediums/LogisticLoss.java index 001f06aa4..1a13a4951 100644 --- a/java/org/contikios/cooja/radiomediums/LogisticLoss.java +++ b/java/org/contikios/cooja/radiomediums/LogisticLoss.java @@ -254,6 +254,7 @@ protected RadioConnection createConnections(Radio sender) { newConnection.addInterfered(recv); } else if (recv.isTransmitting()) { newConnection.addInterfered(recv); + recv.interfereAnyReception(); } else { boolean receiveNewOk = random.nextDouble() < getRxSuccessProbability(sender, recv); diff --git a/java/org/contikios/cooja/radiomediums/UDGM.java b/java/org/contikios/cooja/radiomediums/UDGM.java index 83318bdb6..b209012a6 100644 --- a/java/org/contikios/cooja/radiomediums/UDGM.java +++ b/java/org/contikios/cooja/radiomediums/UDGM.java @@ -219,6 +219,7 @@ protected RadioConnection createConnections(Radio sender) { newConnection.addInterfered(recv); } else if (recv.isTransmitting()) { newConnection.addInterfered(recv); + recv.interfereAnyReception(); } else if (recv.isReceiving() || (random.nextDouble() > getRxSuccessProbability(sender, recv))) { /* Was receiving, or reception failed: start interfering */ diff --git a/java/org/contikios/mrm/MRM.java b/java/org/contikios/mrm/MRM.java index 4c69da53c..100e97693 100644 --- a/java/org/contikios/mrm/MRM.java +++ b/java/org/contikios/mrm/MRM.java @@ -200,6 +200,7 @@ public Radio getToRadio() { } } else if (recv.isTransmitting()) { newConnection.addInterfered(recv, recvSignalStrength); + recv.interfereAnyReception(); } else if (recv.isReceiving()) { /* Was already receiving: start interfering. * Assuming no continuous preambles checking */