ns3::RandomRectanglePositionAllocator Class Reference

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

#include <position-allocator.h>

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

List of all members.

Public Member Functions

 RandomRectanglePositionAllocator ()
virtual ~RandomRectanglePositionAllocator ()
void SetX (RandomVariable x)
void SetY (RandomVariable y)
virtual Vector GetNext (void) const

Static Public Member Functions

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

Private Attributes

RandomVariable m_x
RandomVariable m_y

Detailed Description

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

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


Constructor & Destructor Documentation

ns3::RandomRectanglePositionAllocator::RandomRectanglePositionAllocator (  ) 

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

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

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


Member Function Documentation

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

This method _must_ be implement in subclasses.

Implements ns3::PositionAllocator.

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

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

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

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

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

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

Attributes defined for this type:

  • X: A random variable which represents the x coordinate of a position in a random rectangle.
  • Y: A random variable which represents the y coordinate of a position in a random rectangle.

No TraceSources defined for this type.

Reimplemented from ns3::PositionAllocator.

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

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

void ns3::RandomRectanglePositionAllocator::SetX ( RandomVariable  x  ) 

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

References m_x.

void ns3::RandomRectanglePositionAllocator::SetY ( RandomVariable  y  ) 

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

References m_y.


Member Data Documentation

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

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

Definition at line 180 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