20 #include "qos-wifi-mac-helper.h"
21 #include "ns3/msdu-aggregator.h"
22 #include "ns3/wifi-mac.h"
23 #include "ns3/edca-txop-n.h"
24 #include "ns3/pointer.h"
25 #include "ns3/boolean.h"
26 #include "ns3/uinteger.h"
47 helper.
SetType (
"ns3::StaWifiMac",
82 std::map<AcIndex, ObjectFactory>::iterator it = m_aggregators.find (ac);
83 if (it != m_aggregators.end ())
85 it->second.SetTypeId (type);
86 it->second.Set (n0, v0);
87 it->second.Set (n1, v1);
88 it->second.Set (n2, v2);
89 it->second.Set (n3, v3);
99 m_aggregators.insert (std::make_pair (ac, factory));
106 m_bAckThresholds[ac] = threshold;
112 m_bAckInactivityTimeouts[ac] = timeout;
118 std::map<AcIndex, ObjectFactory>::const_iterator it = m_aggregators.find (ac);
120 mac->GetAttribute (dcaAttrName, ptr);
123 if (it != m_aggregators.end ())
127 edca->SetMsduAggregator (aggregator);
129 if (m_bAckThresholds.find (ac) != m_bAckThresholds.end ())
131 edca->SetBlockAckThreshold (m_bAckThresholds.find (ac)->second);
133 if (m_bAckInactivityTimeouts.find (ac) != m_bAckInactivityTimeouts.end ())
135 edca->SetBlockAckInactivityTimeout (m_bAckInactivityTimeouts.find (ac)->second);
145 Setup (mac,
AC_VO,
"VO_EdcaTxopN");
146 Setup (mac,
AC_VI,
"VI_EdcaTxopN");
147 Setup (mac,
AC_BE,
"BE_EdcaTxopN");
148 Setup (mac,
AC_BK,
"BK_EdcaTxopN");
smart pointer class similar to boost::intrusive_ptr
Hold a value for an Attribute.
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())
void SetTypeId(TypeId tid)
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())
void SetBlockAckThresholdForAc(enum AcIndex ac, uint8_t threshold)
Ptr< Object > Create(void) const
base class for all MAC-level wifi objects.This class encapsulates all the low-level MAC functionality...
static QosWifiMacHelper Default(void)
create QoS-enabled MAC layers for a ns3::WifiNetDevice.
hold objects of type Ptr<T>
virtual ~QosWifiMacHelper()
virtual Ptr< WifiMac > Create(void) const
void Set(std::string name, const AttributeValue &value)
instantiate subclasses of ns3::Object.
void SetBlockAckInactivityTimeoutForAc(enum AcIndex ac, uint16_t timeout)
Abstract class that concrete msdu aggregators have to implement.