radio connection update: radio should not be removed from destinations, but instead flagged as interfered

This commit is contained in:
fros4943 2009-11-25 15:43:03 +00:00
parent 45d23c026e
commit 24d0330d2d
2 changed files with 4 additions and 6 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: MRM.java,v 1.10 2009/10/27 10:14:09 fros4943 Exp $ * $Id: MRM.java,v 1.11 2009/11/25 15:43:03 fros4943 Exp $
*/ */
package se.sics.mrm; package se.sics.mrm;
@ -148,10 +148,9 @@ public class MRM extends AbstractRadioMedium {
} }
} }
if (existingConn != null) { if (existingConn != null) {
// Change radio from receiving to interfered /* Flag radio as interfered */
existingConn.removeDestination(listeningRadio);
existingConn.addInterfered(listeningRadio); existingConn.addInterfered(listeningRadio);
listeningRadio.interfereAnyReception();
} }
} else { } else {
// Radio OK to receive // Radio OK to receive

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: DirectedGraphMedium.java,v 1.3 2009/10/27 10:10:03 fros4943 Exp $ * $Id: DirectedGraphMedium.java,v 1.4 2009/11/25 15:44:04 fros4943 Exp $
*/ */
package se.sics.cooja.radiomediums; package se.sics.cooja.radiomediums;
@ -318,7 +318,6 @@ public class DirectedGraphMedium extends AbstractRadioMedium {
} }
} }
if (otherConnection != null) { if (otherConnection != null) {
otherConnection.removeDestination(dest.radio);
otherConnection.addInterfered(dest.radio); otherConnection.addInterfered(dest.radio);
} }
continue; continue;