ns-3
|
A helper to make it easier to create a star topology with PointToPoint links. More...
#include <point-to-point-star.h>
Public Member Functions | |
PointToPointStarHelper (uint32_t numSpokes, PointToPointHelper p2pHelper) | |
Ptr< Node > | GetHub () const |
Ptr< Node > | GetSpokeNode (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) |
A helper to make it easier to create a star topology with PointToPoint links.
ns3::PointToPointStarHelper::PointToPointStarHelper | ( | uint32_t | numSpokes, |
PointToPointHelper | p2pHelper | ||
) |
Create a PointToPointStarHelper in order to easily create star topologies using p2p links
numSpokes | the number of links attached to the hub node, creating a total of numSpokes + 1 nodes |
p2pHelper | the 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().
void ns3::PointToPointStarHelper::AssignIpv4Addresses | ( | Ipv4AddressHelper | address | ) |
address | an Ipv4AddressHelper which is used to install Ipv4 addresses on all the node interfaces in the star |
References ns3::Ipv4InterfaceContainer::Add(), ns3::Ipv4AddressHelper::Assign(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::GetN(), and ns3::Ipv4AddressHelper::NewNetwork().
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
ulx | upper left x value |
uly | upper left y value |
lrx | lower right x value |
lry | lower right y value |
References ns3::Object::AggregateObject(), ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), ns3::Object::GetObject(), ns3::Vector3D::x, and ns3::Vector3D::y.
Ptr< Node > ns3::PointToPointStarHelper::GetHub | ( | ) | const |
References ns3::NodeContainer::Get().
Ipv4Address ns3::PointToPointStarHelper::GetHubIpv4Address | ( | uint32_t | i | ) | const |
i | index into the hub interfaces |
References ns3::Ipv4InterfaceContainer::GetAddress().
Ipv4Address ns3::PointToPointStarHelper::GetSpokeIpv4Address | ( | uint32_t | i | ) | const |
i | index into the spoke interfaces |
References ns3::Ipv4InterfaceContainer::GetAddress().
Ptr< Node > ns3::PointToPointStarHelper::GetSpokeNode | ( | uint32_t | i | ) | const |
i | an index into the spokes of the star |
References ns3::NodeContainer::Get().
void ns3::PointToPointStarHelper::InstallStack | ( | InternetStackHelper | stack | ) |
stack | an InternetStackHelper which is used to install on every node in the star |
References ns3::InternetStackHelper::Install().
uint32_t ns3::PointToPointStarHelper::SpokeCount | ( | ) | const |
References ns3::NodeContainer::GetN().