A Discrete-Event Network Simulator
API
ns3::WifiMacHelper Class Reference

create MAC layers for a ns3::WifiNetDevice. More...

#include "wifi-mac-helper.h"

+ Inheritance diagram for ns3::WifiMacHelper:
+ Collaboration diagram for ns3::WifiMacHelper:

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< WifiMacCreate (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 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_mac
 MAC object factory. More...
 
ObjectFactory m_muScheduler
 Multi-user Scheduler object factory. More...
 
ObjectFactory m_protectionManager
 Factory to create a protection manager. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ WifiMacHelper()

ns3::WifiMacHelper::WifiMacHelper ( )

Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers.

Definition at line 31 of file wifi-mac-helper.cc.

References m_ackManager, m_protectionManager, SetType(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ ~WifiMacHelper()

ns3::WifiMacHelper::~WifiMacHelper ( )
virtual

Destroy a WifiMacHelper.

Definition at line 40 of file wifi-mac-helper.cc.

Member Function Documentation

◆ Create()

Ptr< WifiMac > ns3::WifiMacHelper::Create ( Ptr< WifiNetDevice device,
WifiStandard  standard 
) const
virtual
Parameters
devicethe device within which the MAC object will reside
standardthe standard to configure during installation
Returns
a new MAC object.

This allows the ns3::WifiHelper class to create MAC objects from ns3::WifiHelper::Install.

Definition at line 45 of file wifi-mac-helper.cc.

References ns3::Mac48Address::Allocate(), ns3::ObjectFactory::Create(), ns3::ObjectFactory::IsTypeIdSet(), m_ackManager, m_mac, m_muScheduler, m_protectionManager, third::mac, NS_ABORT_MSG_IF, ns3::ObjectFactory::Set(), ns3::WIFI_STANDARD_80211ax, ns3::WIFI_STANDARD_80211n, and ns3::WIFI_STANDARD_UNSPECIFIED.

Referenced by ns3::WaveHelper::Install(), and ns3::WifiHelper::Install().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAckManager()

template<typename... Args>
void ns3::WifiMacHelper::SetAckManager ( std::string  type,
Args &&...  args 
)

Helper function used to set the Acknowledgment Manager.

Template Parameters
Args[deduced] Template type parameter pack for the sequence of name-value pairs.
Parameters
typethe type of Acknowledgment Manager
argsA sequence of name-value pairs of the attributes to set.

Definition at line 146 of file wifi-mac-helper.h.

References m_ackManager, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ SetMultiUserScheduler()

template<typename... Args>
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.

Template Parameters
Args[deduced] Template type parameter pack for the sequence of name-value pairs.
Parameters
typethe type of Multi User Scheduler
argsA sequence of name-value pairs of the attributes to set.

Definition at line 154 of file wifi-mac-helper.h.

References m_muScheduler, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ SetProtectionManager()

template<typename... Args>
void ns3::WifiMacHelper::SetProtectionManager ( std::string  type,
Args &&...  args 
)

Helper function used to set the Protection Manager.

Template Parameters
Args[deduced] Template type parameter pack for the sequence of name-value pairs.
Parameters
typethe type of Protection Manager
argsA sequence of name-value pairs of the attributes to set.

Definition at line 138 of file wifi-mac-helper.h.

References m_protectionManager, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ SetType()

template<typename... Args>
void ns3::WifiMacHelper::SetType ( std::string  type,
Args &&...  args 
)

Member Data Documentation

◆ m_ackManager

ObjectFactory ns3::WifiMacHelper::m_ackManager
protected

Factory to create an acknowledgment manager.

Definition at line 115 of file wifi-mac-helper.h.

Referenced by WifiMacHelper(), Create(), and SetAckManager().

◆ m_mac

ObjectFactory ns3::WifiMacHelper::m_mac
protected

MAC object factory.

Definition at line 113 of file wifi-mac-helper.h.

Referenced by Create(), and SetType().

◆ m_muScheduler

ObjectFactory ns3::WifiMacHelper::m_muScheduler
protected

Multi-user Scheduler object factory.

Definition at line 116 of file wifi-mac-helper.h.

Referenced by Create(), and SetMultiUserScheduler().

◆ m_protectionManager

ObjectFactory ns3::WifiMacHelper::m_protectionManager
protected

Factory to create a protection manager.

Definition at line 114 of file wifi-mac-helper.h.

Referenced by WifiMacHelper(), Create(), and SetProtectionManager().


The documentation for this class was generated from the following files: