A helper to make it easier to create a star topology with Csma links. More...
#include <csma-star-helper.h>
Collaboration diagram for ns3::CsmaStarHelper:Public Member Functions | |
| CsmaStarHelper (uint32_t numSpokes, CsmaHelper csmaHelper) | |
| Create a CsmaStarHelper in order to easily create star topologies using Csma links. More... | |
| ~CsmaStarHelper () | |
| void | AssignIpv4Addresses (Ipv4AddressHelper address) |
| void | AssignIpv6Addresses (Ipv6Address network, Ipv6Prefix prefix) |
| Ptr< Node > | GetHub () const |
| NetDeviceContainer | GetHubDevices () const |
| Ipv4Address | GetHubIpv4Address (uint32_t i) const |
| Ipv6Address | GetHubIpv6Address (uint32_t i) const |
| NetDeviceContainer | GetSpokeDevices () const |
| Ipv4Address | GetSpokeIpv4Address (uint32_t i) const |
| Ipv6Address | GetSpokeIpv6Address (uint32_t i) const |
| Ptr< Node > | GetSpokeNode (uint32_t i) const |
| void | InstallStack (InternetStackHelper stack) |
| uint32_t | SpokeCount () const |
A helper to make it easier to create a star topology with Csma links.
Definition at line 45 of file csma-star-helper.h.
| 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 |
Definition at line 31 of file csma-star-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::NodeContainer::Create(), ns3::NodeContainer::Get(), ns3::NodeContainer::GetN(), ns3::CsmaHelper::Install(), m_hub, m_hubDevices, m_spokeDevices, m_spokes, and first::nodes.
Here is the call graph for this function:| ns3::CsmaStarHelper::~CsmaStarHelper | ( | ) |
Definition at line 46 of file csma-star-helper.cc.
| void ns3::CsmaStarHelper::AssignIpv4Addresses | ( | Ipv4AddressHelper | address | ) |
| address | an Ipv4AddressHelper which is used to install Ipv4 addresses on all the node interfaces in the star |
Definition at line 112 of file csma-star-helper.cc.
References ns3::Ipv4InterfaceContainer::Add(), ns3::Ipv4AddressHelper::Assign(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::GetN(), m_hubDevices, m_hubInterfaces, m_spokeDevices, m_spokeInterfaces, m_spokes, and ns3::Ipv4AddressHelper::NewNetwork().
Referenced by CsmaStarTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::CsmaStarHelper::AssignIpv6Addresses | ( | Ipv6Address | network, |
| Ipv6Prefix | prefix | ||
| ) |
| network | an IPv6 Address representing the network portion of the Ipv6 Address |
| prefix | the prefix length |
Definition at line 123 of file csma-star-helper.cc.
References ns3::Ipv6InterfaceContainer::Add(), ns3::Ipv6AddressHelper::Assign(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::GetN(), ns3::Ipv6AddressGenerator::GetNetwork(), ns3::Ipv6AddressGenerator::Init(), m_hubDevices, m_hubInterfaces6, m_spokeDevices, m_spokeInterfaces6, m_spokes, ns3::Ipv6AddressGenerator::NextNetwork(), and ns3::Ipv6AddressHelper::SetBase().
Here is the call graph for this function:Definition at line 51 of file csma-star-helper.cc.
References ns3::NodeContainer::Get(), and m_hub.
Referenced by CsmaStarTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| NetDeviceContainer ns3::CsmaStarHelper::GetHubDevices | ( | ) | const |
Definition at line 63 of file csma-star-helper.cc.
References m_hubDevices.
| Ipv4Address ns3::CsmaStarHelper::GetHubIpv4Address | ( | uint32_t | i | ) | const |
| i | index into the hub interfaces |
Definition at line 75 of file csma-star-helper.cc.
References ns3::Ipv4InterfaceContainer::GetAddress(), and m_hubInterfaces.
Referenced by CsmaStarTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| Ipv6Address ns3::CsmaStarHelper::GetHubIpv6Address | ( | uint32_t | i | ) | const |
| i | index into the hub interfaces |
Definition at line 87 of file csma-star-helper.cc.
References ns3::Ipv6InterfaceContainer::GetAddress(), and m_hubInterfaces6.
Here is the call graph for this function:| NetDeviceContainer ns3::CsmaStarHelper::GetSpokeDevices | ( | ) | const |
Definition at line 69 of file csma-star-helper.cc.
References m_spokeDevices.
Referenced by CsmaStarTestCase::DoRun().
Here is the caller graph for this function:| Ipv4Address ns3::CsmaStarHelper::GetSpokeIpv4Address | ( | uint32_t | i | ) | const |
| i | index into the spoke interfaces |
Definition at line 81 of file csma-star-helper.cc.
References ns3::Ipv4InterfaceContainer::GetAddress(), and m_spokeInterfaces.
Here is the call graph for this function:| Ipv6Address ns3::CsmaStarHelper::GetSpokeIpv6Address | ( | uint32_t | i | ) | const |
| i | index into the spoke interfaces |
Definition at line 93 of file csma-star-helper.cc.
References ns3::Ipv6InterfaceContainer::GetAddress(), and m_spokeInterfaces6.
Here is the call graph for this function:| i | an index into the spokes of the star |
Definition at line 57 of file csma-star-helper.cc.
References ns3::NodeContainer::Get(), and m_spokes.
Referenced by CsmaStarTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::CsmaStarHelper::InstallStack | ( | InternetStackHelper | stack | ) |
| stack | an InternetStackHelper which is used to install on every node in the star |
Definition at line 105 of file csma-star-helper.cc.
References ns3::InternetStackHelper::Install(), m_hub, and m_spokes.
Referenced by CsmaStarTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:| uint32_t ns3::CsmaStarHelper::SpokeCount | ( | ) | const |
Definition at line 99 of file csma-star-helper.cc.
References ns3::NodeContainer::GetN(), and m_spokes.
Referenced by CsmaStarTestCase::DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 144 of file csma-star-helper.h.
Referenced by CsmaStarHelper(), GetHub(), and InstallStack().
|
private |
Definition at line 145 of file csma-star-helper.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), CsmaStarHelper(), and GetHubDevices().
|
private |
Definition at line 148 of file csma-star-helper.h.
Referenced by AssignIpv4Addresses(), and GetHubIpv4Address().
|
private |
Definition at line 150 of file csma-star-helper.h.
Referenced by AssignIpv6Addresses(), and GetHubIpv6Address().
|
private |
Definition at line 147 of file csma-star-helper.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), CsmaStarHelper(), and GetSpokeDevices().
|
private |
Definition at line 149 of file csma-star-helper.h.
Referenced by AssignIpv4Addresses(), and GetSpokeIpv4Address().
|
private |
Definition at line 151 of file csma-star-helper.h.
Referenced by AssignIpv6Addresses(), and GetSpokeIpv6Address().
|
private |
Definition at line 146 of file csma-star-helper.h.
Referenced by AssignIpv4Addresses(), AssignIpv6Addresses(), CsmaStarHelper(), GetSpokeNode(), InstallStack(), and SpokeCount().