|
ns-3
|
A helper to make it easier to create a star topology with Csma links. More...
#include <csma-star-helper.h>
Public Member Functions | |
| CsmaStarHelper (uint32_t numSpokes, CsmaHelper csmaHelper) | |
| Ptr< Node > | GetHub () const |
| Ptr< Node > | GetSpokeNode (uint32_t i) const |
| NetDeviceContainer | GetHubDevices () const |
| NetDeviceContainer | GetSpokeDevices () const |
| Ipv4Address | GetHubIpv4Address (uint32_t i) const |
| Ipv6Address | GetHubIpv6Address (uint32_t i) const |
| Ipv4Address | GetSpokeIpv4Address (uint32_t i) const |
| Ipv6Address | GetSpokeIpv6Address (uint32_t i) const |
| uint32_t | SpokeCount () const |
| void | InstallStack (InternetStackHelper stack) |
| void | AssignIpv4Addresses (Ipv4AddressHelper address) |
| void | AssignIpv6Addresses (Ipv6Address network, Ipv6Prefix prefix) |
A helper to make it easier to create a star topology with Csma links.
| ns3::CsmaStarHelper::CsmaStarHelper | ( | uint32_t | numSpokes, |
| CsmaHelper | csmaHelper | ||
| ) |
Create a CsmaStarHelper in order to easily create star topologies using Csma links
| numSpokes | the number of links attached to the hub node, creating a total of numSpokes + 1 nodes |
| csmaHelper | the link helper for Csma links, used to link nodes together |
References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Create(), ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), and ns3::CsmaHelper::Install().
| void ns3::CsmaStarHelper::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::CsmaStarHelper::AssignIpv6Addresses | ( | Ipv6Address | network, |
| Ipv6Prefix | prefix | ||
| ) |
| network | an IPv6 Address representing the network portion of the Ipv6 Address |
| prefix | the prefix length |
References ns3::Ipv6InterfaceContainer::Add(), ns3::Ipv6AddressHelper::Assign(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::GetN(), ns3::Ipv6AddressGenerator::GetNetwork(), ns3::Ipv6AddressGenerator::Init(), ns3::Ipv6AddressGenerator::NextNetwork(), and ns3::Ipv6AddressHelper::SetBase().
References ns3::NodeContainer::Get().
| NetDeviceContainer ns3::CsmaStarHelper::GetHubDevices | ( | ) | const |
| Ipv4Address ns3::CsmaStarHelper::GetHubIpv4Address | ( | uint32_t | i | ) | const |
| i | index into the hub interfaces |
References ns3::Ipv4InterfaceContainer::GetAddress().
| Ipv6Address ns3::CsmaStarHelper::GetHubIpv6Address | ( | uint32_t | i | ) | const |
| i | index into the hub interfaces |
References ns3::Ipv6InterfaceContainer::GetAddress().
| NetDeviceContainer ns3::CsmaStarHelper::GetSpokeDevices | ( | ) | const |
| Ipv4Address ns3::CsmaStarHelper::GetSpokeIpv4Address | ( | uint32_t | i | ) | const |
| i | index into the spoke interfaces |
References ns3::Ipv4InterfaceContainer::GetAddress().
| Ipv6Address ns3::CsmaStarHelper::GetSpokeIpv6Address | ( | uint32_t | i | ) | const |
| i | index into the spoke interfaces |
References ns3::Ipv6InterfaceContainer::GetAddress().
| i | an index into the spokes of the star |
References ns3::NodeContainer::Get().
| void ns3::CsmaStarHelper::InstallStack | ( | InternetStackHelper | stack | ) |
| stack | an InternetStackHelper which is used to install on every node in the star |
References ns3::InternetStackHelper::Install().
| uint32_t ns3::CsmaStarHelper::SpokeCount | ( | ) | const |
References ns3::NodeContainer::GetN().