report
Class MessageLocationReport

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

public class MessageLocationReport
extends Report
implements UpdateListener

Message location report. Reports the location (coordinates) of messages. The messages that are reported and the reporting interval can be configured.


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_MESSAGES
          Reported messages -setting id ("messages").
protected  java.util.HashSet<java.lang.String> reportedMessages
          Identifiers of the message 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
MessageLocationReport()
          Constructor.
 
Method Summary
 void updated(java.util.List<DTNHost> hosts)
          Creates a new snapshot of the message locations 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 message locations is created

See Also:
Constant Field Values

REPORTED_MESSAGES

public static final java.lang.String REPORTED_MESSAGES
Reported messages -setting id ("messages"). Defines the IDs of the messages that are reported (comma separated list)

See Also:
Constant Field Values

granularity

protected final int granularity
value of the granularity setting


lastUpdate

protected double lastUpdate
time of last update


reportedMessages

protected java.util.HashSet<java.lang.String> reportedMessages
Identifiers of the message which are reported

Constructor Detail

MessageLocationReport

public MessageLocationReport()
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 message locations if "granularity" seconds have passed since the last snapshot.

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