report
Class MessageStatsProfileCastReport

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

public class MessageStatsProfileCastReport
extends report.Report
implements core.MessageListener

Report for generating different kind of total statistics about message relaying performance. Messages that were created during the warm up period are ignored. Some of the statistic aknowleged are: numero of messages dropped, removed, relayed, created, delivered, latency, number of hops.

Note: if some statistics could not be created (e.g. overhead ratio if no messages were delivered) "NaN" is reported for double values and zero for integer median(s).

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

Field Summary
static java.lang.String EVENTS1_NS
           
static java.lang.String GROUP_NS
           
 
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
MessageStatsProfileCastReport()
          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 messageDeleted(core.Message m, DTNHost where, boolean dropped)
          Method is called when a message is deleted
 void messageTransferAborted(core.Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer was aborted before it finished
 void messageTransferred(core.Message m, DTNHost from, DTNHost to, boolean finalTarget)
          Method is called when a message is successfully transferred from a node to another.
 void messageTransferStarted(core.Message m, DTNHost from, DTNHost to)
          Method is called when a message's transfer is started
 void newMessage(core.Message m)
          Method is called when a new message is created
 
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
 

Field Detail

GROUP_NS

public static final java.lang.String GROUP_NS
See Also:
Constant Field Values

EVENTS1_NS

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

MessageStatsProfileCastReport

public MessageStatsProfileCastReport()
Constructor.

Method Detail

messageDeleted

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

Specified by:
messageDeleted in interface core.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(core.Message m,
                                   DTNHost from,
                                   DTNHost to)
Description copied from interface: core.MessageListener
Method is called when a message's transfer was aborted before it finished

Specified by:
messageTransferAborted in interface core.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

messageTransferred

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

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

newMessage

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

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

messageTransferStarted

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

Specified by:
messageTransferStarted in interface core.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.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