improved capture effect support in mrm: capture effect is effective if the latter transmission is stronger and no later than half the preamble

This commit is contained in:
Fredrik Osterlind 2011-11-03 11:23:51 +01:00
parent 5cde978549
commit ffa4482799
4 changed files with 138 additions and 14 deletions

View file

@ -90,6 +90,15 @@ public class RadioConnection {
return startTime;
}
/**
* @return Start time of ongoing reception
*/
public long getReceptionStartTime() {
/* TODO XXX: This may currently return the start time of an ongoing
* interference. */
return getStartTime();
}
/**
* Add (non-interfered) destination radio to connection.
*
@ -98,6 +107,24 @@ public class RadioConnection {
public void addDestination(Radio radio) {
addDestination(radio, new Long(0));
}
/**
* Experimental: remove destination.
*
* @param radio Radio
*/
public void removeDestination(Radio radio) {
int idx = allDestinations.indexOf(radio);
if (idx < 0) {
logger.fatal("Radio is not a connection destination: " + radio);
return;
}
allDestinations.remove(idx);
allDestinationDelays.remove(idx);
destinationsNonInterfered.remove(radio);
onlyInterfered.remove(radio);
}
/**
* Add (non-interfered) destination radio to connection.