report
Class TotalContactTimeReport

java.lang.Object
  extended by report.Report
      extended by report.ContactTimesReport
          extended by report.TotalContactTimeReport
All Implemented Interfaces:
ConnectionListener, UpdateListener

public class TotalContactTimeReport
extends ContactTimesReport
implements UpdateListener

Report for total amount of contact times among hosts. Reports how long all nodes have been in contact with some other node. Supports ContactTimesReport.GRANULARITY setting. If update interval is smaller than 1.0 seconds, time stamps may start to drift. Reported values still correspond to reported times. Connections that started during the warmup period are ignored.


Nested Class Summary
 
Nested classes/interfaces inherited from class report.ContactTimesReport
ContactTimesReport.ConnectionInfo
 
Field Summary
static java.lang.String HEADER
          The header of every report file
 
Fields inherited from class report.ContactTimesReport
connections, granularity, GRANULARITY
 
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
TotalContactTimeReport()
           
 
Method Summary
 void hostsDisconnected(DTNHost host1, DTNHost host2)
          Method is called when connection between hosts is disconnected.
 void init()
          Initializes the report output.
 void updated(java.util.List<DTNHost> hosts)
          Reports total contact time if more time than defined with setting ContactTimesReport.GRANULARITY has passed.
 
Methods inherited from class report.ContactTimesReport
addConnection, done, hostsConnected, increaseTimeCount, removeConnection
 
Methods inherited from class report.Report
addWarmupID, format, getAverage, getIntAverage, getIntMedian, getMedian, getScenarioName, getSettings, getSimTime, getVariance, 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

HEADER

public static final java.lang.String HEADER
The header of every report file

See Also:
Constant Field Values
Constructor Detail

TotalContactTimeReport

public TotalContactTimeReport()
Method Detail

init

public void init()
Description copied from class: Report
Initializes the report output. Method is called in the beginning of every new report file. Subclasses must call this method first in their own implementations of init().

Overrides:
init in class ContactTimesReport

hostsDisconnected

public void hostsDisconnected(DTNHost host1,
                              DTNHost host2)
Description copied from interface: ConnectionListener
Method is called when connection between hosts is disconnected.

Specified by:
hostsDisconnected in interface ConnectionListener
Overrides:
hostsDisconnected in class ContactTimesReport
Parameters:
host1 - Host that initiated the disconnection
host2 - Host at the other end of the connection

updated

public void updated(java.util.List<DTNHost> hosts)
Reports total contact time if more time than defined with setting ContactTimesReport.GRANULARITY has passed. Method is called on every update cycle.

Specified by:
updated in interface UpdateListener
Parameters:
hosts - A list of all hosts in the world