答案 0 :(得分:1)
在contiki / tools / cooja / java / org / contikios / cooja / plugins / skins / TrafficVisualizerSkin.java文件中找到了答案。
/ *如果没有目的地,请用红色圆圈表示未发送的消息* / 在TrafficVisualizerSkin.java中提到。
public void paintBeforeMotes(Graphics g) {
synchronized (historyList) {
for (RadioConnectionArrow connArrow : historyList) {
float colorHistoryIndex = 1.0f - connArrow.getAge();
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(UNTRANSMITTED_COLOR_RGB[0], UNTRANSMITTED_COLOR_RGB[1], UNTRANSMITTED_COLOR_RGB[2], colorHistoryIndex));
g.drawOval(sourcePoint.x - 20, sourcePoint.y - 20, 40, 40);
g.drawOval(sourcePoint.x - 30, sourcePoint.y - 30, 60, 60);
continue;
}
g.setColor(new Color(TRANSMITTED_COLOR_RGB[0], TRANSMITTED_COLOR_RGB[1], TRANSMITTED_COLOR_RGB[2], colorHistoryIndex));
for (Radio destRadio : connArrow.getConnection().getDestinations()) {
Position destPos = destRadio.getPosition();
Point destPoint = visualizer.transformPositionToPixel(destPos);
drawArrow(g, sourcePoint.x, sourcePoint.y, destPoint.x, destPoint.y, 8);
}
}
}
}