ns3::RandomWaypointMobilityModel Class Reference

a random waypoint mobility model More...

#include <random-waypoint-mobility-model.h>

Inheritance diagram for ns3::RandomWaypointMobilityModel:
Inheritance graph
[legend]
Collaboration diagram for ns3::RandomWaypointMobilityModel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RandomWaypointMobilityModel ()

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::RandomWaypointMobilityModel.

Private Member Functions

void Start (void)
void BeginWalk (void)
virtual Vector DoGetPosition (void) const
virtual void DoSetPosition (const Vector &position)
virtual Vector DoGetVelocity (void) const

Private Attributes

StaticSpeedHelper m_helper
Ptr< PositionAllocatorm_position
RandomVariable m_speed
RandomVariable m_pause
EventId m_event

Detailed Description

a random waypoint mobility model

Each object chooses a random destination "waypoint", a random speed, and a random pause time: it then pauses for the specified pause time, and starts moving towards the specified destination with the specified speed. Once the destination is reached the process starts again.

The implementation of this model is not 2d-specific. i.e. if you provide a 3d random waypoint position model to this mobility model, the model will still work. There is no 3d position allocator for now but it should be trivial to add one.

Definition at line 44 of file random-waypoint-mobility-model.h.


Constructor & Destructor Documentation

ns3::RandomWaypointMobilityModel::RandomWaypointMobilityModel (  ) 

Definition at line 55 of file random-waypoint-mobility-model.cc.


Member Function Documentation

void ns3::RandomWaypointMobilityModel::BeginWalk ( void   )  [private]
Vector ns3::RandomWaypointMobilityModel::DoGetPosition ( void   )  const [private, virtual]
Returns:
the current position.

Concrete subclasses of this base class must implement this method.

Implements ns3::MobilityModel.

Definition at line 91 of file random-waypoint-mobility-model.cc.

References ns3::StaticSpeedHelper::GetCurrentPosition(), m_helper, and ns3::StaticSpeedHelper::Update().

Vector ns3::RandomWaypointMobilityModel::DoGetVelocity ( void   )  const [private, virtual]
Returns:
the current velocity.

Concrete subclasses of this base class must implement this method.

Implements ns3::MobilityModel.

Definition at line 104 of file random-waypoint-mobility-model.cc.

void ns3::RandomWaypointMobilityModel::DoSetPosition ( const Vector position  )  [private, virtual]
Parameters:
position the position to set.

Concrete subclasses of this base class must implement this method.

Implements ns3::MobilityModel.

Definition at line 97 of file random-waypoint-mobility-model.cc.

TypeId ns3::RandomWaypointMobilityModel::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::RandomWaypointMobilityModel.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/$ns3MobilityModel/$ns3RandomWaypointMobilityModel

Attributes defined for this type:

  • Speed: A random variable used to pick the speed of a random waypoint model.
  • Pause: A random variable used to pick the pause of a random waypoint model.
  • Position: The position model used to pick a destination point.

Attributes defined in parent class ns3::MobilityModel:

  • Position: The current position of the mobility model.
  • Velocity: The current velocity of the mobility model.

No TraceSources defined for this type.
TraceSources defined in parent class ns3::MobilityModel:

  • CourseChange: The value of the position and/or velocity vector changed

Reimplemented from ns3::MobilityModel.

Definition at line 30 of file random-waypoint-mobility-model.cc.

References ns3::TypeId::AddConstructor(), m_pause, m_position, m_speed, and ns3::TypeId::SetParent().

void ns3::RandomWaypointMobilityModel::Start ( void   )  [private]

Member Data Documentation

Definition at line 60 of file random-waypoint-mobility-model.h.

Referenced by BeginWalk(), and Start().

Definition at line 56 of file random-waypoint-mobility-model.h.

Referenced by BeginWalk(), DoGetPosition(), and Start().

Definition at line 59 of file random-waypoint-mobility-model.h.

Referenced by GetTypeId(), and Start().

Definition at line 57 of file random-waypoint-mobility-model.h.

Referenced by BeginWalk(), and GetTypeId().

Definition at line 58 of file random-waypoint-mobility-model.h.

Referenced by BeginWalk(), and GetTypeId().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:58 2009 for NS-3 by  doxygen 1.6.3