Added the number of neighbors to the collection view app
This commit is contained in:
parent
f9687e8f5f
commit
c0fb601354
2 changed files with 19 additions and 7 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.22 2010/09/30 22:24:45 nifi Exp $
|
||||
* $Id: CollectServer.java,v 1.23 2010/10/03 20:19:12 adamdunkels Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
|
@ -34,8 +34,8 @@
|
|||
*
|
||||
* Authors : Joakim Eriksson, Niclas Finne
|
||||
* Created : 3 jul 2008
|
||||
* Updated : $Date: 2010/09/30 22:24:45 $
|
||||
* $Revision: 1.22 $
|
||||
* Updated : $Date: 2010/10/03 20:19:12 $
|
||||
* $Revision: 1.23 $
|
||||
*/
|
||||
|
||||
package se.sics.contiki.collect;
|
||||
|
@ -310,6 +310,17 @@ public class CollectServer {
|
|||
return data.getLight2();
|
||||
}
|
||||
},
|
||||
new TimeChartPanel(this, NETWORK, "Neighbors (Over Time)", "Neighbor Count", "Time", "Neighbors") {
|
||||
{
|
||||
ValueAxis axis = chart.getXYPlot().getRangeAxis();
|
||||
((NumberAxis)axis).setAutoRangeIncludesZero(true);
|
||||
axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
|
||||
setMaxItemCount(defaultMaxItemCount);
|
||||
}
|
||||
protected double getSensorDataValue(SensorData data) {
|
||||
return data.getValue(SensorData.NUM_NEIGHBORS);
|
||||
}
|
||||
},
|
||||
new TimeChartPanel(this, NETWORK, "Network Hops (Over Time)", "Network Hops", "Time", "Hops") {
|
||||
{
|
||||
ValueAxis axis = chart.getXYPlot().getRangeAxis();
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: SensorInfo.java,v 1.2 2008/11/10 21:14:20 adamdunkels Exp $
|
||||
* $Id: SensorInfo.java,v 1.3 2010/10/03 20:19:12 adamdunkels Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
|
@ -34,8 +34,8 @@
|
|||
*
|
||||
* Authors : Joakim Eriksson, Niclas Finne
|
||||
* Created : 20 aug 2008
|
||||
* Updated : $Date: 2008/11/10 21:14:20 $
|
||||
* $Revision: 1.2 $
|
||||
* Updated : $Date: 2010/10/03 20:19:12 $
|
||||
* $Revision: 1.3 $
|
||||
*/
|
||||
|
||||
package se.sics.contiki.collect;
|
||||
|
@ -78,7 +78,8 @@ public interface SensorInfo {
|
|||
public static final int BEST_NEIGHBOR_RTMETRIC = 22;
|
||||
public static final int BATTERY_VOLTAGE = 23;
|
||||
public static final int BATTERY_INDICATOR = 24;
|
||||
public static final int NUM_NEIGHBORS = 25;
|
||||
|
||||
public static final int VALUES_COUNT = 25;
|
||||
public static final int VALUES_COUNT = 26;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue