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

create QoS-enabled MAC layers for a ns3::WifiNetDevice. More...

#include "qos-wifi-mac-helper.h"

+ Inheritance diagram for ns3::QosWifiMacHelper:
+ Collaboration diagram for ns3::QosWifiMacHelper:

Public Member Functions

 QosWifiMacHelper ()
 Create a QosWifiMacHelper that is used to make life easier when working with Wifi devices using a QOS MAC layer. More...
 
virtual ~QosWifiMacHelper ()
 Destroy a QosWifiMacHelper. More...
 
void SetBlockAckInactivityTimeoutForAc (enum AcIndex ac, uint16_t timeout)
 Sets value of block ack inactivity timeout for a specific access class. More...
 
void SetBlockAckThresholdForAc (enum AcIndex ac, uint8_t threshold)
 This method sets value of block ack threshold for a specific access class. More...
 
void SetMpduAggregatorForAc (enum AcIndex ac, std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue())
 Set the class, type and attributes for the Mpdu aggregator. More...
 
void SetMsduAggregatorForAc (AcIndex ac, std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue())
 Set the class, type and attributes for the Msdu aggregator. More...
 
virtual void SetType (std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue(), std::string n10="", const AttributeValue &v10=EmptyAttributeValue())
 Set the underlying type of the MAC and its attributes. More...
 
- Public Member Functions inherited from ns3::WifiMacHelper
 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...
 

Static Public Member Functions

static QosWifiMacHelper Default (void)
 Create a mac helper in a default working state. More...
 

Protected Attributes

ObjectFactory m_mac
 MAC object. More...
 
- Protected Attributes inherited from ns3::WifiMacHelper
ObjectFactory m_mac
 MAC object factory. More...
 

Private Member Functions

virtual Ptr< WifiMacCreate (void) const
 
void Setup (Ptr< WifiMac > mac, enum AcIndex ac, std::string edcaAttrName) const
 Setup function. More...
 

Private Attributes

std::map< AcIndex, uint16_t > m_bAckInactivityTimeouts
 Block ACK inactivity timeouts. More...
 
std::map< AcIndex, uint8_t > m_bAckThresholds
 Block ACK thresholds. More...
 
std::map< AcIndex, ObjectFactorym_mpduAggregators
 A-MPDU aggregators. More...
 
std::map< AcIndex, ObjectFactorym_msduAggregators
 A-MSDU aggregators. More...
 

Detailed Description

create QoS-enabled MAC layers for a ns3::WifiNetDevice.

This class can create MACs of type ns3::ApWifiMac, ns3::StaWifiMac, and, ns3::AdhocWifiMac, with QosSupported attribute set to True.

Deprecated:
This class deprecated and replaced by ns3::WifiMacHelper

Definition at line 40 of file qos-wifi-mac-helper.h.

Constructor & Destructor Documentation

ns3::QosWifiMacHelper::QosWifiMacHelper ( )

Create a QosWifiMacHelper that is used to make life easier when working with Wifi devices using a QOS MAC layer.

Definition at line 33 of file qos-wifi-mac-helper.cc.

ns3::QosWifiMacHelper::~QosWifiMacHelper ( )
virtual

Destroy a QosWifiMacHelper.

Definition at line 37 of file qos-wifi-mac-helper.cc.

Member Function Documentation

Ptr< WifiMac > ns3::QosWifiMacHelper::Create ( void  ) const
privatevirtual
Returns
a newly-created MAC object.

This method implements the pure virtual method defined in ns3::WifiMacHelper.

Reimplemented from ns3::WifiMacHelper.

Definition at line 186 of file qos-wifi-mac-helper.cc.

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, ns3::ObjectFactory::Create(), m_mac, third::mac, and Setup().

+ Here is the call graph for this function:

QosWifiMacHelper ns3::QosWifiMacHelper::Default ( void  )
static

Create a mac helper in a default working state.

Returns
a default QosWifiMacHelper

Definition at line 42 of file qos-wifi-mac-helper.cc.

References SetType().

+ Here is the call graph for this function:

void ns3::QosWifiMacHelper::SetBlockAckInactivityTimeoutForAc ( enum AcIndex  ac,
uint16_t  timeout 
)

Sets value of block ack inactivity timeout for a specific access class.

timeout represents number of blocks of 1024 microseconds. When this timer expires the relative block ack agreement is teared down. Timer is reset in an recipient station every time that a block ack request or a MPDU with ack policy BLOCK ACK is received. Timer is reset in a originator station every time that a block ack frame is received.

Parameters
acaccess category for which we are setting block ack threshold. Possibilities are: AC_BK, AC_BE, AC_VI, AC_VO.
timeoutnumber of block of 1024 microseconds.

Definition at line 146 of file qos-wifi-mac-helper.cc.

References m_bAckInactivityTimeouts, and timeout.

void ns3::QosWifiMacHelper::SetBlockAckThresholdForAc ( enum AcIndex  ac,
uint8_t  threshold 
)

This method sets value of block ack threshold for a specific access class.

If number of packets in the respective queue reaches this value block ack mechanism is used.

Parameters
acaccess category for which we are setting block ack threshold. Possibilities are: AC_BK, AC_BE, AC_VI, AC_VO.
thresholdthe threshold (number of packets)

Definition at line 140 of file qos-wifi-mac-helper.cc.

References m_bAckThresholds.

