Helper to create IEEE 802.11s mesh networks. More...
#include "mesh-helper.h"
Public Types | |
enum | ChannelPolicy { SPREAD_CHANNELS , ZERO_CHANNEL } |
Spread/not spread frequency channels of MP interfaces. More... | |
Public Member Functions | |
MeshHelper () | |
Construct a MeshHelper used to make life easier when creating 802.11s networks. More... | |
~MeshHelper () | |
Destroy a MeshHelper. More... | |
int64_t | AssignStreams (NetDeviceContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
NetDeviceContainer | Install (const WifiPhyHelper &phyHelper, NodeContainer c) const |
Install 802.11s mesh device & protocols on given node list. More... | |
void | Report (const ns3::Ptr< ns3::NetDevice > &device, std::ostream &os) |
Print statistics. More... | |
void | ResetStats (const ns3::Ptr< ns3::NetDevice > &device) |
Reset statistics. More... | |
template<typename... Ts> | |
void | SetMacType (Ts &&... args) |
Set the Mac Attributes. More... | |
void | SetNumberOfInterfaces (uint32_t nInterfaces) |
Set a number of interfaces in a mesh network. More... | |
template<typename... Ts> | |
void | SetRemoteStationManager (std::string type, Ts &&... args) |
Set the remote station manager type and Attributes. More... | |
void | SetSpreadInterfaceChannels (ChannelPolicy policy) |
set the channel policy More... | |
template<typename... Ts> | |
void | SetStackInstaller (std::string type, Ts &&... args) |
Set the MeshStack type to use. More... | |
void | SetStandard (WifiStandard standard) |
Set standard. More... | |
Static Public Member Functions | |
static MeshHelper | Default () |
Set the helper to the default values for the MAC type, remote station manager and channel policy. More... | |
static void | EnableLogComponents () |
Helper to enable all MeshPointDevice log components with one statement. More... | |
Private Member Functions | |
Ptr< WifiNetDevice > | CreateInterface (const WifiPhyHelper &phyHelper, Ptr< Node > node, uint16_t channelId) const |
Private Attributes | |
ObjectFactory | m_ackPolicySelector [4] |
ack policy selector for all ACs More... | |
ObjectFactory | m_mac |
the MAC More... | |
uint32_t | m_nInterfaces |
number of interfaces More... | |
ChannelPolicy | m_spreadChannelPolicy |
spread channel policy More... | |
Ptr< MeshStack > | m_stack |
stack More... | |
ObjectFactory | m_stackFactory |
stack factory More... | |
WifiStandard | m_standard |
standard More... | |
ObjectFactory | m_stationManager |
the station manager More... | |
Helper to create IEEE 802.11s mesh networks.
Definition at line 43 of file mesh-helper.h.
Spread/not spread frequency channels of MP interfaces.
If set to true different non-overlapping 20MHz frequency channels will be assigned to different mesh point interfaces.
Enumerator | |
---|---|
SPREAD_CHANNELS | |
ZERO_CHANNEL |
Definition at line 100 of file mesh-helper.h.
ns3::MeshHelper::MeshHelper | ( | ) |
Construct a MeshHelper used to make life easier when creating 802.11s networks.
Definition at line 37 of file mesh-helper.cc.
ns3::MeshHelper::~MeshHelper | ( | ) |
int64_t ns3::MeshHelper::AssignStreams | ( | NetDeviceContainer | c, |
int64_t | stream | ||
) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned. The Install() method of this helper should have previously been called by the user.
stream | first stream index to use |
c | NetDeviceContainer of the set of devices for which the mesh devices should be modified to use a fixed stream |
Definition at line 178 of file mesh-helper.cc.
References ns3::Txop::AssignStreams(), ns3::NetDeviceContainer::Begin(), ns3::NetDeviceContainer::End(), ns3::PointerValue::Get(), third::mac, and third::wifi.
Referenced by HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), and MeshTest::CreateNodes().
|
private |
phyHelper | |
node | |
channelId |
Definition at line 114 of file mesh-helper.cc.
References ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), ns3::ObjectFactory::Create(), ns3::WifiPhyHelper::Create(), m_mac, m_standard, m_stationManager, third::mac, NS_ABORT_IF, NS_ASSERT, ns3::ObjectFactory::Set(), ns3::WifiNetDevice::SetMac(), ns3::WifiNetDevice::SetPhy(), and ns3::WifiNetDevice::SetRemoteStationManager().
Referenced by Install().
|
static |
Set the helper to the default values for the MAC type, remote station manager and channel policy.
Definition at line 98 of file mesh-helper.cc.
References SetMacType(), SetRemoteStationManager(), SetSpreadInterfaceChannels(), and SPREAD_CHANNELS.
|
static |
Helper to enable all MeshPointDevice log components with one statement.
Definition at line 238 of file mesh-helper.cc.
References ns3::WifiHelper::EnableLogComponents(), ns3::LOG_LEVEL_ALL, and ns3::LogComponentEnable().
NetDeviceContainer ns3::MeshHelper::Install | ( | const WifiPhyHelper & | phyHelper, |
NodeContainer | c | ||
) | const |
Install 802.11s mesh device & protocols on given node list.
phyHelper | Wifi PHY helper |
c | List of nodes to install |
Definition at line 63 of file mesh-helper.cc.
References ns3::Node::AddDevice(), ns3::NodeContainer::Begin(), third::channel, CreateInterface(), first::devices, ns3::NodeContainer::End(), m_nInterfaces, m_spreadChannelPolicy, m_stack, NS_ASSERT, NS_FATAL_ERROR, SPREAD_CHANNELS, and ZERO_CHANNEL.
Referenced by HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), and MeshTest::CreateNodes().
void ns3::MeshHelper::Report | ( | const ns3::Ptr< ns3::NetDevice > & | device, |
std::ostream & | os | ||
) |
Print statistics.
device | the net device |
os | the output stream |
Definition at line 156 of file mesh-helper.cc.
References ns3::Mac48Address::ConvertFrom(), ns3::Object::GetObject(), ns3::Time::GetSeconds(), m_stack, ns3::Simulator::Now(), and NS_ASSERT.
Referenced by MeshTest::Report().
void ns3::MeshHelper::ResetStats | ( | const ns3::Ptr< ns3::NetDevice > & | device | ) |
Reset statistics.
device | the net device |
Definition at line 169 of file mesh-helper.cc.
References ns3::Object::GetObject(), m_stack, and NS_ASSERT.
void ns3::MeshHelper::SetMacType | ( | Ts &&... | args | ) |
Set the Mac Attributes.
All the attributes specified in this method should exist in the requested mac.
Ts | [deduced] Argument types |
[in] | args | Name and AttributeValue pairs to set. |
Definition at line 195 of file mesh-helper.h.
References check-style-clang-format::args, m_mac, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), MeshTest::CreateNodes(), and Default().
void ns3::MeshHelper::SetNumberOfInterfaces | ( | uint32_t | nInterfaces | ) |
Set a number of interfaces in a mesh network.
nInterfaces | is the number of interfaces |
Definition at line 57 of file mesh-helper.cc.
References m_nInterfaces.
Referenced by HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), and MeshTest::CreateNodes().
void ns3::MeshHelper::SetRemoteStationManager | ( | std::string | type, |
Ts &&... | args | ||
) |
Set the remote station manager type and Attributes.
All the attributes specified in this method should exist in the requested station manager.
Ts | [deduced] Argument types |
type | the type of remote station manager to use. | |
[in] | args | Name and AttributeValue pairs to set. |
Definition at line 203 of file mesh-helper.h.
References check-style-clang-format::args, m_stationManager, and check-style-clang-format::type.
Referenced by Default().
void ns3::MeshHelper::SetSpreadInterfaceChannels | ( | ChannelPolicy | policy | ) |
set the channel policy
policy | the channel policy |
Definition at line 51 of file mesh-helper.cc.
References m_spreadChannelPolicy.
Referenced by MeshTest::CreateNodes(), and Default().
void ns3::MeshHelper::SetStackInstaller | ( | std::string | type, |
Ts &&... | args | ||
) |
Set the MeshStack type to use.
Ts | [deduced] Argument types |
type | the type of ns3::MeshStack. | |
[in] | args | Name and AttributeValue pairs to set. |
Definition at line 210 of file mesh-helper.h.
References check-style-clang-format::args, ns3::ObjectFactory::Create(), m_stack, m_stackFactory, NS_FATAL_ERROR, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
Referenced by HwmpProactiveRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), PeerManagementProtocolRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), and MeshTest::CreateNodes().
void ns3::MeshHelper::SetStandard | ( | WifiStandard | standard | ) |
Set standard.
standard | the wifi phy standard |
Definition at line 108 of file mesh-helper.cc.
References m_standard.
|
private |
ack policy selector for all ACs
Definition at line 185 of file mesh-helper.h.
|
private |
the MAC
Definition at line 183 of file mesh-helper.h.
Referenced by CreateInterface(), and SetMacType().
|
private |
number of interfaces
Definition at line 177 of file mesh-helper.h.
Referenced by Install(), and SetNumberOfInterfaces().
|
private |
spread channel policy
Definition at line 178 of file mesh-helper.h.
Referenced by Install(), and SetSpreadInterfaceChannels().
stack
Definition at line 179 of file mesh-helper.h.
Referenced by ~MeshHelper(), Install(), Report(), ResetStats(), and SetStackInstaller().
|
private |
|
private |
standard
Definition at line 186 of file mesh-helper.h.
Referenced by CreateInterface(), and SetStandard().
|
private |
the station manager
Definition at line 184 of file mesh-helper.h.
Referenced by CreateInterface(), and SetRemoteStationManager().