report
Class MessageGraphvizReport

java.lang.Object
  extended by report.Report
      extended by report.MessageGraphvizReport
All Implemented Interfaces:
MessageListener

public class MessageGraphvizReport
extends Report
implements MessageListener

Creates a graphviz compatible graph of messages that were passed. Messages created during the warm up period are ignored.


Field Summary
static java.lang.String GRAPH_NAME
          Name of the graphviz report ("msggraph")
 
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
MessageGraphvizReport()
          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.
protected  void init()
          Initializes the report output.
 void messageDeleted(Message m, DTNHost where, boolean dropped)
          Method is called when a message is deleted
 void messageTransferAborted(Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer was aborted before it finished
 void messageTransferred(Message m, DTNHost from, DTNHost to, boolean firstDelivery)
          Method is called when a message is successfully transferred from a node to another.
 void messageTransferStarted(Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer is started
 void newMessage(Message m)
          Method is called when a new message is created
 
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 ("msggraph")

See Also:
Constant Field Values
Constructor Detail

MessageGraphvizReport

public MessageGraphvizReport()
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

newMessage

public void newMessage(Message m)
Description copied from interface: MessageListener
Method is called when a new message is created

Specified by:
newMessage in interface MessageListener
Parameters:
m - Message that was created

messageTransferred

public void messageTransferred(Message m,
                               DTNHost from,
                               DTNHost to,
                               boolean firstDelivery)
Description copied from interface: MessageListener
Method is called when a message is successfully transferred from a node to another.

Specified by:
messageTransferred in interface MessageListener
Parameters:
m - The message that was transferred
from - Node where the message was transferred from
to - Node where the message was transferred to
firstDelivery - Was the target node final destination of the message and received this message for the first time.

messageDeleted

public void messageDeleted(Message m,
                           DTNHost where,
                           boolean dropped)
Description copied from interface: MessageListener
Method is called when a message is deleted

Specified by:
messageDeleted in interface MessageListener
Parameters:
m - The message that was deleted
where - The host where the message was deleted
dropped - True if the message was dropped, false if removed

messageTransferAborted

public void messageTransferAborted(Message m,
                                   DTNHost from,
                                   DTNHost to)
Description copied from interface: MessageListener
Method is called when a message's transfer was aborted before it finished

Specified by:
messageTransferAborted in interface MessageListener
Parameters:
m - The message that was being transferred
from - Node where the message was being transferred from
to - Node where the message was being transferred to

messageTransferStarted

public void messageTransferStarted(Message m,
                                   DTNHost from,
                                   DTNHost to)
Description copied from interface: MessageListener
Method is called when a message's transfer is started

Specified by:
messageTransferStarted in interface MessageListener
Parameters:
m - The message that is going to be transferred
from - Node where the message is transferred from
to - Node where the message is transferred to

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