public class MovementNs2Report extends Report implements MovementListener
| Modifier and Type | Field and Description |
|---|---|
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")
|
DEF_PRECISION, INTERVAL_SETTING, INTERVALLED_FORMAT, NAN, out, OUT_SUFFIX, OUTPUT_SETTING, PRECISION_SETTING, REPORT_NS, REPORTDIR_SETTING, WARMUP_S, warmupIDs, warmupTime| Constructor and Description |
|---|
MovementNs2Report()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addWarmupID, checkDirExistence, done, format, getAverage, getIntAverage, getIntMedian, getMedian, getScenarioName, getSettings, getSimTime, getVariance, init, isWarmup, isWarmupID, newEvent, removeWarmupID, setPrefix, writepublic 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
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.public void initialLocation(DTNHost host, Coord location)
MovementListenerinitialLocation in interface MovementListenerhost - The host that got the locationlocation - Coordinates of the locationpublic void newDestination(DTNHost host, Coord dst, double speed)
MovementListenernewDestination in interface MovementListenerhost - The host that got a new destinationdst - Coordinates of the destinationspeed - Speed towards that destination