Added Routing Metric and ETX
This commit is contained in:
parent
3851548684
commit
2642a55174
4 changed files with 59 additions and 22 deletions
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: CollectServer.java,v 1.21 2010/09/28 23:12:16 nifi Exp $
|
||||
* $Id: CollectServer.java,v 1.22 2010/09/30 22:24:45 nifi Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
|
@ -34,8 +34,8 @@
|
|||
*
|
||||
* Authors : Joakim Eriksson, Niclas Finne
|
||||
* Created : 3 jul 2008
|
||||
* Updated : $Date: 2010/09/28 23:12:16 $
|
||||
* $Revision: 1.21 $
|
||||
* Updated : $Date: 2010/09/30 22:24:45 $
|
||||
* $Revision: 1.22 $
|
||||
*/
|
||||
|
||||
package se.sics.contiki.collect;
|
||||
|
@ -331,6 +331,28 @@ public class CollectServer {
|
|||
dataset.addValue(data.getNode().getSensorDataAggregator().getAverageValue(SensorData.HOPS), categories[1], data.getNode().getName());
|
||||
}
|
||||
},
|
||||
new TimeChartPanel(this, NETWORK, "Routing Metric (Over Time)", "Routing Metric", "Time", "Routing Metric") {
|
||||
{
|
||||
ValueAxis axis = chart.getXYPlot().getRangeAxis();
|
||||
((NumberAxis)axis).setAutoRangeIncludesZero(true);
|
||||
axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
|
||||
setMaxItemCount(defaultMaxItemCount);
|
||||
}
|
||||
protected double getSensorDataValue(SensorData data) {
|
||||
return data.getValue(SensorData.BEST_NEIGHBOR_RTMETRIC) + data.getValue(SensorData.BEST_NEIGHBOR_ETX);
|
||||
}
|
||||
},
|
||||
new TimeChartPanel(this, NETWORK, "ETX (Over Time)", "ETX to Next Hop", "Time", "ETX") {
|
||||
{
|
||||
ValueAxis axis = chart.getXYPlot().getRangeAxis();
|
||||
((NumberAxis)axis).setAutoRangeIncludesZero(true);
|
||||
axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
|
||||
setMaxItemCount(defaultMaxItemCount);
|
||||
}
|
||||
protected double getSensorDataValue(SensorData data) {
|
||||
return data.getValue(SensorData.BEST_NEIGHBOR_ETX);
|
||||
}
|
||||
},
|
||||
new AggregatedTimeChartPanel<int[]>(this, NETWORK,
|
||||
"Next Hop (Over Time)", "Time", "Next Hop Changes") {
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: Node.java,v 1.5 2010/09/14 22:40:59 nifi Exp $
|
||||
* $Id: Node.java,v 1.6 2010/09/30 22:24:45 nifi Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
|
@ -34,8 +34,8 @@
|
|||
*
|
||||
* Authors : Joakim Eriksson, Niclas Finne
|
||||
* Created : 3 jul 2008
|
||||
* Updated : $Date: 2010/09/14 22:40:59 $
|
||||
* $Revision: 1.5 $
|
||||
* Updated : $Date: 2010/09/30 22:24:45 $
|
||||
* $Revision: 1.6 $
|
||||
*/
|
||||
|
||||
package se.sics.contiki.collect;
|
||||
|
@ -56,7 +56,8 @@ public class Node implements Comparable<Node> {
|
|||
private final String id;
|
||||
private final String name;
|
||||
|
||||
private int x = -1, y = -1;
|
||||
public int x = -1;
|
||||
public int y = -1;
|
||||
|
||||
private Hashtable<String,Object> objectTable;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: SensorDataAggregator.java,v 1.9 2010/09/24 05:54:04 nifi Exp $
|
||||
* $Id: SensorDataAggregator.java,v 1.10 2010/09/30 22:24:45 nifi Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
|
@ -34,8 +34,8 @@
|
|||
*
|
||||
* Authors : Joakim Eriksson, Niclas Finne
|
||||
* Created : 20 aug 2008
|
||||
* Updated : $Date: 2010/09/24 05:54:04 $
|
||||
* $Revision: 1.9 $
|
||||
* Updated : $Date: 2010/09/30 22:24:45 $
|
||||
* $Revision: 1.10 $
|
||||
*/
|
||||
|
||||
package se.sics.contiki.collect;
|
||||
|
@ -241,6 +241,10 @@ public class SensorDataAggregator implements SensorInfo {
|
|||
return dataCount > 0 ? (-39.6 + 0.01 * (values[TEMPERATURE] / dataCount)) : 0.0;
|
||||
}
|
||||
|
||||
public double getAverageRtmetric() {
|
||||
return dataCount > 0 ? ((values[BEST_NEIGHBOR_RTMETRIC] + values[BEST_NEIGHBOR_ETX]) / dataCount) : 0.0;
|
||||
}
|
||||
|
||||
public double getAverageRadioIntensity() {
|
||||
return getAverageValue(RSSI);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: NodeInfoPanel.java,v 1.7 2010/09/26 21:48:21 nifi Exp $
|
||||
* $Id: NodeInfoPanel.java,v 1.8 2010/09/30 22:24:45 nifi Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
|
@ -34,8 +34,8 @@
|
|||
*
|
||||
* Authors : Joakim Eriksson, Niclas Finne
|
||||
* Created : 6 sep 2010
|
||||
* Updated : $Date: 2010/09/26 21:48:21 $
|
||||
* $Revision: 1.7 $
|
||||
* Updated : $Date: 2010/09/30 22:24:45 $
|
||||
* $Revision: 1.8 $
|
||||
*/
|
||||
|
||||
package se.sics.contiki.collect.gui;
|
||||
|
@ -113,6 +113,16 @@ public class NodeInfoPanel extends JPanel implements Visualizer, Configurable {
|
|||
return node.getSensorDataAggregator().getAverageValue(SensorData.HOPS);
|
||||
}
|
||||
},
|
||||
new TableData("Average Rtmetric", "Average Routing Metric", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getAverageRtmetric();
|
||||
}
|
||||
},
|
||||
new TableData("Average ETX", "Average ETX to Next Hop", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getAverageValue(SensorData.BEST_NEIGHBOR_ETX);
|
||||
}
|
||||
},
|
||||
new TableData("Next Hop Changes", "Next Hop Change Count", Integer.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getNextHopChangeCount();
|
||||
|
@ -123,50 +133,50 @@ public class NodeInfoPanel extends JPanel implements Visualizer, Configurable {
|
|||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getEstimatedRestarts();
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
|
||||
// Power
|
||||
new TableData("CPU Power", "Average CPU Power Consumption", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getCPUPower();
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
new TableData("LPM Power", "Average LPM Power Consumption", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getLPMPower();
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
new TableData("Listen Power", "Average Radio Listen Power Consumption", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getListenPower();
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
new TableData("Transmit Power", "Average Radio Transmit Power Consumption", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getTransmitPower();
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
new TableData("Power", "Average Power Consumption", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getAveragePower();
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
new TableData("Power Time", "Power Measure Time", Long.class) {
|
||||
public Object getValue(Node node) {
|
||||
return node.getSensorDataAggregator().getPowerMeasureTime();
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
|
||||
new TableData("Listen Duty Cycle", "Average Radio Listen Duty Cycle (%)", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return 100 * node.getSensorDataAggregator().getAverageDutyCycle(SensorInfo.TIME_LISTEN);
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
new TableData("Transmit Duty Cycle", "Average Radio Transmit Duty Cycle (%)", Double.class) {
|
||||
public Object getValue(Node node) {
|
||||
return 100 * node.getSensorDataAggregator().getAverageDutyCycle(SensorInfo.TIME_TRANSMIT);
|
||||
}
|
||||
}.setVisible(false),
|
||||
},
|
||||
|
||||
// Inter-packet times
|
||||
new TableData("Average Inter-packet Time", Long.class) {
|
||||
|
|
Loading…
Reference in a new issue