report
Class MessageReport

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

public class MessageReport
extends Report
implements MessageListener

Reports delivered messages report: message_id creation_time deliver_time (duplicate)


Field Summary
static java.lang.String HEADER
           
 
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
MessageReport()
          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 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

HEADER

public static final java.lang.String HEADER
See Also:
Constant Field Values
Constructor Detail

MessageReport

public MessageReport()
Constructor.

Method Detail

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 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.

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

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