report
Class ConnectivityListReport

java.lang.Object
  extended by report.Report
      extended by report.ConnectivityListReport
All Implemented Interfaces:
core.ConnectionListener

public class ConnectivityListReport
extends report.Report
implements core.ConnectionListener

Class that saves in a file all the connections between two hosts, if two of them have already seen ad encounter another the visit countes gets a +1

Author:
Copyright Andrea Campanella, NPTLab, Public university of Milan, 2014

Field Summary
 
Fields inherited from class report.Report
DEF_PRECISION, INTERVAL_SETTING, INTERVALLED_FORMAT, NAN, OUT_SUFFIX, OUTPUT_SETTING, PRECISION_SETTING, REPORT_NS, REPORTDIR_SETTING, WARMUP_S
 
Constructor Summary
ConnectivityListReport()
           
 
Method Summary
 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.
 
Methods inherited from class report.Report
getAverage, getIntAverage, getIntMedian, getMedian, getVariance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectivityListReport

public ConnectivityListReport()
Method Detail

hostsConnected

public void hostsConnected(DTNHost host1,
                           DTNHost host2)
Description copied from interface: core.ConnectionListener
Method is called when two hosts are connected.

Specified by:
hostsConnected in interface core.ConnectionListener
Parameters:
host1 - Host that initiated the connection
host2 - Host that was connected to

hostsDisconnected

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

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

done

public void done()
Description copied from class: report.Report
Called when the simulation is done, user requested premature termination or intervalled report generating decided that it's time for the next report.

Overrides:
done in class report.Report