ns3::RandomDirection2dMobilityModel Class Reference

a RandomDirection mobility model More...

#include <random-direction-2d-mobility-model.h>

Inheritance diagram for ns3::RandomDirection2dMobilityModel:

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

Collaboration graph
[legend]

List of all members.

Static Public Member Functions

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

Private Member Functions

virtual void DoDispose (void)
virtual Vector DoGetPosition (void) const
virtual void DoSetPosition (const Vector &position)
virtual Vector DoGetVelocity (void) const


Detailed Description

a RandomDirection mobility model

The movement of objects is based on random directions: each object pauses for a specific delay, chooses a random direction and speed and then travels in the specific direction until it reaches one of the boundaries of the model. When it reaches the boundary, it pauses, selects a new direction and speed, aso.


Member Function Documentation

virtual void ns3::RandomDirection2dMobilityModel::DoDispose ( void   )  [private, virtual]

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

Reimplemented from ns3::Object.

virtual Vector ns3::RandomDirection2dMobilityModel::DoGetPosition ( void   )  const [private, virtual]

Returns:
the current position.
Concrete subclasses of this base class must implement this method.

Implements ns3::MobilityModel.

virtual Vector ns3::RandomDirection2dMobilityModel::DoGetVelocity ( void   )  const [private, virtual]

Returns:
the current velocity.
Concrete subclasses of this base class must implement this method.

Implements ns3::MobilityModel.

virtual void ns3::RandomDirection2dMobilityModel::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.

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

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

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

  • /NodeList/[i]/$ns3::MobilityModel/$ns3::RandomDirection2dMobilityModel
Attributes defined for this type:
  • Bounds: The 2d bounding area
    • Set with class: RectangleValue
    • Underlying type: Rectangle
    • Initial value: -100|100|-100|100
    • Flags: construct write read
  • Speed: A random variable to control the speed (m/s).
  • Pause: A random variable to control the pause (s).
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.


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

Generated on Fri Apr 9 15:01:10 2010 for NS-3 by  doxygen 1.5.8