create QoS-enabled MAC layers for a ns3::WifiNetDevice. More...
#include <qos-wifi-mac-helper.h>
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 () |
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 | 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()) |
Set the underlying type of the MAC and its attributes. More... | |
![]() | |
virtual | ~WifiMacHelper () |
Static Public Member Functions | |
static QosWifiMacHelper | Default (void) |
Create a mac helper in a default working state. More... | |
Protected Attributes | |
ObjectFactory | m_mac |
Private Member Functions | |
virtual Ptr< WifiMac > | Create (void) const |
void | Setup (Ptr< WifiMac > mac, enum AcIndex ac, std::string dcaAttrName) const |
Private Attributes | |
std::map< AcIndex, ObjectFactory > | m_aggregators |
std::map< AcIndex, uint16_t > | m_bAckInactivityTimeouts |
std::map< AcIndex, uint8_t > | m_bAckThresholds |
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.
Definition at line 36 of file qos-wifi-mac-helper.h.
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 30 of file qos-wifi-mac-helper.cc.
|
virtual |
Definition at line 34 of file qos-wifi-mac-helper.cc.
This method implements the pure virtual method defined in ns3::WifiMacHelper.
Implements ns3::WifiMacHelper.
Definition at line 141 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, and Setup().
|
static |
Create a mac helper in a default working state.
Definition at line 39 of file qos-wifi-mac-helper.cc.
References SetType().
Referenced by main().
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.
ac | access category for which we are setting block ack threshold. Possibilities are: AC_BK, AC_BE, AC_VI, AC_VO. |
timeout | number of block of 1024 microseconds. |
Definition at line 110 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.
ac | access category for which we are setting block ack threshold. Possibilities are: AC_BK, AC_BE, AC_VI, AC_VO. |
threshold | the threshold (number of packets) |
Definition at line 104 of file qos-wifi-mac-helper.cc.
References m_bAckThresholds.
Referenced by main().
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.
ac | access category for which we are setting aggregator. Possibilities are: AC_BK, AC_BE, AC_VI, AC_VO. |
type | the type of ns3::MsduAggregator to create. |
n0 | the name of the attribute to set |
v0 | the value of the attribute to set |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
n2 | the name of the attribute to set |
v2 | the value of the attribute to set |
n3 | the name of the attribute to set |
v3 | the value of the attribute to set |
All the attributes specified in this method should exist in the requested aggregator.
Definition at line 76 of file qos-wifi-mac-helper.cc.
References m_aggregators, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by WifiMsduAggregatorThroughputTest::DoRun(), and main().
|
virtual |
Set the underlying type of the MAC and its attributes.
type | the type of ns3::WifiMac to create. |
n0 | the name of the attribute to set |
v0 | the value of the attribute to set |
n1 | the name of the attribute to set |
v1 | the value of the attribute to set |
n2 | the name of the attribute to set |
v2 | the value of the attribute to set |
n3 | the name of the attribute to set |
v3 | the value of the attribute to set |
n4 | the name of the attribute to set |
v4 | the value of the attribute to set |
n5 | the name of the attribute to set |
v5 | the value of the attribute to set |
n6 | the name of the attribute to set |
v6 | the value of the attribute to set |
n7 | the name of the attribute to set |
v7 | the value of the attribute to set |
All the attributes specified in this method should exist in the requested mac.
Reimplemented in ns3::QosWaveMacHelper.
Definition at line 54 of file qos-wifi-mac-helper.cc.
References m_mac, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
Referenced by ns3::HtWifiMacHelper::Default(), Default(), WifiMsduAggregatorThroughputTest::DoRun(), main(), and ns3::QosWaveMacHelper::SetType().
|
private |
Definition at line 116 of file qos-wifi-mac-helper.cc.
References ns3::ObjectFactory::Create(), ns3::PointerValue::Get(), m_aggregators, m_bAckInactivityTimeouts, m_bAckThresholds, ns3::EdcaTxopN::SetBlockAckInactivityTimeout(), ns3::EdcaTxopN::SetBlockAckThreshold(), and ns3::EdcaTxopN::SetMsduAggregator().
Referenced by Create().
|
private |
Definition at line 146 of file qos-wifi-mac-helper.h.
Referenced by SetMsduAggregatorForAc(), and Setup().
|
private |
Definition at line 152 of file qos-wifi-mac-helper.h.
Referenced by SetBlockAckInactivityTimeoutForAc(), and Setup().
|
private |
Definition at line 151 of file qos-wifi-mac-helper.h.
Referenced by SetBlockAckThresholdForAc(), and Setup().
|
protected |
Definition at line 135 of file qos-wifi-mac-helper.h.