From 28ace6d912f1c7509962db7166ec0777392e0287 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 24 Feb 2009 15:09:07 +0000 Subject: [PATCH] added toString method --- .../sics/cooja/contikimote/interfaces/ContikiRadio.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiRadio.java b/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiRadio.java index e675fce2d..1958210e7 100644 --- a/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiRadio.java +++ b/tools/cooja/java/se/sics/cooja/contikimote/interfaces/ContikiRadio.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ContikiRadio.java,v 1.24 2008/12/04 14:03:42 joxe Exp $ + * $Id: ContikiRadio.java,v 1.25 2009/02/24 15:09:07 fros4943 Exp $ */ package se.sics.cooja.contikimote.interfaces; @@ -388,8 +388,7 @@ public class ContikiRadio extends Radio implements ContikiMoteInterface, PolledA // Calculate transmission duration (ms) int duration = (int) ((280 + 10 * size) / RADIO_TRANSMISSION_RATE_kbps); - transmissionEndTime = myMote.getSimulation().getSimulationTime() - + Math.max(1, duration); + transmissionEndTime = myMote.getSimulation().getSimulationTime() + Math.max(1, duration); lastEventTime = myMote.getSimulation().getSimulationTime(); lastEvent = RadioEvent.TRANSMISSION_STARTED; @@ -497,4 +496,8 @@ public class ContikiRadio extends Radio implements ContikiMoteInterface, PolledA public Mote getMote() { return myMote; } + + public String toString() { + return "Radio at " + myMote; + } }