ns-3
ns3::RandomRoomPositionAllocator Class Reference

#include <building-position-allocator.h>

Inheritance diagram for ns3::RandomRoomPositionAllocator:
Collaboration diagram for ns3::RandomRoomPositionAllocator:

List of all members.

Classes

struct  RoomInfo

Public Member Functions

virtual Vector GetNext (void) const

Static Public Member Functions

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

Detailed Description

Allocate each position by randomly chosing a room from the list of all buildings, and then randomly chosing a position inside the room. The selection of the room is always done without replacement.


Member Function Documentation

Vector ns3::RandomRoomPositionAllocator::GetNext ( void  ) const
virtual
Returns:
the next chosen position.

This method must be implement in subclasses.

Implements ns3::PositionAllocator.

References ns3::BuildingList::Begin(), ns3::BuildingList::End(), ns3::UniformVariable::GetInteger(), ns3::BuildingList::GetNBuildings(), NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

TypeId ns3::RandomRoomPositionAllocator::GetTypeId ( void  )
static

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

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

  • /NodeList/[i]/$ns3::MobilityModel/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::RandomRoomPositionAllocator

No Attributes defined for this type.
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: