driver
Class ndp

java.lang.Object
  extended by driver.ndp

public class ndp
extends java.lang.Object

Node Discovery Protocol macro-benchmark.

Version:
$Id: ndp.java,v 1.16 2004/04/06 16:07:42 barr Exp $
Author:
Rimon Barr <barr+jist@cs.cornell.edu>

Nested Class Summary
private static class ndp.cmdlineOpts
          Parsed command-line options.
 
Field Summary
static int GRANULARITY
          random waypoint granularity.
static int MAX_SPEED
          random waypoint maximum speed.
static int MIN_SPEED
          random waypoint minimum speed.
private static int MODE_DENSITY
          benchmark mode.
private static java.lang.String MODE_DENSITY_STRING
          benchmark mode string.
private static int MODE_INVALID
          benchmark mode.
private static int MODE_MEM
          benchmark mode.
private static java.lang.String MODE_MEM_STRING
          benchmark mode string.
private static int MODE_SPATIAL_GRID
          benchmark binning types.
private static int MODE_SPATIAL_HIER
          benchmark binning types.
private static int MODE_SPATIAL_LINEAR
          benchmark binning types.
private static java.lang.String MODE_SPATIAL_STRING_GRID
          benchmark binning type strings.
private static java.lang.String MODE_SPATIAL_STRING_HIER
          benchmark binning type strings.
private static java.lang.String MODE_SPATIAL_STRING_LINEAR
          benchmark binning type strings.
private static int MODE_TIME
          benchmark mode.
private static java.lang.String MODE_TIME_STRING
          benchmark mode string.
static int PAUSE_TIME
          random waypoint pause time.
private static long startTime
          benchmark start time.
static java.lang.String VERSION
          benchmark version.
 
Constructor Summary
ndp()
           
 
Method Summary
static void createNode(int i, Field field, Placement placement, RadioInfo.RadioInfoShared radioInfoShared, Mapper protMap, PacketLoss plIn, PacketLoss plOut)
          Initialize simulation node.
static Field createSim(Location.Location2D bounds, Spatial spatial, long nodes)
          Initialize simulation field.
static void main(java.lang.String[] args)
          Benchmark entry point: heartbeat benchmark.
private static ndp.cmdlineOpts parseCommandLineOptions(java.lang.String[] args)
          Parse command-line options.
static void reportMem()
          Print memory information.
private static void showUsage()
          Print benchmark command-line syntax.
private static void showVersion()
          Print benchmark version information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
benchmark version.

See Also:
Constant Field Values

MODE_INVALID

private static final int MODE_INVALID
benchmark mode.

See Also:
Constant Field Values

MODE_TIME

private static final int MODE_TIME
benchmark mode.

See Also:
Constant Field Values

MODE_MEM

private static final int MODE_MEM
benchmark mode.

See Also:
Constant Field Values

MODE_DENSITY

private static final int MODE_DENSITY
benchmark mode.

See Also:
Constant Field Values

MODE_TIME_STRING

private static final java.lang.String MODE_TIME_STRING
benchmark mode string.

See Also:
Constant Field Values

MODE_MEM_STRING

private static final java.lang.String MODE_MEM_STRING
benchmark mode string.

See Also:
Constant Field Values

MODE_DENSITY_STRING

private static final java.lang.String MODE_DENSITY_STRING
benchmark mode string.

See Also:
Constant Field Values

MODE_SPATIAL_LINEAR

private static final int MODE_SPATIAL_LINEAR
benchmark binning types.

See Also:
Constant Field Values

MODE_SPATIAL_GRID

private static final int MODE_SPATIAL_GRID
benchmark binning types.

See Also:
Constant Field Values

MODE_SPATIAL_HIER

private static final int MODE_SPATIAL_HIER
benchmark binning types.

See Also:
Constant Field Values

MODE_SPATIAL_STRING_LINEAR

private static final java.lang.String MODE_SPATIAL_STRING_LINEAR
benchmark binning type strings.

See Also:
Constant Field Values

MODE_SPATIAL_STRING_GRID

private static final java.lang.String MODE_SPATIAL_STRING_GRID
benchmark binning type strings.

See Also:
Constant Field Values

MODE_SPATIAL_STRING_HIER

private static final java.lang.String MODE_SPATIAL_STRING_HIER
benchmark binning type strings.

See Also:
Constant Field Values

PAUSE_TIME

public static final int PAUSE_TIME
random waypoint pause time.

See Also:
Constant Field Values

GRANULARITY

public static final int GRANULARITY
random waypoint granularity.

See Also:
Constant Field Values

MIN_SPEED

public static final int MIN_SPEED
random waypoint minimum speed.

See Also:
Constant Field Values

MAX_SPEED

public static final int MAX_SPEED
random waypoint maximum speed.

See Also:
Constant Field Values

startTime

private static long startTime
benchmark start time.

Constructor Detail

ndp

public ndp()
Method Detail

showVersion

private static void showVersion()
Print benchmark version information.


showUsage

private static void showUsage()
Print benchmark command-line syntax.


parseCommandLineOptions

private static ndp.cmdlineOpts parseCommandLineOptions(java.lang.String[] args)
                                                throws jargs.gnu.CmdLineParser.OptionException
Parse command-line options.

Parameters:
args - command-line parameters
Returns:
parsed command-line options
Throws:
CmdLineParser.OptionException - invalid option encountered

createNode

public static void createNode(int i,
                              Field field,
                              Placement placement,
                              RadioInfo.RadioInfoShared radioInfoShared,
                              Mapper protMap,
                              PacketLoss plIn,
                              PacketLoss plOut)
Initialize simulation node.

Parameters:
i - node number
field - simulation field
placement - node placement model
radioInfoShared - shared radio information
protMap - shared protocol map
plIn - incoming packet loss model
plOut - outgoing packet loss model

createSim

public static Field createSim(Location.Location2D bounds,
                              Spatial spatial,
                              long nodes)
Initialize simulation field.

Parameters:
bounds - size of field
spatial - binning radio container
nodes - number of nodes
Returns:
simulation field

main

public static void main(java.lang.String[] args)
Benchmark entry point: heartbeat benchmark.

Parameters:
args - command-line parameters

reportMem

public static void reportMem()
Print memory information.