25 #include <unordered_map>
40 class WifiMacQueueItem;
41 class HtConfiguration;
42 class VhtConfiguration;
43 class HeConfiguration;
44 class FrameExchangeManager;
45 class ChannelAccessManager;
46 class ExtendedCapabilities;
73 typedef std::unordered_map <uint16_t , Ptr<WifiPsdu> >
WifiPsduMap;
803 const std::set<Mac48Address>* missingStations,
804 std::size_t nTotalStations);
The Extended Capabilities Information Element.
The IEEE 802.11ax HE Capabilities.
The HT Capabilities Information Element.
A base class which provides memory management and object aggregation.
The IEEE 802.11 SSID Information Element.
Forward calls to a chain of Callback.
a unique identifier for an interface.
The IEEE 802.11ac VHT Capabilities.
base class for all MAC-level wifi objects.
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
Ptr< HtConfiguration > GetHtConfiguration(void) const
TracedCallback< Ptr< const WifiMacQueueItem > > MpduTracedCallback
TracedCallback for acked/nacked MPDUs typedef.
void(* MpduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiMacQueueItem > mpdu, const WifiTxVector &txVector)
TracedCallback signature for MPDU response timeout events.
std::map< AcIndex, Ptr< QosTxop > > EdcaQueues
This type defines a mapping between an Access Category index, and a pointer to the corresponding chan...
void(* PsduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
TracedCallback signature for PSDU response timeout events.
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
bool m_shortSlotTimeSupported
flag whether short slot time is supported
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
Ptr< FrameExchangeManager > GetFrameExchangeManager(void) const
Get the Frame Exchange Manager.
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
bool GetShortSlotTimeSupported(void) const
bool m_qosSupported
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.
Ptr< HeConfiguration > GetHeConfiguration(void) const
bool m_dsssSupported
This Boolean is set true iff this WifiMac is to model 802.11b.
bool m_erpSupported
This Boolean is set true iff this WifiMac is to model 802.11g.
Ptr< QosTxop > GetBKQueue(void) const
Accessor for the AC_BK channel access function.
Callback< void > m_linkDown
Callback when a link is down.
bool GetVhtSupported() const
Return whether the device supports VHT.
bool GetQosSupported() const
Return whether the device supports QoS.
virtual void SetAddress(Mac48Address address)
Ptr< Txop > m_txop
TXOP used for transmission of frames to non-QoS peers.
void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
Mac48Address m_address
MAC address of this station.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
void DoInitialize() override
Initialize() implementation.
void ResetWifiPhy(void)
Remove currently attached WifiPhy device from this MAC.
TypeOfStation m_typeOfStation
the type of station
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
virtual void ConfigureStandard(WifiStandard standard)
void SetupFrameExchangeManager(WifiStandard standard)
Create a Frame Exchange Manager depending on the supported version of the standard.
Mac48Address GetAddress(void) const
void SetDsssSupported(bool enable)
Enable or disable DSSS support for the device.
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
TracedCallback< uint8_t, Ptr< const WifiMacQueueItem >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
TracedCallback for MPDU response timeout events typedef.
void SetPromisc(void)
Sets the interface in promiscuous mode.
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
bool GetHtSupported() const
Return whether the device supports HT.
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)=0
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
void ConfigurePhyDependentParameters(void)
Configure PHY dependent parameters such as CWmin and CWmax.
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Ptr< WifiNetDevice > m_device
Pointer to the device.
WifiMac & operator=(const WifiMac &mac)
assignment operator
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(void) const
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
Mac48Address GetBssid(void) const
bool GetHeSupported() const
Return whether the device supports HE.
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Ptr< QosTxop > GetVIQueue(void) const
Accessor for the AC_VI channel access function.
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
void NotifyPromiscRx(Ptr< const Packet > packet)
virtual void NotifyChannelSwitching(void)
Notify that channel has been switched.
static TypeId GetTypeId(void)
Get the type ID.
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > stationManager)
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
TracedCallback< Ptr< const Packet > > m_macRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
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 ...
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
void NotifyTx(Ptr< const Packet > packet)
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
Ssid m_ssid
Service Set ID (SSID)
TypeOfStation GetTypeOfStation(void) const
Return the type of station.
Ptr< WifiPhy > GetWifiPhy(void) const
Mac48Address m_bssid
the BSSID
virtual void SetWifiPhy(Ptr< WifiPhy > phy)
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from)
void NotifyRx(Ptr< const Packet > packet)
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 ...
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
void SetForwardUpCallback(ForwardUpCallback upCallback)
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
virtual void DeaggregateAmsduAndForward(Ptr< WifiMacQueueItem > mpdu)
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
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,...
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
Ptr< FrameExchangeManager > m_feManager
Frame Exchange Manager.
void SetLinkDownCallback(Callback< void > linkDown)
void NotifyRxDrop(Ptr< const Packet > packet)
virtual void SetLinkUpCallback(Callback< void > linkUp)
void SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
void(* DroppedMpduCallback)(WifiMacDropReason reason, Ptr< const WifiMacQueueItem > mpdu)
TracedCallback signature for MPDU drop events.
Ptr< WifiNetDevice > GetDevice(void) const
Return the device this PHY is associated with.
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
TracedCallback for PSDU response timeout events typedef.
WifiMac(const WifiMac &)
type conversion operator
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
bool GetErpSupported() const
Return whether the device supports ERP.
TracedCallback< WifiMacDropReason, Ptr< const WifiMacQueueItem > > DroppedMpduTracedCallback
TracedCallback for MPDU drop events typedef.
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
TracedCallback for PSDU map response timeout events typedef.
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
Callback< void > m_linkUp
Callback when a link is up.
bool GetDsssSupported() const
Return whether the device supports DSSS.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
virtual bool CanForwardPacketsTo(Mac48Address to) const =0
Return true if packets can be forwarded to the given destination, false otherwise.
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...
virtual bool SupportsSendFrom(void) const
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
void(* PsduMapResponseTimeoutCallback)(uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
TracedCallback signature for PSDU map response timeout events.
void NotifyTxDrop(Ptr< const Packet > packet)
void DoDispose() override
Destructor implementation.
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Ptr< WifiPhy > m_phy
Wifi PHY.
void SetShortSlotTimeSupported(bool enable)
Enable or disable short slot time feature.
void SetBssid(Mac48Address bssid)
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Ptr< Txop > GetTxop(void) const
Accessor for the Txop object.
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
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.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TypeOfStation
Enumeration for type of station.
std::unordered_map< uint16_t, Ptr< WifiPsdu > > WifiPsduMap
Map of PSDUs indexed by STA-ID.
@ WIFI_MAC_DROP_QOS_OLD_PACKET
@ WIFI_MAC_DROP_FAILED_ENQUEUE
@ WIFI_MAC_DROP_EXPIRED_LIFETIME
@ WIFI_MAC_DROP_REACHED_RETRY_LIMIT