From c92f83c0488112ac0a33f56d6965c6651c39ab1b Mon Sep 17 00:00:00 2001 From: Enrico Joerns Date: Wed, 11 Jun 2014 00:29:26 +0200 Subject: [PATCH] [cooja] skins/TrafficVisualizerSkin: Indicate sent but unreceived messages by a red double circle around mote --- .../cooja/plugins/skins/TrafficVisualizerSkin.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java b/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java index d9a009023..b1ab3633f 100644 --- a/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java +++ b/tools/cooja/java/org/contikios/cooja/plugins/skins/TrafficVisualizerSkin.java @@ -200,6 +200,13 @@ public class TrafficVisualizerSkin implements VisualizerSkin { g.setColor(new Color(colorHistoryIndex, colorHistoryIndex, 1.0f)); Radio source = connArrow.getConnection().getSource(); Point sourcePoint = visualizer.transformPositionToPixel(source.getPosition()); + /* If there is no destination, paint red circles to indicate untransmitted message */ + if (connArrow.getConnection().getDestinations().length == 0) { + g.setColor(new Color(1.0f, colorHistoryIndex, colorHistoryIndex)); + g.drawOval(sourcePoint.x - 20, sourcePoint.y - 20, 40, 40); + g.drawOval(sourcePoint.x - 30, sourcePoint.y - 30, 60, 60); + continue; + } for (Radio destRadio : connArrow.getConnection().getDestinations()) { Position destPos = destRadio.getPosition(); Point destPoint = visualizer.transformPositionToPixel(destPos);