A Discrete-Event Network Simulator
API
wifi-mac.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19
20#ifndef WIFI_MAC_H
21#define WIFI_MAC_H
22
23#include "qos-utils.h"
24#include "ssid.h"
26#include "wifi-standards.h"
27
28#include <list>
29#include <memory>
30#include <optional>
31#include <set>
32#include <unordered_map>
33#include <vector>
34
35namespace ns3
36{
37
38class Txop;
39class WifiNetDevice;
40class QosTxop;
41class WifiPsdu;
42class MacRxMiddle;
43class MacTxMiddle;
44class WifiMacQueue;
45class WifiMpdu;
46class HtConfiguration;
47class VhtConfiguration;
48class HeConfiguration;
49class EhtConfiguration;
50class FrameExchangeManager;
51class ChannelAccessManager;
52class ExtendedCapabilities;
53class WifiMacQueueScheduler;
54
59{
64 OCB
65};
66
72enum WifiMacDropReason : uint8_t
73{
78};
79
80typedef std::unordered_map<uint16_t /* staId */, Ptr<WifiPsdu> /* PSDU */> WifiPsduMap;
81
91class WifiMac : public Object
92{
93 public:
98 static TypeId GetTypeId();
99
100 WifiMac();
101 ~WifiMac() override;
102
103 // Delete copy constructor and assignment operator to avoid misuse
104 WifiMac(const WifiMac&) = delete;
105 WifiMac& operator=(const WifiMac&) = delete;
106
112 void SetDevice(const Ptr<WifiNetDevice> device);
119
127
135
141 uint8_t GetNLinks() const;
148 virtual std::optional<uint8_t> GetLinkIdByAddress(const Mac48Address& address) const;
149
155 Ptr<Txop> GetTxop() const;
169 Ptr<QosTxop> GetQosTxop(uint8_t tid) const;
178 virtual Ptr<WifiMacQueue> GetTxopQueue(AcIndex ac) const;
179
185 virtual void SetMacQueueScheduler(Ptr<WifiMacQueueScheduler> scheduler);
192
207
211 void SetSsid(Ssid ssid);
219 void SetPromisc();
226 void SetCtsToSelfSupported(bool enable);
227
231 Mac48Address GetAddress() const;
235 Ssid GetSsid() const;
239 virtual void SetAddress(Mac48Address address);
244 Mac48Address GetBssid(uint8_t linkId) const;
249 void SetBssid(Mac48Address bssid, uint8_t linkId);
250
258 virtual bool CanForwardPacketsTo(Mac48Address to) const = 0;
270 virtual void Enqueue(Ptr<Packet> packet, Mac48Address to, Mac48Address from);
279 virtual void Enqueue(Ptr<Packet> packet, Mac48Address to) = 0;
287 virtual bool SupportsSendFrom() const;
288
292 virtual void SetWifiPhys(const std::vector<Ptr<WifiPhy>>& phys);
297 Ptr<WifiPhy> GetWifiPhy(uint8_t linkId = SINGLE_LINK_OP_ID) const;
301 void ResetWifiPhys();
302
311 const std::vector<Ptr<WifiRemoteStationManager>>& stationManagers);
318
328
337 virtual void SetLinkUpCallback(Callback<void> linkUp);
341 void SetLinkDownCallback(Callback<void> linkDown);
342 /* Next functions are not pure virtual so non QoS WifiMacs are not
343 * forced to implement them.
344 */
345
351 virtual void NotifyChannelSwitching(uint8_t linkId);
352
360 void NotifyTx(Ptr<const Packet> packet);
368 void NotifyTxDrop(Ptr<const Packet> packet);
374 void NotifyRx(Ptr<const Packet> packet);
386 void NotifyRxDrop(Ptr<const Packet> packet);
387
396 virtual void ConfigureStandard(WifiStandard standard);
397
414
427 HtCapabilities GetHtCapabilities(uint8_t linkId) const;
434 VhtCapabilities GetVhtCapabilities(uint8_t linkId) const;
441 HeCapabilities GetHeCapabilities(uint8_t linkId) const;
448 EhtCapabilities GetEhtCapabilities(uint8_t linkId) const;
449
455 bool GetQosSupported() const;
462 bool GetErpSupported(uint8_t linkId) const;
469 bool GetDsssSupported(uint8_t linkId) const;
475 bool GetHtSupported() const;
482 bool GetVhtSupported(uint8_t linkId) const;
488 bool GetHeSupported() const;
494 bool GetEhtSupported() const;
495
509 uint16_t GetMaxAmsduSize(AcIndex ac) const;
510
511 protected:
512 void DoInitialize() override;
513 void DoDispose() override;
514
522 virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax);
523
531 void SetQosSupported(bool enable);
532
539 void SetShortSlotTimeSupported(bool enable);
543 bool GetShortSlotTimeSupported() const;
544
550 Ptr<QosTxop> GetVOQueue() const;
556 Ptr<QosTxop> GetVIQueue() const;
562 Ptr<QosTxop> GetBEQueue() const;
568 Ptr<QosTxop> GetBKQueue() const;
569
590 virtual void Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId);
599
607
616 {
618 virtual ~LinkEntity();
619
620 uint8_t id;
626 bool erpSupported{false};
627 bool dsssSupported{false};
628 };
629
636 LinkEntity& GetLink(uint8_t linkId) const;
637
642
645
646 private:
656 void ConfigureDcf(Ptr<Txop> dcf,
657 uint32_t cwmin,
658 uint32_t cwmax,
659 std::list<bool> isDsss,
660 AcIndex ac);
661
667 void ConfigurePhyDependentParameters(uint8_t linkId);
668
675 void SetupEdcaQueue(AcIndex ac);
676
685
691 virtual std::unique_ptr<LinkEntity> CreateLinkEntity() const;
692
699 void SetErpSupported(bool enable, uint8_t linkId);
706 void SetDsssSupported(bool enable, uint8_t linkId);
707
713 void SetVoBlockAckThreshold(uint8_t threshold);
719 void SetViBlockAckThreshold(uint8_t threshold);
725 void SetBeBlockAckThreshold(uint8_t threshold);
731 void SetBkBlockAckThreshold(uint8_t threshold);
732
757
772
775
777
779 std::vector<std::unique_ptr<LinkEntity>> m_links;
780
783
787 typedef std::map<AcIndex, Ptr<QosTxop>, std::greater<AcIndex>> EdcaQueues;
788
792
797
802
804
842
845
853
856
861
864
867
875 typedef void (*MpduResponseTimeoutCallback)(uint8_t reason,
877 const WifiTxVector& txVector);
878
882
888
896 typedef void (*PsduResponseTimeoutCallback)(uint8_t reason,
898 const WifiTxVector& txVector);
899
903
909
918 typedef void (*PsduMapResponseTimeoutCallback)(uint8_t reason,
919 WifiPsduMap* psduMap,
920 const std::set<Mac48Address>* missingStations,
921 std::size_t nTotalStations);
922
926
932};
933
934} // namespace ns3
935
936#endif /* WIFI_MAC_H */
Callback template class.
Definition: callback.h:443
The IEEE 802.11be EHT Capabilities.
The Extended Capabilities Information Element.
The IEEE 802.11ax HE Capabilities.
The HT Capabilities Information Element.
an EUI-48 address
Definition: mac48-address.h:46
A base class which provides memory management and object aggregation.
Definition: object.h:89
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:60
The IEEE 802.11ac VHT Capabilities.
base class for all MAC-level wifi objects.
Definition: wifi-mac.h:92
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
Definition: wifi-mac.cc:1607
Ptr< FrameExchangeManager > GetFrameExchangeManager(uint8_t linkId=SINGLE_LINK_OP_ID) const
Get the Frame Exchange Manager associated with the given link.
Definition: wifi-mac.cc:835
Ptr< QosTxop > GetBEQueue() const
Accessor for the AC_BE channel access function.
Definition: wifi-mac.cc:523
virtual void NotifyChannelSwitching(uint8_t linkId)
Notify that channel on the given link has been switched.
Definition: wifi-mac.cc:555
virtual void SetMacQueueScheduler(Ptr< WifiMacQueueScheduler > scheduler)
Set the wifi MAC queue scheduler.
Definition: wifi-mac.cc:542
Mac48Address GetBssid(uint8_t linkId) const
Definition: wifi-mac.cc:468
void(* PsduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
TracedCallback signature for PSDU response timeout events.
Definition: wifi-mac.h:896
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Definition: wifi-mac.h:794
bool m_shortSlotTimeSupported
flag whether short slot time is supported
Definition: wifi-mac.h:773
void ConfigurePhyDependentParameters(uint8_t linkId)
Configure PHY dependent parameters such as CWmin and CWmax on the given link.
Definition: wifi-mac.cc:770
Ptr< HeConfiguration > GetHeConfiguration() const
Definition: wifi-mac.cc:1250
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
Definition: wifi-mac.h:860
TracedCallback< WifiMacDropReason, Ptr< const WifiMpdu > > DroppedMpduTracedCallback
TracedCallback for MPDU drop events typedef.
Definition: wifi-mac.h:855
TypeOfStation GetTypeOfStation() const
Return the type of station.
Definition: wifi-mac.cc:417
bool m_qosSupported
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.
Definition: wifi-mac.h:771
Ptr< Txop > GetTxop() const
Accessor for the Txop object.
Definition: wifi-mac.cc:483
VhtCapabilities GetVhtCapabilities(uint8_t linkId) const
Return the VHT capabilities of the device for the given link.
Definition: wifi-mac.cc:1435
Callback< void > m_linkDown
Callback when a link is down.
Definition: wifi-mac.h:644
bool GetQosSupported() const
Return whether the device supports QoS.
Definition: wifi-mac.cc:1011
virtual void SetAddress(Mac48Address address)
Definition: wifi-mac.cc:435
Ptr< Txop > m_txop
TXOP used for transmission of frames to non-QoS peers.
Definition: wifi-mac.h:640
void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
Definition: wifi-mac.cc:974
Mac48Address m_address
MAC address of this station.
Definition: wifi-mac.h:781
Ptr< WifiMacQueueScheduler > GetMacQueueScheduler() const
Get the wifi MAC queue scheduler.
Definition: wifi-mac.cc:549
uint8_t GetNLinks() const
Get the number of links (can be greater than 1 for 11be devices only).
Definition: wifi-mac.cc:901
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Definition: wifi-mac.h:793
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
Definition: wifi-mac.h:638
Ptr< WifiMacQueueScheduler > m_scheduler
wifi MAC queue scheduler
Definition: wifi-mac.h:641
void DoInitialize() override
Initialize() implementation.
Definition: wifi-mac.cc:352
std::vector< std::unique_ptr< LinkEntity > > m_links
vector of Link objects
Definition: wifi-mac.h:779
TypeOfStation m_typeOfStation
the type of station
Definition: wifi-mac.h:776
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Definition: wifi-mac.h:800
virtual void ConfigureStandard(WifiStandard standard)
Definition: wifi-mac.cc:723
Ssid GetSsid() const
Definition: wifi-mac.cc:455
void SetWifiRemoteStationManagers(const std::vector< Ptr< WifiRemoteStationManager > > &stationManagers)
Definition: wifi-mac.cc:854
std::map< AcIndex, Ptr< QosTxop >, std::greater< AcIndex > > EdcaQueues
This type defines a mapping between an Access Category index, and a pointer to the corresponding chan...
Definition: wifi-mac.h:787
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
Definition: wifi-mac.cc:1307
bool GetErpSupported(uint8_t linkId) const
Return whether the device supports ERP on the given link.
Definition: wifi-mac.cc:1017
bool GetHtSupported() const
Return whether the device supports HT.
Definition: wifi-mac.cc:1262
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)=0
void ResetWifiPhys()
Remove currently attached WifiPhy objects from this MAC.
Definition: wifi-mac.cc:956
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
Definition: wifi-mac.h:811
void SetErpSupported(bool enable, uint8_t linkId)
Enable or disable ERP support for the given link.
Definition: wifi-mac.cc:1023
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Definition: wifi-mac.h:798
void(* MpduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
TracedCallback signature for MPDU response timeout events.
Definition: wifi-mac.h:875
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, std::list< bool > isDsss, AcIndex ac)
Definition: wifi-mac.cc:644
WifiMac(const WifiMac &)=delete
Ptr< WifiNetDevice > m_device
Pointer to the device.
Definition: wifi-mac.h:778
void SetSsid(Ssid ssid)
Definition: wifi-mac.cc:448
Ptr< QosTxop > GetVOQueue() const
Accessor for the AC_VO channel access function.
Definition: wifi-mac.cc:511
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Definition: wifi-mac.cc:410
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
Definition: wifi-mac.h:865
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
Definition: wifi-mac.cc:949
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Definition: wifi-mac.h:866
bool GetEhtSupported() const
Return whether the device supports EHT.
Definition: wifi-mac.cc:1281
bool GetHeSupported() const
Return whether the device supports HE.
Definition: wifi-mac.cc:1275
HtCapabilities GetHtCapabilities(uint8_t linkId) const
Return the HT capabilities of the device for the given link.
Definition: wifi-mac.cc:1378
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Definition: wifi-mac.cc:1317
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Definition: wifi-mac.cc:1287
virtual std::optional< uint8_t > GetLinkIdByAddress(const Mac48Address &address) const
Get the ID of the link having the given MAC address, if any.
Definition: wifi-mac.cc:907
void NotifyPromiscRx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:588
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > stationManager)
Definition: wifi-mac.cc:847
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
Definition: wifi-mac.cc:1347
Ptr< EhtConfiguration > GetEhtConfiguration() const
Definition: wifi-mac.cc:1256
TracedCallback< Ptr< const Packet > > m_macRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: wifi-mac.h:834
bool GetVhtSupported(uint8_t linkId) const
Return whether the device supports VHT on the given link.
Definition: wifi-mac.cc:1268
void SetDsssSupported(bool enable, uint8_t linkId)
Enable or disable DSSS support for the given link.
Definition: wifi-mac.cc:1034
TracedCallback< Ptr< const Packet > > m_macTxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Definition: wifi-mac.h:818
TracedCallback< Ptr< const WifiMpdu > > MpduTracedCallback
TracedCallback for acked/nacked MPDUs typedef.
Definition: wifi-mac.h:863
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Definition: wifi-mac.h:639
void NotifyTx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:570
static TypeId GetTypeId()
Get the type ID.
Definition: wifi-mac.cc:66
Ptr< HtConfiguration > GetHtConfiguration() const
Definition: wifi-mac.cc:1238
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
Definition: wifi-mac.cc:1582
Ssid m_ssid
Service Set ID (SSID)
Definition: wifi-mac.h:782
virtual void DeaggregateAmsduAndForward(Ptr< const WifiMpdu > mpdu)
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
Definition: wifi-mac.cc:1226
Ptr< QosTxop > GetVIQueue() const
Accessor for the AC_VI channel access function.
Definition: wifi-mac.cc:517
void SetBssid(Mac48Address bssid, uint8_t linkId)
Definition: wifi-mac.cc:461
Ptr< WifiNetDevice > GetDevice() const
Return the device this PHY is associated with.
Definition: wifi-mac.cc:429
Ptr< FrameExchangeManager > SetupFrameExchangeManager(WifiStandard standard)
Create a Frame Exchange Manager depending on the supported version of the standard.
Definition: wifi-mac.cc:788
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from)
Definition: wifi-mac.cc:1094
void NotifyRx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:582
TracedCallback< Ptr< const Packet > > m_macRxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Definition: wifi-mac.h:841
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
Definition: wifi-mac.h:887
void SetForwardUpCallback(ForwardUpCallback upCallback)
Definition: wifi-mac.cc:1073
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Definition: wifi-mac.h:931
ExtendedCapabilities GetExtendedCapabilities() const
Return the extended capabilities of the device.
Definition: wifi-mac.cc:1367
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: wifi-mac.h:826
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
Definition: wifi-mac.h:796
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition: wifi-mac.cc:1357
virtual bool SupportsSendFrom() const
Definition: wifi-mac.cc:1067
virtual Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const
Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed,...
Definition: wifi-mac.cc:535
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
Definition: wifi-mac.cc:1297
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Definition: wifi-mac.cc:1337
bool GetShortSlotTimeSupported() const
Definition: wifi-mac.cc:1061
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
Definition: wifi-mac.cc:600
void SetLinkDownCallback(Callback< void > linkDown)
Definition: wifi-mac.cc:1087
Ptr< QosTxop > GetBKQueue() const
Accessor for the AC_BK channel access function.
Definition: wifi-mac.cc:529
~WifiMac() override
Definition: wifi-mac.cc:60
void SetPromisc()
Sets the interface in promiscuous mode.
Definition: wifi-mac.cc:474
Ptr< VhtConfiguration > GetVhtConfiguration() const
Definition: wifi-mac.cc:1244
void NotifyRxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:594
virtual void SetLinkUpCallback(Callback< void > linkUp)
Definition: wifi-mac.cc:1080
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(uint8_t linkId=0) const
Definition: wifi-mac.cc:881
void SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-mac.cc:423
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition: wifi-mac.cc:1047
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
Definition: wifi-mac.h:791
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
Definition: wifi-mac.h:801
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Definition: wifi-mac.cc:1105
virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition: wifi-mac.cc:621
TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
TracedCallback for PSDU response timeout events typedef.
Definition: wifi-mac.h:902
TracedCallback< uint8_t, Ptr< const WifiMpdu >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
TracedCallback for MPDU response timeout events typedef.
Definition: wifi-mac.h:881
virtual void Receive(Ptr< const WifiMpdu > mpdu, uint8_t linkId)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
Definition: wifi-mac.cc:1112
Mac48Address GetAddress() const
Definition: wifi-mac.cc:442
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
Definition: wifi-mac.h:844
void(* DroppedMpduCallback)(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
TracedCallback signature for MPDU drop events.
Definition: wifi-mac.h:852
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
Definition: wifi-mac.h:803
EhtCapabilities GetEhtCapabilities(uint8_t linkId) const
Return the EHT capabilities of the device for the given link.
Definition: wifi-mac.cc:1572
TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
TracedCallback for PSDU map response timeout events typedef.
Definition: wifi-mac.h:925
Callback< void > m_linkUp
Callback when a link is up.
Definition: wifi-mac.h:643
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
Definition: wifi-mac.h:843
LinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition: wifi-mac.cc:893
HeCapabilities GetHeCapabilities(uint8_t linkId) const
Return the HE capabilities of the device for the given link.
Definition: wifi-mac.cc:1516
WifiMac & operator=(const WifiMac &)=delete
virtual bool CanForwardPacketsTo(Mac48Address to) const =0
Return true if packets can be forwarded to the given destination, false otherwise.
virtual void SetWifiPhys(const std::vector< Ptr< WifiPhy > > &phys)
Definition: wifi-mac.cc:920
Callback< void, Ptr< const Packet >, Mac48Address, Mac48Address > ForwardUpCallback
This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a pa...
Definition: wifi-mac.h:327
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
Definition: wifi-mac.h:908
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
Definition: wifi-mac.cc:489
void(* PsduMapResponseTimeoutCallback)(uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
TracedCallback signature for PSDU map response timeout events.
Definition: wifi-mac.h:918
void NotifyTxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:576
void DoDispose() override
Destructor implementation.
Definition: wifi-mac.cc:368
bool GetDsssSupported(uint8_t linkId) const
Return whether the device supports DSSS on the given link.
Definition: wifi-mac.cc:1041
Ptr< ChannelAccessManager > GetChannelAccessManager(uint8_t linkId=SINGLE_LINK_OP_ID) const
Get the Channel Access Manager associated with the given link.
Definition: wifi-mac.cc:841
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Definition: wifi-mac.cc:1327
virtual std::unique_ptr< LinkEntity > CreateLinkEntity() const
Create a LinkEntity object.
Definition: wifi-mac.cc:887
void SetShortSlotTimeSupported(bool enable)
Enable or disable short slot time feature.
Definition: wifi-mac.cc:1054
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Definition: wifi-mac.h:774
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
Definition: wifi-mac.h:795
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
Definition: wifi-mac.h:799
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiMacDropReason
The reason why an MPDU was dropped.
Definition: wifi-mac.h:73
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:74
address
Definition: first.py:40
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TypeOfStation
Enumeration for type of station.
Definition: wifi-mac.h:59
@ ADHOC_STA
Definition: wifi-mac.h:62
@ MESH
Definition: wifi-mac.h:63
@ STA
Definition: wifi-mac.h:60
@ AP
Definition: wifi-mac.h:61
@ OCB
Definition: wifi-mac.h:64
static constexpr uint8_t SINGLE_LINK_OP_ID
Link ID for single link operations (helps tracking places where correct link ID is to be used to supp...
Definition: wifi-utils.h:140
std::unordered_map< uint16_t, Ptr< WifiPsdu > > WifiPsduMap
Map of PSDUs indexed by STA-ID.
@ WIFI_MAC_DROP_QOS_OLD_PACKET
Definition: wifi-mac.h:77
@ WIFI_MAC_DROP_FAILED_ENQUEUE
Definition: wifi-mac.h:74
@ WIFI_MAC_DROP_EXPIRED_LIFETIME
Definition: wifi-mac.h:75
@ WIFI_MAC_DROP_REACHED_RETRY_LIMIT
Definition: wifi-mac.h:76
ssid
Definition: third.py:86
ns3::Time timeout