create MAC layers for a ns3::WifiNetDevice. More...
#include "wifi-mac-helper.h"
Public Member Functions | |
WifiMacHelper () | |
Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers. More... | |
virtual | ~WifiMacHelper () |
Destroy a WifiMacHelper. More... | |
virtual Ptr< WifiMac > | Create (Ptr< WifiNetDevice > device, WifiStandard standard) const |
template<typename... Args> | |
void | SetAckManager (std::string type, Args &&... args) |
Helper function used to set the Acknowledgment Manager. More... | |
template<typename... Args> | |
void | SetAssocManager (std::string type, Args &&... args) |
Helper function used to set the Association Manager. More... | |
template<typename... Args> | |
void | SetEmlsrManager (std::string type, Args &&... args) |
Helper function used to set the EMLSR Manager that can be installed on an EHT non-AP MLD. More... | |
template<typename... Args> | |
void | SetMacQueueScheduler (std::string type, Args &&... args) |
Helper function used to set the MAC queue scheduler. More... | |
template<typename... Args> | |
void | SetMultiUserScheduler (std::string type, Args &&... args) |
Helper function used to set the Multi User Scheduler that can be aggregated to an HE AP's MAC. More... | |
template<typename... Args> | |
void | SetProtectionManager (std::string type, Args &&... args) |
Helper function used to set the Protection Manager. More... | |
template<typename... Args> | |
void | SetType (std::string type, Args &&... args) |
Protected Attributes | |
ObjectFactory | m_ackManager |
Factory to create an acknowledgment manager. More... | |
ObjectFactory | m_assocManager |
Association Manager. More... | |
ObjectFactory | m_emlsrManager |
EMLSR Manager object factory. More... | |
ObjectFactory | m_mac |
MAC object factory. More... | |
ObjectFactory | m_muScheduler |
Multi-user Scheduler object factory. More... | |
ObjectFactory | m_protectionManager |
Factory to create a protection manager. More... | |
ObjectFactory | m_queueScheduler |
MAC queue scheduler. More... | |
create MAC layers for a ns3::WifiNetDevice.
This class can create MACs of type ns3::ApWifiMac, ns3::StaWifiMac and ns3::AdhocWifiMac. Its purpose is to allow a WifiHelper to configure and install WifiMac objects on a collection of nodes. The WifiMac objects themselves are mainly composed of TxMiddle, RxMiddle, ChannelAccessManager, FrameExchangeManager, WifiRemoteStationManager, MpduAggregator and MsduAggregartor objects, so this helper offers the opportunity to configure attribute values away from their default values, on a per-NodeContainer basis. By default, it creates an Adhoc MAC layer without QoS. Typically, it is used to set type and attribute values, then hand this object over to the WifiHelper that finishes the job of installing.
This class may be further subclassed (WaveMacHelper is an example of this).
Definition at line 47 of file wifi-mac-helper.h.
ns3::WifiMacHelper::WifiMacHelper | ( | ) |
Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers.
Definition at line 36 of file wifi-mac-helper.cc.
References m_ackManager, m_assocManager, m_emlsrManager, m_protectionManager, m_queueScheduler, SetType(), and ns3::ObjectFactory::SetTypeId().
|
virtual |
Destroy a WifiMacHelper.
Definition at line 48 of file wifi-mac-helper.cc.
|
virtual |
device | the device within which the MAC object will reside |
standard | the standard to configure during installation |
This allows the ns3::WifiHelper class to create MAC objects from ns3::WifiHelper::Install.
Definition at line 53 of file wifi-mac-helper.cc.
References ns3::Object::AggregateObject(), ns3::Mac48Address::Allocate(), ns3::ObjectFactory::Create(), ns3::WifiNetDevice::GetEhtConfiguration(), ns3::WifiNetDevice::GetNPhys(), ns3::ObjectFactory::IsTypeIdSet(), m_ackManager, m_assocManager, m_emlsrManager, m_mac, m_muScheduler, m_protectionManager, m_queueScheduler, third::mac, NS_ABORT_MSG_IF, ns3::ObjectFactory::Set(), ns3::WifiNetDevice::SetMac(), ns3::WIFI_STANDARD_80211ax, ns3::WIFI_STANDARD_80211be, ns3::WIFI_STANDARD_80211n, and ns3::WIFI_STANDARD_UNSPECIFIED.
Referenced by ns3::WifiHelper::Install().
void ns3::WifiMacHelper::SetAckManager | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the Acknowledgment Manager.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of Acknowledgment Manager |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 194 of file wifi-mac-helper.h.
References check-style-clang-format::args, m_ackManager, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
void ns3::WifiMacHelper::SetAssocManager | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the Association Manager.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of Association Manager |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 170 of file wifi-mac-helper.h.
References check-style-clang-format::args, m_assocManager, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
void ns3::WifiMacHelper::SetEmlsrManager | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the EMLSR Manager that can be installed on an EHT non-AP MLD.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of EMLSR Manager |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 210 of file wifi-mac-helper.h.
References check-style-clang-format::args, m_emlsrManager, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
void ns3::WifiMacHelper::SetMacQueueScheduler | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the MAC queue scheduler.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of MAC queue scheduler |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 178 of file wifi-mac-helper.h.
References check-style-clang-format::args, m_queueScheduler, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
void ns3::WifiMacHelper::SetMultiUserScheduler | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the Multi User Scheduler that can be aggregated to an HE AP's MAC.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of Multi User Scheduler |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 202 of file wifi-mac-helper.h.
References check-style-clang-format::args, m_muScheduler, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
void ns3::WifiMacHelper::SetProtectionManager | ( | std::string | type, |
Args &&... | args | ||
) |
Helper function used to set the Protection Manager.
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of Protection Manager |
args | A sequence of name-value pairs of the attributes to set. |
Definition at line 186 of file wifi-mac-helper.h.
References check-style-clang-format::args, m_protectionManager, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
void ns3::WifiMacHelper::SetType | ( | std::string | type, |
Args &&... | args | ||
) |
Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
type | the type of ns3::WifiMac to create. |
args | A sequence of name-value pairs of the attributes to set. |
All the attributes specified in this method should exist in the requested MAC.
Definition at line 162 of file wifi-mac-helper.h.
References check-style-clang-format::args, m_mac, ns3::ObjectFactory::Set(), ns3::ObjectFactory::SetTypeId(), and check-style-clang-format::type.
Referenced by WifiMacHelper(), BatteryLifetimeTest::ConstantLoadTest(), AodvExample::CreateDevices(), ChainRegressionTest::CreateDevices(), Bug772ChainTest::CreateDevices(), TracerouteExample::CreateDevices(), DsdvManetExample::CreateDevices(), BasicEnergyDepletionTest::DepletionTestCase(), ns3::aodv::LoopbackTestCase::DoRun(), WifiAcMappingTest::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), WifiUseAvailBwTest::DoRun(), SetChannelFrequencyTest::DoRun(), experiment(), RoutingExperiment::Run(), and BatteryLifetimeTest::VariableLoadTest().
|
protected |
Factory to create an acknowledgment manager.
Definition at line 146 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetAckManager().
|
protected |
Association Manager.
Definition at line 143 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetAssocManager().
|
protected |
EMLSR Manager object factory.
Definition at line 148 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetEmlsrManager().
|
protected |
MAC object factory.
Definition at line 142 of file wifi-mac-helper.h.
|
protected |
Multi-user Scheduler object factory.
Definition at line 147 of file wifi-mac-helper.h.
Referenced by Create(), and SetMultiUserScheduler().
|
protected |
Factory to create a protection manager.
Definition at line 145 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetProtectionManager().
|
protected |
MAC queue scheduler.
Definition at line 144 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetMacQueueScheduler().