Classes | Public Member Functions

ns3::Ns2MobilityHelper Class Reference
[Mobility]

Helper class which can read ns-2 movement files and configure nodes mobility. More...

#include <ns2-mobility-helper.h>

List of all members.

Classes

class  ObjectStore

Public Member Functions

 Ns2MobilityHelper (std::string filename)
void Install (void) const
template<typename T >
void Install (T begin, T end) const

Detailed Description

Helper class which can read ns-2 movement files and configure nodes mobility.

This implementation is based on the ns2 movement documentation of ns2 as described in http://www.isi.edu/nsnam/ns/doc/node174.html

Valid trace files use the following ns2 statements:

   $node set X_ x1
   $node set Y_ y1
   $node set Z_ z1
   $ns at $time $node setdest x2 y2 speed
   $ns at $time $node set X_ x1
   $ns at $time $node set Y_ Y1
   $ns at $time $node set Z_ Z1
 

Following tools are known to support this format:

See usage example in examples/mobility/ns2-mobility-trace.cc


Constructor & Destructor Documentation

ns3::Ns2MobilityHelper::Ns2MobilityHelper ( std::string  filename  ) 
Parameters:
filename filename of file which contains the ns2 movement trace.

Member Function Documentation

void ns3::Ns2MobilityHelper::Install ( void   )  const

Read the ns2 trace file and configure the movement patterns of all nodes contained in the global ns3::NodeList whose nodeId is matches the nodeId of the nodes in the trace file.

template<typename T >
void ns3::Ns2MobilityHelper::Install ( begin,
end 
) const
Parameters:
begin an iterator which points to the start of the input object array.
end an iterator which points to the end of the input object array.

Read the ns2 trace file and configure the movement patterns of all input objects. Each input object is identified by a unique node id which reflects the index of the object in the input array.


The documentation for this class was generated from the following file: