diff --git a/tools/cooja/java/se/sics/cooja/RadioConnection.java b/tools/cooja/java/se/sics/cooja/RadioConnection.java index 63b4c6524..71e17b12a 100644 --- a/tools/cooja/java/se/sics/cooja/RadioConnection.java +++ b/tools/cooja/java/se/sics/cooja/RadioConnection.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: RadioConnection.java,v 1.1 2006/08/21 12:12:55 fros4943 Exp $ + * $Id: RadioConnection.java,v 1.2 2006/10/06 13:31:02 fros4943 Exp $ */ package se.sics.cooja; @@ -84,6 +84,20 @@ public class RadioConnection { destinationPositions.add(position); destinationData.add(data); } + + /** + * Remove a connection destination. + * + * @param radio Destination to remove + */ + public void removeDestination(Radio radio) { + int pos = destinationRadios.indexOf(radio); + if (pos > 0) { + destinationRadios.remove(pos); + destinationPositions.remove(pos); + destinationData.remove(pos); + } + } /** * @return Source radio