ns3::RandomDiscPositionAllocator Class Reference

allocate random positions within a disc according to a pair of random variables. More...

#include <position-allocator.h>

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

List of all members.

Public Member Functions

 RandomDiscPositionAllocator ()
virtual ~RandomDiscPositionAllocator ()
void SetTheta (RandomVariable theta)
void SetRho (RandomVariable rho)
void SetX (double x)
void SetY (double y)
virtual Vector GetNext (void) const

Static Public Member Functions

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

Private Attributes

RandomVariable m_theta
RandomVariable m_rho
double m_x
double m_y

Detailed Description

allocate random positions within a disc according to a pair of random variables.

Definition at line 187 of file position-allocator.h.


Constructor & Destructor Documentation

ns3::RandomDiscPositionAllocator::RandomDiscPositionAllocator (  ) 

Definition at line 281 of file position-allocator.cc.

ns3::RandomDiscPositionAllocator::~RandomDiscPositionAllocator (  )  [virtual]

Definition at line 283 of file position-allocator.cc.


Member Function Documentation

Vector ns3::RandomDiscPositionAllocator::GetNext ( void   )  const [virtual]
Returns:
the next chosen position.

This method _must_ be implement in subclasses.

Implements ns3::PositionAllocator.

Definition at line 307 of file position-allocator.cc.

References ns3::RandomVariable::GetValue(), m_rho, m_theta, m_x, m_y, and NS_LOG_DEBUG.

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

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

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

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

Attributes defined for this type:

  • Theta: A random variable which represents the angle (gradients) of a position in a random disc.
  • Rho: A random variable which represents the radius of a position in a random disc.
  • X: The x coordinate of the center of the random position disc.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • Y: The y coordinate of the center of the random position disc.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::PositionAllocator.

Definition at line 251 of file position-allocator.cc.

References ns3::TypeId::AddAttribute(), ns3::TypeId::AddConstructor(), m_rho, m_theta, m_x, m_y, and ns3::TypeId::SetParent().

void ns3::RandomDiscPositionAllocator::SetRho ( RandomVariable  rho  ) 

Definition at line 292 of file position-allocator.cc.

References m_rho.

void ns3::RandomDiscPositionAllocator::SetTheta ( RandomVariable  theta  ) 

Definition at line 287 of file position-allocator.cc.

References m_theta.

void ns3::RandomDiscPositionAllocator::SetX ( double  x  ) 

Definition at line 297 of file position-allocator.cc.

References m_x.

void ns3::RandomDiscPositionAllocator::SetY ( double  y  ) 

Definition at line 302 of file position-allocator.cc.

References m_y.


Member Data Documentation

Definition at line 202 of file position-allocator.h.

Referenced by GetNext(), GetTypeId(), and SetRho().

Definition at line 201 of file position-allocator.h.

Referenced by GetNext(), GetTypeId(), and SetTheta().

Definition at line 203 of file position-allocator.h.

Referenced by GetNext(), GetTypeId(), and SetX().

Definition at line 204 of file position-allocator.h.

Referenced by GetNext(), GetTypeId(), and SetY().


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