|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreport.Report
report.MovementNs2Report
public class MovementNs2Report
Movement report that generates suitable movement data for ns-2 simulator as described in http://www.isi.edu/nsnam/ns/doc/node174.html. This report ignores the warm up settings.
Field Summary | |
---|---|
static java.lang.String |
COORD_FORMAT
formatting string for coordinate values ("%.5f") |
static java.lang.String |
DEF_NODE_ARRAY
default value for the array name ("$node_") |
static java.lang.String |
DEF_NS_CMD
default value for the ns command ("$ns_") |
static double |
EPSILON
a value "close enough" to zero (1.0E-5). |
static java.lang.String |
NODE_ARR_S
node array's name -setting id ("nodeArray") |
static java.lang.String |
NS_CMD_S
ns command -setting id ("nsCmd") |
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 | |
---|---|
MovementNs2Report()
Constructor. |
Method Summary | |
---|---|
void |
initialLocation(DTNHost host,
Coord location)
Method is called when a host receives its initial location from movement model. |
void |
newDestination(DTNHost host,
Coord dst,
double speed)
Method is called every time a host receives a new destination from its movement model. |
Methods inherited from class report.Report |
---|
addWarmupID, done, format, getAverage, getIntAverage, getIntMedian, getMedian, getScenarioName, getSettings, getSimTime, getVariance, init, isWarmup, isWarmupID, newEvent, removeWarmupID, setPrefix, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NODE_ARR_S
public static final java.lang.String NS_CMD_S
public static final java.lang.String DEF_NODE_ARRAY
public static final java.lang.String DEF_NS_CMD
public static final double EPSILON
public static final java.lang.String COORD_FORMAT
Constructor Detail |
---|
public MovementNs2Report()
NODE_ARR_S
and NS_CMD_S
settings
and uses those values as the name of the node array and ns command.
If the values aren't present, default values of
"$node_"
and
"$ns_"
are used.
Method Detail |
---|
public void initialLocation(DTNHost host, Coord location)
MovementListener
initialLocation
in interface MovementListener
host
- The host that got the locationlocation
- Coordinates of the locationpublic void newDestination(DTNHost host, Coord dst, double speed)
MovementListener
newDestination
in interface MovementListener
host
- The host that got a new destinationdst
- Coordinates of the destinationspeed
- Speed towards that destination
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |