report
Class EnergyLevelReport

java.lang.Object
  extended by report.Report
      extended by report.EnergyLevelReport
All Implemented Interfaces:
UpdateListener

public class EnergyLevelReport
extends Report
implements UpdateListener

Node energy level report. Reports the energy level of all (or only some) nodes every configurable-amount-of seconds. Writes reports only after the warmup period.


Field Summary
protected  int granularity
          value of the granularity setting
static java.lang.String GRANULARITY
          Reporting granularity -setting id ("granularity").
protected  double lastUpdate
          time of last update
static java.lang.String REPORTED_NODES
          Optional reported nodes (comma separated list of network addresses).
protected  java.util.HashSet<java.lang.Integer> reportedNodes
          Networks addresses (integers) of the nodes which are reported
 
Fields inherited from class report.Report
DEF_PRECISION, INTERVAL_SETTING, INTERVALLED_FORMAT, NAN, out, OUT_SUFFIX, OUTPUT_SETTING, PRECISION_SETTING, REPORT_NS, REPORTDIR_SETTING, WARMUP_S, warmupIDs, warmupTime
 
Constructor Summary
EnergyLevelReport()
          Constructor.
 
Method Summary
 void updated(java.util.List<DTNHost> hosts)
          Creates a new snapshot of the energy levels if "granularity" seconds have passed since the last snapshot.
 
Methods inherited from class report.Report
addWarmupID, done, format, getAverage, getIntAverage, getIntMedian, getMedian, getScenarioName, getSettings, getSimTime, getVariance, init, isWarmup, isWarmupID, newEvent, setPrefix, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRANULARITY

public static final java.lang.String GRANULARITY
Reporting granularity -setting id ("granularity"). Defines the interval how often (seconds) a new snapshot of energy levels is created

See Also:
Constant Field Values

REPORTED_NODES

public static final java.lang.String REPORTED_NODES
Optional reported nodes (comma separated list of network addresses). By default all nodes are reported.

See Also:
Constant Field Values

granularity

protected final int granularity
value of the granularity setting


lastUpdate

protected double lastUpdate
time of last update


reportedNodes

protected java.util.HashSet<java.lang.Integer> reportedNodes
Networks addresses (integers) of the nodes which are reported

Constructor Detail

EnergyLevelReport

public EnergyLevelReport()
Constructor. Reads the settings and initializes the report module.

Method Detail

updated

public void updated(java.util.List<DTNHost> hosts)
Creates a new snapshot of the energy levels if "granularity" seconds have passed since the last snapshot.

Specified by:
updated in interface UpdateListener
Parameters:
hosts - All the hosts in the world