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. | |
| virtual | ~WifiMacHelper () |
| Destroy a WifiMacHelper. | |
| 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. | |
| template<typename... Args> | |
| void | SetApEmlsrManager (std::string type, Args &&... args) |
| Helper function used to set the AP EMLSR Manager that can be installed on an EHT AP MLD. | |
| template<typename... Args> | |
| void | SetAssocManager (std::string type, Args &&... args) |
| Helper function used to set the Association Manager. | |
| template<typename... Args> | |
| void | SetChannelAccessManager (Args &&... args) |
| Helper function used to set the Channel Access Manager object. | |
| template<typename... Args> | |
| void | SetDcf (Args &&... args) |
| Helper function used to create and set the Txop object. | |
| template<typename... Args> | |
| void | SetEdca (AcIndex aci, Args &&... args) |
| Helper function used to create and set the QosTxop object corresponding to the given AC. | |
| 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. | |
| template<typename... Args> | |
| void | SetFrameExchangeManager (Args &&... args) |
| Helper function used to set the Frame Exchange Manager object. | |
| template<typename... Args> | |
| void | SetGcrManager (std::string type, Args &&... args) |
| Helper function used to set the GCR Manager that can be installed on a QoS AP. | |
| template<typename... Args> | |
| void | SetMacQueueScheduler (std::string type, Args &&... args) |
| Helper function used to set the MAC queue scheduler. | |
| 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. | |
| template<typename... Args> | |
| void | SetPowerSaveManager (std::string type, Args &&... args) |
| Helper function used to set the Power Save Manager. | |
| template<typename... Args> | |
| void | SetProtectionManager (std::string type, Args &&... args) |
| Helper function used to set the Protection Manager. | |
| template<typename... Args> | |
| void | SetType (std::string type, Args &&... args) |
Protected Attributes | |
| ObjectFactory | m_ackManager |
| Factory to create an acknowledgment manager. | |
| ObjectFactory | m_apEmlsrManager |
| AP EMLSR Manager object factory. | |
| ObjectFactory | m_assocManager |
| Association Manager. | |
| ObjectFactory | m_channelAccessManager |
| Channel Access Manager object factory. | |
| ObjectFactory | m_dcf |
| Txop (DCF) object factory. | |
| std::map< AcIndex, ObjectFactory, std::greater<> > | m_edca |
| QosTxop (EDCA) object factories. | |
| ObjectFactory | m_emlsrManager |
| EMLSR Manager object factory. | |
| ObjectFactory | m_frameExchangeManager |
| Frame Exchange Manager object factory. | |
| ObjectFactory | m_gcrManager |
| GCR Manager object factory. | |
| ObjectFactory | m_mac |
| MAC object factory. | |
| ObjectFactory | m_muScheduler |
| Multi-user Scheduler object factory. | |
| ObjectFactory | m_powerSaveManager |
| Factory to create a power save manager. | |
| ObjectFactory | m_protectionManager |
| Factory to create a protection manager. | |
| ObjectFactory | m_queueScheduler |
| MAC queue scheduler. | |
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 39 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 33 of file wifi-mac-helper.cc.
References ns3::GetFrameExchangeManagerTypeIdName(), m_ackManager, m_apEmlsrManager, m_assocManager, m_channelAccessManager, m_dcf, m_edca, m_emlsrManager, m_frameExchangeManager, m_protectionManager, m_queueScheduler, SetType(), ns3::WIFI_STANDARD_COUNT, and ns3::wifiAcList.
|
virtual |
Destroy a WifiMacHelper.
Definition at line 57 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 62 of file wifi-mac-helper.cc.
References ns3::AC_BE_NQOS, ns3::Object::AggregateObject(), ns3::Mac48Address::Allocate(), ns3::ObjectFactory::Create(), ns3::DynamicCast(), ns3::GetFrameExchangeManagerTypeIdName(), m_ackManager, m_apEmlsrManager, m_assocManager, m_channelAccessManager, m_dcf, m_edca, m_emlsrManager, m_frameExchangeManager, m_gcrManager, m_mac, m_muScheduler, m_powerSaveManager, m_protectionManager, m_queueScheduler, ns3::ML_SETUP, NS_ABORT_MSG_IF, ns3::ObjectFactory::Set(), ns3::WifiAckManager::SetWifiMac(), ns3::WifiProtectionManager::SetWifiMac(), 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 290 of file wifi-mac-helper.h.
References m_ackManager.
| void ns3::WifiMacHelper::SetApEmlsrManager | ( | std::string | type, |
| Args &&... | args ) |
Helper function used to set the AP EMLSR Manager that can be installed on an EHT AP MLD.
| Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
| type | the type of AP EMLSR Manager |
| args | A sequence of name-value pairs of the attributes to set. |
Definition at line 322 of file wifi-mac-helper.h.
References m_apEmlsrManager.
| 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 266 of file wifi-mac-helper.h.
References m_assocManager.
| void ns3::WifiMacHelper::SetChannelAccessManager | ( | Args &&... | args | ) |
Helper function used to set the Channel Access Manager object.
| Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
| args | A sequence of name-value pairs of the attributes to set. |
Definition at line 252 of file wifi-mac-helper.h.
References m_channelAccessManager.
| void ns3::WifiMacHelper::SetDcf | ( | Args &&... | args | ) |
Helper function used to create and set the Txop object.
| Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
| args | A sequence of name-value pairs of the attributes to set. |
Definition at line 236 of file wifi-mac-helper.h.
References m_dcf.
| void ns3::WifiMacHelper::SetEdca | ( | AcIndex | aci, |
| Args &&... | args ) |
Helper function used to create and set the QosTxop object corresponding to the given AC.
| aci | the AC index |
| Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
| args | A sequence of name-value pairs of the attributes to set. |
Definition at line 243 of file wifi-mac-helper.h.
References m_edca, and NS_ASSERT_MSG.
| 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 314 of file wifi-mac-helper.h.
References m_emlsrManager.
Referenced by WifiStaticEmlsrTest::GetClientMacHelper().
| void ns3::WifiMacHelper::SetFrameExchangeManager | ( | Args &&... | args | ) |
Helper function used to set the Frame Exchange Manager object.
| Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
| args | A sequence of name-value pairs of the attributes to set. |
Definition at line 259 of file wifi-mac-helper.h.
References m_frameExchangeManager.
| void ns3::WifiMacHelper::SetGcrManager | ( | std::string | type, |
| Args &&... | args ) |
Helper function used to set the GCR Manager that can be installed on a QoS AP.
| Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
| type | the type of GCR Manager |
| args | A sequence of name-value pairs of the attributes to set. |
Definition at line 330 of file wifi-mac-helper.h.
References m_gcrManager.
Referenced by GcrBaTest::ConfigureGcrManager(), and GcrUrTest::ConfigureGcrManager().
| 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 274 of file wifi-mac-helper.h.
References m_queueScheduler.
| 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 306 of file wifi-mac-helper.h.
References m_muScheduler.
Referenced by WifiStaticInfraBssTest::GetApMacHelper().
| void ns3::WifiMacHelper::SetPowerSaveManager | ( | std::string | type, |
| Args &&... | args ) |
Helper function used to set the Power Save Manager.
| Args | [deduced] Template type parameter pack for the sequence of name-value pairs. |
| type | the type of Power Save Manager |
| args | A sequence of name-value pairs of the attributes to set. |
Definition at line 298 of file wifi-mac-helper.h.
References m_powerSaveManager.
Referenced by WifiStaticEmlsrTest::GetClientMacHelper(), and WifiStaticInfraBssTest::GetClientMacHelper().
| 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 282 of file wifi-mac-helper.h.
References m_protectionManager.
| 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 228 of file wifi-mac-helper.h.
References m_mac.
Referenced by WifiMacHelper(), BatteryLifetimeTest::ConstantLoadTest(), AodvExample::CreateDevices(), Bug772ChainTest::CreateDevices(), ChainRegressionTest::CreateDevices(), DsdvManetExample::CreateDevices(), TracerouteExample::CreateDevices(), BasicEnergyDepletionTest::DepletionTestCase(), ns3::aodv::LoopbackTestCase::DoRun(), SetChannelFrequencyTest::DoRun(), WifiAcMappingTest::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), WifiUseAvailBwTest::DoRun(), GcrTestBase::DoSetup(), experiment(), WifiStaticEmlsrTest::GetApMacHelper(), WifiStaticInfraBssTest::GetApMacHelper(), WifiStaticEmlsrTest::GetClientMacHelper(), WifiStaticInfraBssTest::GetClientMacHelper(), RoutingExperiment::Run(), and BatteryLifetimeTest::VariableLoadTest().
|
protected |
Factory to create an acknowledgment manager.
Definition at line 209 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetAckManager().
|
protected |
AP EMLSR Manager object factory.
Definition at line 213 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetApEmlsrManager().
|
protected |
Association Manager.
Definition at line 206 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetAssocManager().
|
protected |
Channel Access Manager object factory.
Definition at line 204 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetChannelAccessManager().
|
protected |
Txop (DCF) object factory.
Definition at line 202 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetDcf().
|
protected |
QosTxop (EDCA) object factories.
Definition at line 203 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetEdca().
|
protected |
EMLSR Manager object factory.
Definition at line 212 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetEmlsrManager().
|
protected |
Frame Exchange Manager object factory.
Definition at line 205 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetFrameExchangeManager().
|
protected |
GCR Manager object factory.
Definition at line 214 of file wifi-mac-helper.h.
Referenced by Create(), and SetGcrManager().
|
protected |
MAC object factory.
Definition at line 201 of file wifi-mac-helper.h.
|
protected |
Multi-user Scheduler object factory.
Definition at line 211 of file wifi-mac-helper.h.
Referenced by Create(), and SetMultiUserScheduler().
|
protected |
Factory to create a power save manager.
Definition at line 210 of file wifi-mac-helper.h.
Referenced by Create(), and SetPowerSaveManager().
|
protected |
Factory to create a protection manager.
Definition at line 208 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetProtectionManager().
|
protected |
MAC queue scheduler.
Definition at line 207 of file wifi-mac-helper.h.
Referenced by WifiMacHelper(), Create(), and SetMacQueueScheduler().