report
Class AdjacencyGraphvizReport

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

public class AdjacencyGraphvizReport
extends Report
implements ConnectionListener

Generates Graphviz compatible graph from connections. Connections that happen during the warm up period are ignored.


Field Summary
static java.lang.String GRAPH_NAME
          Name of the graphviz report ("adjgraph")
 
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
AdjacencyGraphvizReport()
          Constructor.
 
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.
protected  void init()
          Initializes the report output.
 void setAllHosts(java.util.Collection<DTNHost> hosts)
          Sets all hosts that should be in the graph at least once
 
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

GRAPH_NAME

public static final java.lang.String GRAPH_NAME
Name of the graphviz report ("adjgraph")

See Also:
Constant Field Values
Constructor Detail

AdjacencyGraphvizReport

public AdjacencyGraphvizReport()
Constructor.

Method Detail

init

protected 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 Report

hostsConnected

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

Specified by:
hostsConnected in interface 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: ConnectionListener
Method is called when connection between hosts is disconnected.

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

setAllHosts

public void setAllHosts(java.util.Collection<DTNHost> hosts)
Sets all hosts that should be in the graph at least once

Parameters:
hosts - Collection of hosts

done

public void done()
Description copied from class: 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