ns-3
ns3::RandomDiscPositionAllocator Class Reference

Allocate random positions within a disc according to a given distribution for the polar coordinates of each node with respect to the provided center of the disc. More...

#include <position-allocator.h>

Inheritance diagram for ns3::RandomDiscPositionAllocator:
Collaboration diagram for ns3::RandomDiscPositionAllocator:

List of all members.

Public Member Functions

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.

Detailed Description

Allocate random positions within a disc according to a given distribution for the polar coordinates of each node with respect to the provided center of the disc.


Member Function Documentation

Returns:
the next chosen position.

This method _must_ be implement in subclasses.

Implements ns3::PositionAllocator.

References ns3::RandomVariable::GetValue(), and NS_LOG_DEBUG.

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]/$ns3::MobilityModel/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::HierarchicalMobilityModel/Child/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::HierarchicalMobilityModel/Parent/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::MobilityModel/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::HierarchicalMobilityModel/Child/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::HierarchicalMobilityModel/Parent/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::MobilityModel/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::PositionAllocator/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::RandomDiscPositionAllocator
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomDiscPositionAllocator

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.

References ns3::TypeId::SetParent().


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