report
Class TotalContactTimeReport
java.lang.Object
report.Report
report.ContactTimesReport
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.
Field Summary |
static java.lang.String |
HEADER
The header of every report file |
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 |
Methods inherited from class report.Report |
addWarmupID, format, getAverage, getIntAverage, getIntMedian, getMedian, getScenarioName, getSettings, getSimTime, getVariance, isWarmup, isWarmupID, newEvent, removeWarmupID, setPrefix, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HEADER
public static final java.lang.String HEADER
- The header of every report file
- See Also:
- Constant Field Values
TotalContactTimeReport
public TotalContactTimeReport()
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 disconnectionhost2
- 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