void ns3::QosWifiMacHelper::SetMpduAggregatorForAc ( enum AcIndex  ac,
std::string  type,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue () 
)

Set the class, type and attributes for the Mpdu aggregator.

Parameters
acaccess category for which we are setting aggregator. Possibilities are: AC_BK, AC_BE, AC_VI, AC_VO.
typethe type of ns3::MsduAggregator to create.
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set

All the attributes specified in this method should exist in the requested aggregator.

Definition at line 112 of file qos-wifi-mac-helper.cc.

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

Referenced by ns3::VhtWifiMacHelper::Default().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::QosWifiMacHelper::SetMsduAggregatorForAc ( AcIndex  ac,
std::string  type,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue () 
)

Set the class, type and attributes for the Msdu aggregator.

Parameters
acaccess category for which we are setting aggregator. Possibilities are: AC_BK, AC_BE, AC_VI, AC_VO.
typethe type of ns3::MsduAggregator to create.
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set

All the attributes specified in this method should exist in the requested aggregator.

Definition at line 84 of file qos-wifi-mac-helper.cc.

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

+ Here is the call graph for this function:

void ns3::QosWifiMacHelper::SetType ( std::string  type,
std::string  n0 = "",
const AttributeValue v0 = EmptyAttributeValue (),
std::string  n1 = "",
const AttributeValue v1 = EmptyAttributeValue (),
std::string  n2 = "",
const AttributeValue v2 = EmptyAttributeValue (),
std::string  n3 = "",
const AttributeValue v3 = EmptyAttributeValue (),
std::string  n4 = "",
const AttributeValue v4 = EmptyAttributeValue (),
std::string  n5 = "",
const AttributeValue v5 = EmptyAttributeValue (),
std::string  n6 = "",
const AttributeValue v6 = EmptyAttributeValue (),
std::string  n7 = "",
const AttributeValue v7 = EmptyAttributeValue (),
std::string  n8 = "",
const AttributeValue v8 = EmptyAttributeValue (),
std::string  n9 = "",
const AttributeValue v9 = EmptyAttributeValue (),
std::string  n10 = "",
const AttributeValue v10 = EmptyAttributeValue () 
)
virtual

Set the underlying type of the MAC and its attributes.

Parameters
typethe type of ns3::WifiMac to create.
n0the name of the attribute to set
v0the value of the attribute to set
n1the name of the attribute to set
v1the value of the attribute to set
n2the name of the attribute to set
v2the value of the attribute to set
n3the name of the attribute to set
v3the value of the attribute to set
n4the name of the attribute to set
v4the value of the attribute to set
n5the name of the attribute to set
v5the value of the attribute to set
n6the name of the attribute to set
v6the value of the attribute to set
n7the name of the attribute to set
v7the value of the attribute to set
n8the name of the attribute to set
v8the value of the attribute to set
n9the name of the attribute to set
v9the value of the attribute to set
n10the name of the attribute to set
v10the value of the attribute to set

All the attributes specified in this method should exist in the requested mac.

Reimplemented from ns3::WifiMacHelper.

Definition at line 56 of file qos-wifi-mac-helper.cc.

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

Referenced by ns3::HtWifiMacHelper::Default(), Default(), and ns3::VhtWifiMacHelper::Default().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::QosWifiMacHelper::Setup ( Ptr< WifiMac mac,
enum AcIndex  ac,
std::string  edcaAttrName 
) const
private

Setup function.

Parameters
macthe wifi MAC
acthe access category
edcaAttrNamethe EDCA attribute name (VO_EdcaTxopN, VI_EdcaTxopN, BE_EdcaTxopN, BK_EdcaTxopN)

Definition at line 152 of file qos-wifi-mac-helper.cc.

References ns3::ObjectFactory::Create(), ns3::PointerValue::Get(), m_bAckInactivityTimeouts, m_bAckThresholds, m_mpduAggregators, m_msduAggregators, ns3::EdcaTxopN::SetBlockAckInactivityTimeout(), ns3::EdcaTxopN::SetBlockAckThreshold(), ns3::EdcaTxopN::SetMpduAggregator(), and ns3::EdcaTxopN::SetMsduAggregator().

Referenced by Create().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::map<AcIndex, uint16_t> ns3::QosWifiMacHelper::m_bAckInactivityTimeouts
private

Block ACK inactivity timeouts.

Definition at line 198 of file qos-wifi-mac-helper.h.

Referenced by SetBlockAckInactivityTimeoutForAc(), and Setup().

std::map<AcIndex, uint8_t> ns3::QosWifiMacHelper::m_bAckThresholds
private

Block ACK thresholds.

Definition at line 197 of file qos-wifi-mac-helper.h.

Referenced by SetBlockAckThresholdForAc(), and Setup().

ObjectFactory ns3::QosWifiMacHelper::m_mac
protected

MAC object.

Definition at line 173 of file qos-wifi-mac-helper.h.

Referenced by Create(), and SetType().

std::map<AcIndex, ObjectFactory> ns3::QosWifiMacHelper::m_mpduAggregators
private

A-MPDU aggregators.

Definition at line 192 of file qos-wifi-mac-helper.h.

Referenced by SetMpduAggregatorForAc(), and Setup().

std::map<AcIndex, ObjectFactory> ns3::QosWifiMacHelper::m_msduAggregators
private

A-MSDU aggregators.

Definition at line 191 of file qos-wifi-mac-helper.h.

Referenced by SetMsduAggregatorForAc(), and Setup().


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