Allocate positions on a rectangular 2d grid.
More...
#include <position-allocator.h>
List of all members.
Detailed Description
Allocate positions on a rectangular 2d grid.
Member Enumeration Documentation
Determine whether positions are allocated row first or column first.
- Enumerator:
ROW_FIRST |
In row-first mode, positions are allocated on the first row until N positions have been allocated. Then, the second row located a yMin + yDelta is used to allocate positions.
|
COLUMN_FIRST |
In column-first mode, positions are allocated on the first column until N positions have been allocated. Then, the second column located a xMin + xDelta is used to allocate positions.
|
Member Function Documentation
double ns3::GridPositionAllocator::GetDeltaX |
( |
void |
| ) |
const |
- Returns:
- the x interval between two x-consecutive positions.
double ns3::GridPositionAllocator::GetDeltaY |
( |
void |
| ) |
const |
- Returns:
- the y interval between two y-consecutive positions.
- Returns:
- the currently-selected layout type.
double ns3::GridPositionAllocator::GetMinX |
( |
void |
| ) |
const |
- Returns:
- the x coordinate of the first allocated position.
double ns3::GridPositionAllocator::GetMinY |
( |
void |
| ) |
const |
- Returns:
- the y coordinate of the first allocated position.
uint32_t ns3::GridPositionAllocator::GetN |
( |
void |
| ) |
const |
- Returns:
- the number of positions to allocate on each row or each column.
Vector ns3::GridPositionAllocator::GetNext |
( |
void |
| ) |
const |
|
virtual |
TypeId ns3::GridPositionAllocator::GetTypeId |
( |
void |
| ) |
|
|
static |
This method returns the TypeId associated to ns3::GridPositionAllocator.
This object is accessible through the following paths with Config::Set and Config::Connect:
-
/NodeList/[i]/$ns3::MobilityModel/$ns3::RandomWaypointMobilityModel/PositionAllocator/$ns3::GridPositionAllocator
Attributes defined for this type:
-
GridWidth: The number of objects layed out on a line.
-
MinX: The x coordinate where the grid starts.
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 1
-
Flags: construct write read
-
MinY: The y coordinate where the grid starts.
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 0
-
Flags: construct write read
-
DeltaX: The x space between objects.
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 1
-
Flags: construct write read
-
DeltaY: The y space between objects.
-
Set with class: ns3::DoubleValue
-
Underlying type: double -1.79769e+308:1.79769e+308
-
Initial value: 1
-
Flags: construct write read
-
LayoutType: The type of layout.
-
Set with class: ns3::EnumValue
-
Underlying type: RowFirst|ColumnFirst
-
Initial value: RowFirst
-
Flags: construct write read
No TraceSources defined for this type.
Reimplemented from ns3::PositionAllocator.
References COLUMN_FIRST, ROW_FIRST, and ns3::TypeId::SetParent().
void ns3::GridPositionAllocator::SetDeltaX |
( |
double |
deltaX | ) |
|
- Parameters:
-
deltaX | the x interval between two x-consecutive positions. |
void ns3::GridPositionAllocator::SetDeltaY |
( |
double |
deltaY | ) |
|
- Parameters:
-
deltaY | the y interval between two y-consecutive positions. |
void ns3::GridPositionAllocator::SetLayoutType |
( |
enum LayoutType |
layoutType | ) |
|
- Parameters:
-
layoutType | the type of layout to use (row first or column first). |
void ns3::GridPositionAllocator::SetMinX |
( |
double |
xMin | ) |
|
- Parameters:
-
xMin | the x coordinate where layout will start. |
void ns3::GridPositionAllocator::SetMinY |
( |
double |
yMin | ) |
|
- Parameters:
-
yMin | the y coordinate where layout will start |
void ns3::GridPositionAllocator::SetN |
( |
uint32_t |
n | ) |
|
- Parameters:
-
n | the number of positions allocated on each row (or each column) before switching to the next column (or row). |
The documentation for this class was generated from the following files:
- src/mobility/model/position-allocator.h
- doc/introspected-doxygen.h
- src/mobility/model/position-allocator.cc