Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RadioMediums: Inform transmitting motes of interfering transmissions #1312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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");*/
Expand Down
1 change: 1 addition & 0 deletions java/org/contikios/cooja/radiomediums/LogisticLoss.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions java/org/contikios/cooja/radiomediums/UDGM.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions java/org/contikios/mrm/MRM.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down