11#include "ns3/ap-emlsr-manager.h"
12#include "ns3/boolean.h"
13#include "ns3/eht-configuration.h"
14#include "ns3/emlsr-manager.h"
16#include "ns3/frame-exchange-manager.h"
17#include "ns3/multi-user-scheduler.h"
18#include "ns3/pointer.h"
19#include "ns3/wifi-ack-manager.h"
20#include "ns3/wifi-assoc-manager.h"
21#include "ns3/wifi-mac-queue-scheduler.h"
22#include "ns3/wifi-net-device.h"
23#include "ns3/wifi-protection-manager.h"
39 auto [it, inserted] =
m_edca.try_emplace(aci);
40 it->second.SetTypeId(
"ns3::QosTxop");
79 for (
auto [aci, edca] :
m_edca)
84 auto s = ss.str().substr(3);
90 auto nLinks = std::max<uint8_t>(device->GetNPhys(), 1);
93 std::vector<Ptr<ChannelAccessManager>> caManagers;
94 for (uint8_t linkId = 0; linkId < nLinks; ++linkId)
100 mac->SetDevice(device);
103 mac->SetChannelAccessManagers(caManagers);
106 std::vector<Ptr<FrameExchangeManager>> feManagers;
110 for (uint8_t linkId = 0; linkId < nLinks; ++linkId)
113 feManagers.emplace_back(fem);
117 protectionManager->SetLinkId(linkId);
118 fem->SetProtectionManager(protectionManager);
122 ackManager->SetLinkId(linkId);
123 fem->SetAckManager(ackManager);
129 mac->SetFrameExchangeManagers(feManagers);
132 mac->SetMacQueueScheduler(queueScheduler);
140 apMac->AggregateObject(muScheduler);
148 staMac->SetAssocManager(assocManager);
154 device->GetEhtConfiguration()->GetAttributeFailSafe(
"EmlsrActivated", emlsrActivated) &&
155 emlsrActivated.Get())
158 staMac->SetEmlsrManager(emlsrManager);
164 device->GetEhtConfiguration()->GetAttributeFailSafe(
"EmlsrActivated", emlsrActivated) &&
165 emlsrActivated.Get())
168 apMac->SetApEmlsrManager(apEmlsrManager);
ApEmlsrManager is an abstract base class defining the API that EHT AP MLDs with EMLSR activated can u...
Manage a set of ns3::Txop.
EmlsrManager is an abstract base class defining the API that EHT non-AP MLDs with EMLSR activated can...
Hold variables of type enum.
FrameExchangeManager is a base class handling the basic frame exchange sequences for non-QoS stations...
static Mac48Address Allocate()
Allocate a new Mac48Address.
MultiUserScheduler is an abstract base class defining the API that APs supporting at least VHT can us...
Instantiate subclasses of ns3::Object.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
bool IsTypeIdSet() const
Check if the ObjectFactory has been configured with a TypeId.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
WifiAckManager is an abstract base class.
void SetWifiMac(Ptr< WifiMac > mac)
Set the MAC which is using this Acknowledgment Manager.
Abstract base class for the Association Manager, which manages scanning and association for single li...
ObjectFactory m_apEmlsrManager
AP EMLSR Manager object factory.
std::map< AcIndex, ObjectFactory, std::greater<> > m_edca
QosTxop (EDCA) object factories.
ObjectFactory m_mac
MAC object factory.
ObjectFactory m_queueScheduler
MAC queue scheduler.
virtual ~WifiMacHelper()
Destroy a WifiMacHelper.
virtual Ptr< WifiMac > Create(Ptr< WifiNetDevice > device, WifiStandard standard) const
ObjectFactory m_protectionManager
Factory to create a protection manager.
ObjectFactory m_muScheduler
Multi-user Scheduler object factory.
ObjectFactory m_assocManager
Association Manager.
WifiMacHelper()
Create a WifiMacHelper to make life easier for people who want to work with Wifi MAC layers.
ObjectFactory m_emlsrManager
EMLSR Manager object factory.
ObjectFactory m_dcf
Txop (DCF) object factory.
ObjectFactory m_ackManager
Factory to create an acknowledgment manager.
void SetType(std::string type, Args &&... args)
ObjectFactory m_frameExchangeManager
Frame Exchange Manager object factory.
ObjectFactory m_channelAccessManager
Channel Access Manager object factory.
base class for all MAC-level wifi objects.
WifiMacQueueScheduler is an abstract base class defining the public interface for a wifi MAC queue sc...
WifiProtectionManager is an abstract base class.
void SetWifiMac(Ptr< WifiMac > mac)
Set the MAC which is using this Protection Manager.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
@ WIFI_STANDARD_UNSPECIFIED
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string GetFrameExchangeManagerTypeIdName(WifiStandard standard, bool qosSupported)
Get the TypeId name for the FrameExchangeManager corresponding to the given standard.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
const std::map< AcIndex, WifiAc > wifiAcList
Map containing the four ACs in increasing order of priority (according to Table 10-1 "UP-to-AC Mappin...