ns-3
ns3::PointToPointStarHelper Class Reference

A helper to make it easier to create a star topology with PointToPoint links. More...

#include <point-to-point-star.h>

List of all members.

Public Member Functions

 PointToPointStarHelper (uint32_t numSpokes, PointToPointHelper p2pHelper)
Ptr< NodeGetHub () const
Ptr< NodeGetSpokeNode (uint32_t i) const
Ipv4Address GetHubIpv4Address (uint32_t i) const
Ipv4Address GetSpokeIpv4Address (uint32_t i) const
uint32_t SpokeCount () const
void InstallStack (InternetStackHelper stack)
void AssignIpv4Addresses (Ipv4AddressHelper address)
void BoundingBox (double ulx, double uly, double lrx, double lry)

Detailed Description

A helper to make it easier to create a star topology with PointToPoint links.


Constructor & Destructor Documentation

Create a PointToPointStarHelper in order to easily create star topologies using p2p links

Parameters:
numSpokesthe number of links attached to the hub node, creating a total of numSpokes + 1 nodes
p2pHelperthe link helper for p2p links, used to link nodes together

References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Create(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), and ns3::PointToPointHelper::Install().


Member Function Documentation

void ns3::PointToPointStarHelper::BoundingBox ( double  ulx,
double  uly,
double  lrx,
double  lry 
)

Sets up the node canvas locations for every node in the star. This is needed for use with the animation interface

Parameters:
ulxupper left x value
ulyupper left y value
lrxlower right x value
lrylower right y value

References ns3::Object::AggregateObject(), ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), ns3::Object::GetObject(), ns3::Vector3D::x, and ns3::Vector3D::y.

Returns:
a node pointer to the hub node in the star, i.e., the center node

References ns3::NodeContainer::Get().

Parameters:
iindex into the hub interfaces
Returns:
Ipv4Address according to indexed hub interface

References ns3::Ipv4InterfaceContainer::GetAddress().

Parameters:
iindex into the spoke interfaces
Returns:
Ipv4Address according to indexed spoke interface

References ns3::Ipv4InterfaceContainer::GetAddress().

Parameters:
ian index into the spokes of the star
Returns:
a node pointer to the node at the indexed spoke

References ns3::NodeContainer::Get().

Parameters:
stackan InternetStackHelper which is used to install on every node in the star

References ns3::InternetStackHelper::Install().

Returns:
the total number of spokes in the star

References ns3::NodeContainer::GetN().


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