public class ContactTimesReport extends Report implements ConnectionListener
time nrofContacts| Modifier and Type | Class and Description |
|---|---|
protected class |
ContactTimesReport.ConnectionInfo
Objects of this class store time information about contacts.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.HashMap<ContactTimesReport.ConnectionInfo,ContactTimesReport.ConnectionInfo> |
connections |
protected double |
granularity
How many seconds are grouped in one group
|
static java.lang.String |
GRANULARITY
Granularity -setting id ("granularity").
|
DEF_PRECISION, INTERVAL_SETTING, INTERVALLED_FORMAT, NAN, out, OUT_SUFFIX, OUTPUT_SETTING, PRECISION_SETTING, REPORT_NS, REPORTDIR_SETTING, WARMUP_S, warmupIDs, warmupTime| Constructor and Description |
|---|
ContactTimesReport()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addConnection(DTNHost host1,
DTNHost host2) |
void |
done()
Called when the simulation is done, user requested
premature termination or intervalled report generating decided
that it's time for the next report.
|
void |
hostsConnected(DTNHost host1,
DTNHost host2)
Method is called when two hosts are connected.
|
void |
hostsDisconnected(DTNHost host1,
DTNHost host2)
Method is called when connection between hosts is disconnected.
|
protected void |
increaseTimeCount(double time)
Increases the amount of times a certain time value has been seen.
|
protected void |
init()
Initializes the report output.
|
protected ContactTimesReport.ConnectionInfo |
removeConnection(DTNHost host1,
DTNHost host2) |
addWarmupID, checkDirExistence, format, getAverage, getIntAverage, getIntMedian, getMedian, getScenarioName, getSettings, getSimTime, getVariance, isWarmup, isWarmupID, newEvent, removeWarmupID, setPrefix, writeprotected java.util.HashMap<ContactTimesReport.ConnectionInfo,ContactTimesReport.ConnectionInfo> connections
public static final java.lang.String GRANULARITY
protected double granularity
protected void init()
Reportpublic void hostsConnected(DTNHost host1, DTNHost host2)
ConnectionListenerhostsConnected in interface ConnectionListenerhost1 - Host that initiated the connectionhost2 - Host that was connected topublic void hostsDisconnected(DTNHost host1, DTNHost host2)
ConnectionListenerhostsDisconnected in interface ConnectionListenerhost1 - Host that initiated the disconnectionhost2 - Host at the other end of the connectionprotected ContactTimesReport.ConnectionInfo removeConnection(DTNHost host1, DTNHost host2)
protected void increaseTimeCount(double time)
time - The time value that was seen