report
Class CreateNodeTrace

java.lang.Object
  extended by report.Report
      extended by report.CreateNodeTrace
All Implemented Interfaces:
core.MovementListener

public class CreateNodeTrace
extends report.Report
implements core.MovementListener

Class that gets all the informations on the mobility of a user by implementing the MovementListener.

Author:
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
CreateNodeTrace()
           
 
Method Summary
 void initialLocation(DTNHost host, core.Coord location)
          When the node is assigned it's first location this method saves in the DTNHWMap the first location visited the day and the time.
 void newDestination(DTNHost host, core.Coord destination, double speed)
          When the method is called it saves in the DTNHWMap the destination visited, the day and the time.
 
Methods inherited from class report.Report
done, getAverage, getIntAverage, getIntMedian, getMedian, getVariance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateNodeTrace

public CreateNodeTrace()
Method Detail

newDestination

public void newDestination(DTNHost host,
                           core.Coord destination,
                           double speed)
When the method is called it saves in the DTNHWMap the destination visited, the day and the time.

Specified by:
newDestination in interface core.MovementListener
Parameters:
host - DTNHost the moving host
destination - Coord the coordinates of the location where the host is going
speed - Double the speed of the movement, unused in this implementation

initialLocation

public void initialLocation(DTNHost host,
                            core.Coord location)
When the node is assigned it's first location this method saves in the DTNHWMap the first location visited the day and the time.

Specified by:
initialLocation in interface core.MovementListener
Parameters:
host - DTNHost the moving host
location - Coord the coordinates of the location where the host is put