ns3::PointToPointGridHelper Class Reference
A helper to make it easier to create a grid topology with p2p links.
More...
#include <point-to-point-grid-helper.h>
List of all members.
Detailed Description
A helper to make it easier to create a grid topology with p2p links.
Constructor & Destructor Documentation
ns3::PointToPointGridHelper::PointToPointGridHelper |
( |
uint32_t |
nRows, |
|
|
uint32_t |
nCols, |
|
|
PointToPointHelper |
pointToPoint | |
|
) |
| | |
Create a PointToPointGridHelper in order to easily create grid topologies using p2p links
- Parameters:
-
| nRows | total number of rows in the grid |
| nCols | total number of colums in the grid |
| pointToPoint | the PointToPointHelper which is used to connect all of the nodes together in the grid |
Member Function Documentation
Assigns Ipv4 addresses to all the row and column interfaces
- Parameters:
-
void ns3::PointToPointGridHelper::BoundingBox |
( |
double |
ulx, |
|
|
double |
uly, |
|
|
double |
lrx, |
|
|
double |
lry | |
|
) |
| | |
Sets up the node canvas locations for every node in the grid. This is needed for use with the animation interface
- Parameters:
-
| ulx | upper left x value |
| uly | upper left y value |
| lrx | lower right x value |
| lry | lower right y value |
Ipv4Address ns3::PointToPointGridHelper::GetIpv4Address |
( |
uint32_t |
row, |
|
|
uint32_t |
col | |
|
) |
| | |
This returns an Ipv4 address at the node specified by the (row, col) address. Technically, a node will have multiple interfaces in the grid; therefore, it also has multiple Ipv4 addresses. This method only returns one of the addresses. If you picture the grid, the address returned is the left row device of all the nodes, except the left-most grid nodes, which returns the right row device.
- Parameters:
-
| row | the row address of the node desired |
| col | the column address of the node desired |
- Returns:
- Ipv4Address of one of the interfaces of the node specified by the (row, col) address
Ptr<Node> ns3::PointToPointGridHelper::GetNode |
( |
uint32_t |
row, |
|
|
uint32_t |
col | |
|
) |
| | |
- Parameters:
-
| row | the row address of the node desired |
| col | the column address of the node desired |
- Returns:
- a pointer to the node specified by the (row, col) address
The documentation for this class was generated from the following file:
- src/helper/point-to-point-grid-helper.h