A Discrete-Event Network Simulator
API
ns3::WifiMac Class Referenceabstract

base class for all MAC-level wifi objects. More...

#include "wifi-mac.h"

+ Inheritance diagram for ns3::WifiMac:
+ Collaboration diagram for ns3::WifiMac:

Public Types

typedef Callback< void, Ptr< const Packet >, Mac48Address, Mac48AddressForwardUpCallback
 This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack. More...
 

Public Member Functions

 WifiMac ()
 
virtual ~WifiMac ()
 
virtual bool CanForwardPacketsTo (Mac48Address to) const =0
 Return true if packets can be forwarded to the given destination, false otherwise. More...
 
virtual void ConfigureStandard (WifiStandard standard)
 
virtual void Enqueue (Ptr< Packet > packet, Mac48Address to)=0
 
virtual void Enqueue (Ptr< Packet > packet, Mac48Address to, Mac48Address from)
 
Mac48Address GetAddress (void) const
 
Mac48Address GetBssid (void) const
 
Ptr< WifiNetDeviceGetDevice (void) const
 Return the device this PHY is associated with. More...
 
bool GetDsssSupported () const
 Return whether the device supports DSSS. More...
 
bool GetErpSupported () const
 Return whether the device supports ERP. More...
 
ExtendedCapabilities GetExtendedCapabilities (void) const
 Return the extended capabilities of the device. More...
 
Ptr< FrameExchangeManagerGetFrameExchangeManager (void) const
 Get the Frame Exchange Manager. More...
 
HeCapabilities GetHeCapabilities (void) const
 Return the HE capabilities of the device. More...
 
Ptr< HeConfigurationGetHeConfiguration (void) const
 
bool GetHeSupported () const
 Return whether the device supports HE. More...
 
HtCapabilities GetHtCapabilities (void) const
 Return the HT capabilities of the device. More...
 
Ptr< HtConfigurationGetHtConfiguration (void) const
 
bool GetHtSupported () const
 Return whether the device supports HT. More...
 
uint32_t GetMaxAmpduSize (AcIndex ac) const
 Return the maximum A-MPDU size of the given Access Category. More...
 
uint16_t GetMaxAmsduSize (AcIndex ac) const
 Return the maximum A-MSDU size of the given Access Category. More...
 
bool GetQosSupported () const
 Return whether the device supports QoS. More...
 
Ptr< QosTxopGetQosTxop (AcIndex ac) const
 Accessor for a specified EDCA object. More...
 
Ptr< QosTxopGetQosTxop (uint8_t tid) const
 Accessor for a specified EDCA object. More...
 
Ssid GetSsid (void) const
 
Ptr< TxopGetTxop (void) const
 Accessor for the Txop object. More...
 
virtual Ptr< WifiMacQueueGetTxopQueue (AcIndex ac) const
 Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed, or a null pointer, otherwise. More...
 
TypeOfStation GetTypeOfStation (void) const
 Return the type of station. More...
 
VhtCapabilities GetVhtCapabilities (void) const
 Return the VHT capabilities of the device. More...
 
Ptr< VhtConfigurationGetVhtConfiguration (void) const
 
bool GetVhtSupported () const
 Return whether the device supports VHT. More...
 
Ptr< WifiPhyGetWifiPhy (void) const
 
Ptr< WifiRemoteStationManagerGetWifiRemoteStationManager (void) const
 
virtual void NotifyChannelSwitching (void)
 Notify that channel has been switched. More...
 
void NotifyPromiscRx (Ptr< const Packet > packet)
 
void NotifyRx (Ptr< const Packet > packet)
 
void NotifyRxDrop (Ptr< const Packet > packet)
 
void NotifyTx (Ptr< const Packet > packet)
 
void NotifyTxDrop (Ptr< const Packet > packet)
 
void ResetWifiPhy (void)
 Remove currently attached WifiPhy device from this MAC. More...
 
virtual void SetAddress (Mac48Address address)
 
void SetBssid (Mac48Address bssid)
 
void SetCtsToSelfSupported (bool enable)
 Enable or disable CTS-to-self feature. More...
 
void SetDevice (const Ptr< WifiNetDevice > device)
 Sets the device this PHY is associated with. More...
 
void SetForwardUpCallback (ForwardUpCallback upCallback)
 
void SetLinkDownCallback (Callback< void > linkDown)
 
virtual void SetLinkUpCallback (Callback< void > linkUp)
 
void SetPromisc (void)
 Sets the interface in promiscuous mode. More...
 
void SetSsid (Ssid ssid)
 
void SetTypeOfStation (TypeOfStation type)
 This method is invoked by a subclass to specify what type of station it is implementing. More...
 
virtual void SetWifiPhy (Ptr< WifiPhy > phy)
 
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager)
 
virtual bool SupportsSendFrom (void) const
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

virtual void ConfigureContentionWindow (uint32_t cwMin, uint32_t cwMax)
 
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. More...
 
void DoDispose () override
 Destructor implementation. More...
 
void DoInitialize () override
 Initialize() implementation. More...
 
void ForwardUp (Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
 Forward the packet up to the device. More...
 
Ptr< QosTxopGetBEQueue (void) const
 Accessor for the AC_BE channel access function. More...
 
Ptr< QosTxopGetBKQueue (void) const
 Accessor for the AC_BK channel access function. More...
 
bool GetShortSlotTimeSupported (void) const
 
Ptr< QosTxopGetVIQueue (void) const
 Accessor for the AC_VI channel access function. More...
 
Ptr< QosTxopGetVOQueue (void) const
 Accessor for the AC_VO channel access function. More...
 
virtual void Receive (Ptr< WifiMacQueueItem > mpdu)
 This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received. More...
 
void SetQosSupported (bool enable)
 Enable or disable QoS support for the device. More...
 
void SetShortSlotTimeSupported (bool enable)
 Enable or disable short slot time feature. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Protected Attributes

Ptr< ChannelAccessManagerm_channelAccessManager
 channel access manager More...
 
Ptr< FrameExchangeManagerm_feManager
 Frame Exchange Manager. More...
 
Callback< void > m_linkDown
 Callback when a link is down. More...
 
Callback< void > m_linkUp
 Callback when a link is up. More...
 
Ptr< MacRxMiddlem_rxMiddle
 RX middle (defragmentation etc.) More...
 
Ptr< MacTxMiddlem_txMiddle
 TX middle (aggregation etc.) More...
 
Ptr< Txopm_txop
 TXOP used for transmission of frames to non-QoS peers. More...
 

Private Types

typedef void(* DroppedMpduCallback) (WifiMacDropReason reason, Ptr< const WifiMacQueueItem > mpdu)
 TracedCallback signature for MPDU drop events. More...
 
typedef TracedCallback< WifiMacDropReason, Ptr< const WifiMacQueueItem > > DroppedMpduTracedCallback
 TracedCallback for MPDU drop events typedef. More...
 
typedef std::map< AcIndex, Ptr< QosTxop > > EdcaQueues
 This type defines a mapping between an Access Category index, and a pointer to the corresponding channel access function. More...
 
typedef void(* MpduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiMacQueueItem > mpdu, const WifiTxVector &txVector)
 TracedCallback signature for MPDU response timeout events. More...
 
typedef TracedCallback< uint8_t, Ptr< const WifiMacQueueItem >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
 TracedCallback for MPDU response timeout events typedef. More...
 
typedef TracedCallback< Ptr< const WifiMacQueueItem > > MpduTracedCallback
 TracedCallback for acked/nacked MPDUs typedef. More...
 
typedef void(* PsduMapResponseTimeoutCallback) (uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
 TracedCallback signature for PSDU map response timeout events. More...
 
typedef TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
 TracedCallback for PSDU map response timeout events typedef. More...
 
typedef void(* PsduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 TracedCallback signature for PSDU response timeout events. More...
 
typedef TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
 TracedCallback for PSDU response timeout events typedef. More...
 

Private Member Functions

 WifiMac (const WifiMac &)
 type conversion operator More...
 
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. More...
 
WifiMacoperator= (const WifiMac &mac)
 assignment operator More...
 
void SetBeBlockAckInactivityTimeout (uint16_t timeout)
 Set BE block ack inactivity timeout. More...
 
void SetBeBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_BE. More...
 
void SetBkBlockAckInactivityTimeout (uint16_t timeout)
 Set BK block ack inactivity timeout. More...
 
void SetBkBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_BK. More...
 
void SetDsssSupported (bool enable)
 Enable or disable DSSS support for the device. More...
 
void SetErpSupported (bool enable)
 Enable or disable ERP support for the device. More...
 
void SetupEdcaQueue (AcIndex ac)
 This method is a private utility invoked to configure the channel access function for the specified Access Category. More...
 
void SetupFrameExchangeManager (WifiStandard standard)
 Create a Frame Exchange Manager depending on the supported version of the standard. More...
 
void SetViBlockAckInactivityTimeout (uint16_t timeout)
 Set VI block ack inactivity timeout. More...
 
void SetViBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_VI. More...
 
void SetVoBlockAckInactivityTimeout (uint16_t timeout)
 Set VO block ack inactivity timeout. More...
 
void SetVoBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_VO. More...
 

Private Attributes

MpduTracedCallback m_ackedMpduCallback
 ack'ed MPDU callback More...
 
Mac48Address m_address
 MAC address of this station. More...
 
uint32_t m_beMaxAmpduSize
 maximum A-MPDU size for AC_BE (in bytes) More...
 
uint16_t m_beMaxAmsduSize
 maximum A-MSDU size for AC_BE (in bytes) More...
 
uint32_t m_bkMaxAmpduSize
 maximum A-MPDU size for AC_BK (in bytes) More...
 
uint16_t m_bkMaxAmsduSize
 maximum A-MSDU size for AC_BK (in bytes) More...
 
Mac48Address m_bssid
 the BSSID More...
 
bool m_ctsToSelfSupported
 flag indicating whether CTS-To-Self is supported More...
 
Ptr< WifiNetDevicem_device
 Pointer to the device. More...
 
DroppedMpduTracedCallback m_droppedMpduCallback
 This trace indicates that an MPDU was dropped for the given reason. More...
 
bool m_dsssSupported
 This Boolean is set true iff this WifiMac is to model 802.11b. More...
 
EdcaQueues m_edca
 This is a map from Access Category index to the corresponding channel access function. More...
 
bool m_erpSupported
 This Boolean is set true iff this WifiMac is to model 802.11g. More...
 
ForwardUpCallback m_forwardUp
 Callback to forward packet up the stack. More...
 
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
 The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition). More...
 
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 during reception. More...
 
TracedCallback< Ptr< const Packet > > m_macRxTrace
 The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition). More...
 
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 before being queued for transmission. More...
 
TracedCallback< Ptr< const Packet > > m_macTxTrace
 The trace source fired when packets come into the "top" of the device at the L3/L2 transition, before being queued for transmission. More...
 
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
 MPDU response timeout traced callback. More...
 
MpduTracedCallback m_nackedMpduCallback
 nack'ed MPDU callback More...
 
Ptr< WifiPhym_phy
 Wifi PHY. More...
 
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
 PSDU map response timeout traced callback. More...
 
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
 PSDU response timeout traced callback. More...
 
bool m_qosSupported
 This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service. More...
 
bool m_shortSlotTimeSupported
 flag whether short slot time is supported More...
 
Ssid m_ssid
 Service Set ID (SSID) More...
 
Ptr< WifiRemoteStationManagerm_stationManager
 Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.) More...
 
TracedCallback< const WifiMacHeader & > m_txErrCallback
 transmit error callback More...
 
TracedCallback< const WifiMacHeader & > m_txOkCallback
 transmit OK callback More...
 
TypeOfStation m_typeOfStation
 the type of station More...
 
uint32_t m_viMaxAmpduSize
 maximum A-MPDU size for AC_VI (in bytes) More...
 
uint16_t m_viMaxAmsduSize
 maximum A-MSDU size for AC_VI (in bytes) More...
 
uint32_t m_voMaxAmpduSize
 maximum A-MPDU size for AC_VO (in bytes) More...
 
uint16_t m_voMaxAmsduSize
 maximum A-MSDU size for AC_VO (in bytes) More...
 

Additional Inherited Members

Detailed Description

base class for all MAC-level wifi objects.

This class encapsulates all the low-level MAC functionality DCA, EDCA, etc) and all the high-level MAC functionality (association/disassociation state machines).

Config Paths

ns3::WifiMac is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac"

Attributes

  • Ssid: The ssid we want to belong to.
    • Set with class: SsidValue
    • Underlying type: Ssid
    • Initial value: default
    • Flags: construct write read
  • QosSupported: This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct read
  • CtsToSelfSupported: Use CTS to Self when using a rate that is not in the basic rate set.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write
  • ShortSlotTimeSupported: Whether or not short slot time is supported (only used by ERP APs or STAs).
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • Txop: The Txop object.
  • VO_Txop: Queue that manages packets belonging to AC_VO access class.
  • VI_Txop: Queue that manages packets belonging to AC_VI access class.
  • BE_Txop: Queue that manages packets belonging to AC_BE access class.
  • BK_Txop: Queue that manages packets belonging to AC_BK access class.
  • VO_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_VO access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • VI_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_VI access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • BE_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_BE access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • BK_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_BK access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • VO_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_VO access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:6500631
    • Initial value: 0
    • Flags: construct write read
  • VI_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_VI access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:6500631
    • Initial value: 65535
    • Flags: construct write read
  • BE_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_BE access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:6500631
    • Initial value: 65535
    • Flags: construct write read
  • BK_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_BK access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, and 6500631 for HE PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:6500631
    • Initial value: 0
    • Flags: construct write read
  • VO_BlockAckThreshold: If number of packets in VO queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • VI_BlockAckThreshold: If number of packets in VI queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • BE_BlockAckThreshold: If number of packets in BE queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • BK_BlockAckThreshold: If number of packets in BK queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • VO_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_VO. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write
  • VI_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_VI. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write
  • BE_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_BE. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write
  • BK_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_BK. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write

TraceSources

  • MacTx: A packet has been received from higher layers and is being processed in preparation for queueing for transmission.
    Callback signature: ns3::Packet::TracedCallback
  • MacTxDrop: A packet has been dropped in the MAC layer before being queued for transmission. This trace source is fired, e.g., when an AP's MAC receives from the upper layer a packet destined to a station that is not associated with the AP or a STA's MAC receives a packet from the upper layer while it is not associated with any AP.
    Callback signature: ns3::Packet::TracedCallback
  • MacPromiscRx: A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace.
    Callback signature: ns3::Packet::TracedCallback
  • MacRx: A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace.
    Callback signature: ns3::Packet::TracedCallback
  • MacRxDrop: A packet has been dropped in the MAC layer after it has been passed up from the physical layer.
    Callback signature: ns3::Packet::TracedCallback
  • TxOkHeader: The header of successfully transmitted packet.
    Callback signature: ns3::WifiMacHeader::TracedCallback
  • TxErrHeader: The header of unsuccessfully transmitted packet.
    Callback signature: ns3::WifiMacHeader::TracedCallback
  • AckedMpdu: An MPDU that was successfully acknowledged, via either a Normal Ack or a Block Ack.
    Callback signature: ns3::WifiMacQueueItem::TracedCallback
  • NAckedMpdu: An MPDU that was negatively acknowledged via a Block Ack.
    Callback signature: ns3::WifiMacQueueItem::TracedCallback
  • DroppedMpdu: An MPDU that was dropped for the given reason (see WifiMacDropReason).
    Callback signature: ns3::WifiMac::DroppedMpduCallback
  • MpduResponseTimeout: An MPDU whose response was not received before the timeout, along with an identifier of the type of timeout (see WifiTxTimer::Reason) and the TXVECTOR used to transmit the MPDU. This trace source is fired when a CTS is missing after an RTS or a Normal Ack is missing after an MPDU or after a DL MU PPDU acknowledged in SU format.
    Callback signature: ns3::WifiMac::MpduResponseTimeoutCallback
  • PsduResponseTimeout: A PSDU whose response was not received before the timeout, along with an identifier of the type of timeout (see WifiTxTimer::Reason) and the TXVECTOR used to transmit the PSDU. This trace source is fired when a BlockAck is missing after an A-MPDU, a BlockAckReq (possibly in the context of the acknowledgment of a DL MU PPDU in SU format) or a TB PPDU (in the latter case the missing BlockAck is a Multi-STA BlockAck).
    Callback signature: ns3::WifiMac::PsduResponseTimeoutCallback
  • PsduMapResponseTimeout: A PSDU map for which not all the responses were received before the timeout, along with an identifier of the type of timeout (see WifiTxTimer::Reason), the set of MAC addresses of the stations that did not respond and the total number of stations that had to respond. This trace source is fired when not all the addressed stations responded to an MU-BAR Trigger frame (either sent as a SU frame or aggregated to PSDUs in the DL MU PPDU), a Basic Trigger Frame or a BSRP Trigger Frame.
    Callback signature: ns3::WifiMac::PsduMapResponseTimeoutCallback

Size of this type is 584 bytes (on a 64-bit architecture).

Definition at line 84 of file wifi-mac.h.

Member Typedef Documentation

◆ DroppedMpduCallback

typedef void(* ns3::WifiMac::DroppedMpduCallback) (WifiMacDropReason reason, Ptr< const WifiMacQueueItem > mpdu)
private

TracedCallback signature for MPDU drop events.

Parameters
reasonthe reason why the MPDU was dropped (
See also
WifiMacDropReason)
Parameters
mpduthe dropped MPDU

Definition at line 740 of file wifi-mac.h.

◆ DroppedMpduTracedCallback

TracedCallback for MPDU drop events typedef.

Definition at line 743 of file wifi-mac.h.

◆ EdcaQueues

typedef std::map<AcIndex, Ptr<QosTxop> > ns3::WifiMac::EdcaQueues
private

This type defines a mapping between an Access Category index, and a pointer to the corresponding channel access function.

Definition at line 675 of file wifi-mac.h.

◆ ForwardUpCallback

This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack.

Parameters
packetthe packet that has been received.
fromthe MAC address of the device that sent the packet.
tothe MAC address of the device that the packet is destined for.

Definition at line 270 of file wifi-mac.h.

◆ MpduResponseTimeoutCallback

typedef void(* ns3::WifiMac::MpduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiMacQueueItem > mpdu, const WifiTxVector &txVector)
private

TracedCallback signature for MPDU response timeout events.

Parameters
reasonthe reason why the timer was started
mpduthe MPDU whose response was not received before the timeout
txVectorthe TXVECTOR used to transmit the MPDU

Definition at line 763 of file wifi-mac.h.

◆ MpduResponseTimeoutTracedCallback

TracedCallback for MPDU response timeout events typedef.

Definition at line 767 of file wifi-mac.h.

◆ MpduTracedCallback

TracedCallback for acked/nacked MPDUs typedef.

Definition at line 751 of file wifi-mac.h.

◆ PsduMapResponseTimeoutCallback

typedef void(* ns3::WifiMac::PsduMapResponseTimeoutCallback) (uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
private

TracedCallback signature for PSDU map response timeout events.

Parameters
reasonthe reason why the timer was started
psduMapthe PSDU map for which not all responses were received before the timeout
missingStationsthe MAC addresses of the stations that did not respond
nTotalStationsthe total number of stations that had to respond

Definition at line 802 of file wifi-mac.h.

◆ PsduMapResponseTimeoutTracedCallback

typedef TracedCallback<uint8_t, WifiPsduMap*, const std::set<Mac48Address>*, std::size_t> ns3::WifiMac::PsduMapResponseTimeoutTracedCallback
private

TracedCallback for PSDU map response timeout events typedef.

Definition at line 807 of file wifi-mac.h.

◆ PsduResponseTimeoutCallback

typedef void(* ns3::WifiMac::PsduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
private

TracedCallback signature for PSDU response timeout events.

Parameters
reasonthe reason why the timer was started
psduthe PSDU whose response was not received before the timeout
txVectorthe TXVECTOR used to transmit the PSDU

Definition at line 782 of file wifi-mac.h.

◆ PsduResponseTimeoutTracedCallback

TracedCallback for PSDU response timeout events typedef.

Definition at line 786 of file wifi-mac.h.

Constructor & Destructor Documentation

◆ WifiMac() [1/2]

ns3::WifiMac::WifiMac ( )

Definition at line 45 of file wifi-mac.cc.

References m_channelAccessManager, m_rxMiddle, m_txMiddle, ns3::MakeCallback(), NS_LOG_FUNCTION, and Receive().

+ Here is the call graph for this function:

◆ ~WifiMac()

ns3::WifiMac::~WifiMac ( )
virtual

Definition at line 60 of file wifi-mac.cc.

References NS_LOG_FUNCTION.

◆ WifiMac() [2/2]

ns3::WifiMac::WifiMac ( const WifiMac )
private

type conversion operator

Member Function Documentation

◆ CanForwardPacketsTo()

virtual bool ns3::WifiMac::CanForwardPacketsTo ( Mac48Address  to) const
pure virtual

Return true if packets can be forwarded to the given destination, false otherwise.

Parameters
tothe address to which the packet should be sent
Returns
whether packets can be forwarded to the given destination

Implemented in ns3::StaWifiMac, ns3::ApWifiMac, ns3::AdhocWifiMac, ns3::OcbWifiMac, and ns3::MeshWifiInterfaceMac.

◆ ConfigureContentionWindow()

void ns3::WifiMac::ConfigureContentionWindow ( uint32_t  cwMin,
uint32_t  cwMax 
)
protectedvirtual
Parameters
cwMinthe minimum contention window size
cwMaxthe maximum contention window size

This method is called to set the minimum and the maximum contention window size.

Reimplemented in ns3::MeshWifiInterfaceMac.

Definition at line 572 of file wifi-mac.cc.

References ns3::AC_BE_NQOS, ConfigureDcf(), GetDsssSupported(), GetErpSupported(), m_edca, and m_txop.

Referenced by ns3::MeshWifiInterfaceMac::ConfigureContentionWindow(), ConfigurePhyDependentParameters(), ns3::StaWifiMac::UpdateApInfoFromAssocResp(), and ns3::StaWifiMac::UpdateApInfoFromProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConfigureDcf()

void ns3::WifiMac::ConfigureDcf ( Ptr< Txop dcf,
uint32_t  cwmin,
uint32_t  cwmax,
bool  isDsss,
AcIndex  ac 
)
private
Parameters
dcfthe DCF to be configured
cwminthe minimum contention window for the DCF
cwmaxthe maximum contention window for the DCF
isDsssflag to indicate whether PHY is DSSS or HR/DSSS
acthe access category for the DCF

Configure the DCF with appropriate values depending on the given access category.

Definition at line 590 of file wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BE_NQOS, ns3::AC_BEACON, ns3::AC_BK, ns3::AC_UNDEF, ns3::AC_VI, ns3::AC_VO, ns3::MicroSeconds(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Txop::SetAifsn(), ns3::Txop::SetMaxCw(), ns3::Txop::SetMinCw(), and ns3::Txop::SetTxopLimit().

Referenced by ConfigureContentionWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConfigurePhyDependentParameters()

void ns3::WifiMac::ConfigurePhyDependentParameters ( void  )
private

Configure PHY dependent parameters such as CWmin and CWmax.

Definition at line 660 of file wifi-mac.cc.

References ConfigureContentionWindow(), ns3::WifiPhy::GetPhyBand(), ns3::WifiPhy::GetStandard(), m_phy, NS_ASSERT, NS_LOG_FUNCTION, SetDsssSupported(), SetErpSupported(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_STANDARD_80211b, and ns3::WIFI_STANDARD_80211g.

Referenced by NotifyChannelSwitching(), and SetWifiPhy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConfigureStandard()

void ns3::WifiMac::ConfigureStandard ( WifiStandard  standard)
virtual
Parameters
standardthe wifi standard to be configured

This method completes the configuration process for a requested PHY standard. Subclasses should implement this method to configure their DCF queues according to the requested standard.

Reimplemented in ns3::OcbWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 650 of file wifi-mac.cc.

References m_qosSupported, NS_ABORT_IF, NS_LOG_FUNCTION, SetupFrameExchangeManager(), and ns3::WIFI_STANDARD_80211n.

Referenced by ns3::MeshWifiInterfaceMac::ConfigureStandard(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), and HeAggregationTest::DoRunSubTest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeaggregateAmsduAndForward()

void ns3::WifiMac::DeaggregateAmsduAndForward ( Ptr< WifiMacQueueItem mpdu)
protectedvirtual

This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.

Parameters
mpduthe MPDU containing the A-MSDU.

Reimplemented in ns3::ApWifiMac.

Definition at line 1036 of file wifi-mac.cc.

References ForwardUp(), NS_LOG_FUNCTION, and ns3::PeekPointer().

Referenced by ns3::OcbWifiMac::Receive(), ns3::AdhocWifiMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::WifiMac::DoDispose ( void  )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 336 of file wifi-mac.cc.

References ns3::Object::Dispose(), m_channelAccessManager, m_device, m_edca, m_feManager, m_phy, m_rxMiddle, m_stationManager, m_txMiddle, m_txop, and NS_LOG_FUNCTION.

Referenced by ns3::MeshWifiInterfaceMac::DoDispose(), ns3::OcbWifiMac::DoDispose(), and ns3::ApWifiMac::DoDispose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoInitialize()

void ns3::WifiMac::DoInitialize ( void  )
overrideprotectedvirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 320 of file wifi-mac.cc.

References ns3::Object::Initialize(), m_edca, m_txop, and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::DoInitialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Enqueue() [1/2]

virtual void ns3::WifiMac::Enqueue ( Ptr< Packet packet,
Mac48Address  to 
)
pure virtual
Parameters
packetthe packet to send.
tothe address to which the packet should be sent.

The packet should be enqueued in a TX queue, and should be dequeued as soon as the DCF function determines that access it granted to this MAC.

Implemented in ns3::StaWifiMac, ns3::ApWifiMac, ns3::AdhocWifiMac, ns3::OcbWifiMac, and ns3::MeshWifiInterfaceMac.

◆ Enqueue() [2/2]

void ns3::WifiMac::Enqueue ( Ptr< Packet packet,
Mac48Address  to,
Mac48Address  from 
)
virtual
Parameters
packetthe packet to send.
tothe address to which the packet should be sent.
fromthe address from which the packet should be sent.

The packet should be enqueued in a TX queue, and should be dequeued as soon as the DCF function determines that access it granted to this MAC. The extra parameter "from" allows this device to operate in a bridged mode, forwarding received frames without altering the source address.

Reimplemented in ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 905 of file wifi-mac.cc.

References GetAddress(), and NS_FATAL_ERROR.

+ Here is the call graph for this function:

◆ ForwardUp()

void ns3::WifiMac::ForwardUp ( Ptr< const Packet packet,
Mac48Address  from,
Mac48Address  to 
)
protected

Forward the packet up to the device.

Parameters
packetthe packet that we are forwarding up to the device
fromthe address of the source
tothe address of the destination

Definition at line 916 of file wifi-mac.cc.

References m_forwardUp, and NS_LOG_FUNCTION.

Referenced by DeaggregateAmsduAndForward(), ns3::ApWifiMac::DeaggregateAmsduAndForward(), ns3::MeshWifiInterfaceMac::Receive(), ns3::OcbWifiMac::Receive(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the caller graph for this function:

◆ GetAddress()

◆ GetBEQueue()

Ptr< QosTxop > ns3::WifiMac::GetBEQueue ( void  ) const
protected

Accessor for the AC_BE channel access function.

Returns
a smart pointer to QosTxop

Definition at line 485 of file wifi-mac.cc.

References ns3::AC_BE, GetQosTxop(), and m_qosSupported.

Referenced by ns3::OcbWifiMac::ConfigureEdca(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRunSubTest(), GetTypeId(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendProbeResp(), SetBeBlockAckInactivityTimeout(), and SetBeBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBKQueue()

Ptr< QosTxop > ns3::WifiMac::GetBKQueue ( void  ) const
protected

Accessor for the AC_BK channel access function.

Returns
a smart pointer to QosTxop

Definition at line 491 of file wifi-mac.cc.

References ns3::AC_BK, GetQosTxop(), and m_qosSupported.

Referenced by ns3::OcbWifiMac::ConfigureEdca(), GetTypeId(), SetBkBlockAckInactivityTimeout(), and SetBkBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBssid()

Mac48Address ns3::WifiMac::GetBssid ( void  ) const
Returns
the BSSID of the network this device belongs to.

Definition at line 433 of file wifi-mac.cc.

References m_bssid.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::Enqueue(), ns3::StaWifiMac::Receive(), ns3::StaWifiMac::SendAssociationRequest(), ns3::StaWifiMac::SetState(), and SetupFrameExchangeManager().

+ Here is the caller graph for this function:

◆ GetDevice()

Ptr< WifiNetDevice > ns3::WifiMac::GetDevice ( void  ) const

Return the device this PHY is associated with.

Returns
the device this PHY is associated with

Definition at line 390 of file wifi-mac.cc.

References m_device.

Referenced by ns3::MeshWifiInterfaceMac::CheckSupportedRates(), GetHeConfiguration(), GetHtConfiguration(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), GetVhtConfiguration(), and ns3::MeshWifiInterfaceMac::Receive().

+ Here is the caller graph for this function:

◆ GetDsssSupported()

bool ns3::WifiMac::GetDsssSupported ( ) const

Return whether the device supports DSSS.

Returns
true if DSSS is supported, false otherwise

Definition at line 852 of file wifi-mac.cc.

References m_dsssSupported.

Referenced by ConfigureContentionWindow(), ns3::ApWifiMac::GetDsssParameterSet(), ns3::ApWifiMac::Receive(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendOneBeacon(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the caller graph for this function:

◆ GetErpSupported()

◆ GetExtendedCapabilities()

ExtendedCapabilities ns3::WifiMac::GetExtendedCapabilities ( void  ) const

Return the extended capabilities of the device.

Returns
the extended capabilities that we support

Definition at line 1175 of file wifi-mac.cc.

References GetHtSupported(), GetVhtSupported(), NS_LOG_FUNCTION, ns3::ExtendedCapabilities::SetHtSupported(), and ns3::ExtendedCapabilities::SetVhtSupported().

Referenced by ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFrameExchangeManager()

Ptr< FrameExchangeManager > ns3::WifiMac::GetFrameExchangeManager ( void  ) const

Get the Frame Exchange Manager.

Returns
the Frame Exchange Manager

Definition at line 744 of file wifi-mac.cc.

References m_feManager.

Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), and HeAggregationTest::DoRunSubTest().

+ Here is the caller graph for this function:

◆ GetHeCapabilities()

◆ GetHeConfiguration()

Ptr< HeConfiguration > ns3::WifiMac::GetHeConfiguration ( void  ) const
Returns
pointer to HeConfiguration if it exists

Definition at line 1059 of file wifi-mac.cc.

References GetDevice(), and ns3::WifiNetDevice::GetHeConfiguration().

Referenced by GetHeCapabilities(), ns3::ApWifiMac::GetHeOperation(), GetHeSupported(), ns3::ApWifiMac::GetMuEdcaParameterSet(), and ns3::StaWifiMac::UpdateApInfoFromAssocResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeSupported()

◆ GetHtCapabilities()

HtCapabilities ns3::WifiMac::GetHtCapabilities ( void  ) const

◆ GetHtConfiguration()

Ptr< HtConfiguration > ns3::WifiMac::GetHtConfiguration ( void  ) const
Returns
pointer to HtConfiguration if it exists

Definition at line 1047 of file wifi-mac.cc.

References GetDevice(), and ns3::WifiNetDevice::GetHtConfiguration().

Referenced by GetHeCapabilities(), GetHtCapabilities(), ns3::ApWifiMac::GetHtOperation(), GetHtSupported(), and GetVhtCapabilities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHtSupported()

◆ GetMaxAmpduSize()

uint32_t ns3::WifiMac::GetMaxAmpduSize ( AcIndex  ac) const

Return the maximum A-MPDU size of the given Access Category.

Parameters
acAccess Category index
Returns
the maximum A-MPDU size

Definition at line 1379 of file wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, m_beMaxAmpduSize, m_bkMaxAmpduSize, m_viMaxAmpduSize, m_voMaxAmpduSize, and NS_ABORT_MSG.

◆ GetMaxAmsduSize()

uint16_t ns3::WifiMac::GetMaxAmsduSize ( AcIndex  ac) const

Return the maximum A-MSDU size of the given Access Category.

Parameters
acAccess Category index
Returns
the maximum A-MSDU size

Definition at line 1404 of file wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, m_beMaxAmsduSize, m_bkMaxAmsduSize, m_viMaxAmsduSize, m_voMaxAmsduSize, and NS_ABORT_MSG.

◆ GetQosSupported()

◆ GetQosTxop() [1/2]

◆ GetQosTxop() [2/2]

Ptr< QosTxop > ns3::WifiMac::GetQosTxop ( uint8_t  tid) const

Accessor for a specified EDCA object.

Parameters
tidthe Traffic ID
Returns
a smart pointer to a QosTxop

Definition at line 467 of file wifi-mac.cc.

References GetQosTxop(), and ns3::QosUtilsMapTidToAc().

+ Here is the call graph for this function:

◆ GetShortSlotTimeSupported()

bool ns3::WifiMac::GetShortSlotTimeSupported ( void  ) const
protected
Returns
whether the device supports short slot time capability.

Definition at line 872 of file wifi-mac.cc.

References m_shortSlotTimeSupported.

Referenced by ns3::StaWifiMac::GetCapabilities(), GetTypeId(), and ns3::ApWifiMac::UpdateShortSlotTimeEnabled().

+ Here is the caller graph for this function:

◆ GetSsid()

Ssid ns3::WifiMac::GetSsid ( void  ) const

◆ GetTxop()

◆ GetTxopQueue()

Ptr< WifiMacQueue > ns3::WifiMac::GetTxopQueue ( AcIndex  ac) const
virtual

Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed, or a null pointer, otherwise.

Parameters
acthe given Access Category
Returns
the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed, or a null pointer, otherwise

Reimplemented in ns3::ApWifiMac.

Definition at line 497 of file wifi-mac.cc.

References ns3::AC_BE_NQOS, GetQosTxop(), ns3::Txop::GetWifiMacQueue(), and m_txop.

Referenced by ns3::ApWifiMac::GetTxopQueue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

◆ GetTypeOfStation()

TypeOfStation ns3::WifiMac::GetTypeOfStation ( void  ) const

Return the type of station.

Returns
the type of station.

Definition at line 378 of file wifi-mac.cc.

References m_typeOfStation.

◆ GetVhtCapabilities()

VhtCapabilities ns3::WifiMac::GetVhtCapabilities ( void  ) const

Return the VHT capabilities of the device.

Returns
the VHT capabilities that we support

Definition at line 1242 of file wifi-mac.cc.

References ns3::WifiPhy::GetChannelWidth(), GetHtConfiguration(), ns3::WifiPhy::GetMaxSupportedRxSpatialStreams(), ns3::WifiPhy::GetMaxSupportedTxSpatialStreams(), ns3::WifiPhy::GetMcsList(), GetVhtConfiguration(), GetVhtSupported(), GetWifiPhy(), m_beMaxAmpduSize, m_beMaxAmsduSize, m_bkMaxAmpduSize, m_bkMaxAmsduSize, m_viMaxAmpduSize, m_viMaxAmsduSize, m_voMaxAmpduSize, m_voMaxAmsduSize, max, min, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::VhtCapabilities::SetMaxAmpduLength(), ns3::VhtCapabilities::SetMaxMpduLength(), ns3::VhtCapabilities::SetRxHighestSupportedLgiDataRate(), ns3::VhtCapabilities::SetRxLdpc(), ns3::VhtCapabilities::SetRxMcsMap(), ns3::VhtCapabilities::SetRxStbc(), ns3::VhtCapabilities::SetShortGuardIntervalFor160Mhz(), ns3::VhtCapabilities::SetShortGuardIntervalFor80Mhz(), ns3::VhtCapabilities::SetSupportedChannelWidthSet(), ns3::VhtCapabilities::SetTxHighestSupportedLgiDataRate(), ns3::VhtCapabilities::SetTxMcsMap(), ns3::VhtCapabilities::SetTxStbc(), ns3::VhtCapabilities::SetVhtSupported(), and ns3::WIFI_MOD_CLASS_VHT.

Referenced by ns3::OcbWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Receive(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVhtConfiguration()

Ptr< VhtConfiguration > ns3::WifiMac::GetVhtConfiguration ( void  ) const
Returns
pointer to VhtConfiguration if it exists

Definition at line 1053 of file wifi-mac.cc.

References GetDevice(), and ns3::WifiNetDevice::GetVhtConfiguration().

Referenced by GetVhtCapabilities(), and GetVhtSupported().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVhtSupported()

◆ GetVIQueue()

Ptr< QosTxop > ns3::WifiMac::GetVIQueue ( void  ) const
protected

Accessor for the AC_VI channel access function.

Returns
a smart pointer to QosTxop

Definition at line 479 of file wifi-mac.cc.

References ns3::AC_VI, GetQosTxop(), and m_qosSupported.

Referenced by ns3::OcbWifiMac::ConfigureEdca(), TwoLevelAggregationTest::DoRun(), GetTypeId(), SetViBlockAckInactivityTimeout(), and SetViBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVOQueue()

Ptr< QosTxop > ns3::WifiMac::GetVOQueue ( void  ) const
protected

Accessor for the AC_VO channel access function.

Returns
a smart pointer to QosTxop

Definition at line 473 of file wifi-mac.cc.

References ns3::AC_VO, GetQosTxop(), and m_qosSupported.

Referenced by ns3::OcbWifiMac::ConfigureEdca(), GetTypeId(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), SetVoBlockAckInactivityTimeout(), and SetVoBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWifiPhy()

◆ GetWifiRemoteStationManager()

◆ NotifyChannelSwitching()

void ns3::WifiMac::NotifyChannelSwitching ( void  )
virtual

Notify that channel has been switched.

Reimplemented in ns3::StaWifiMac.

Definition at line 504 of file wifi-mac.cc.

References ConfigurePhyDependentParameters(), m_phy, m_stationManager, NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::SetupPhy().

Referenced by ns3::StaWifiMac::NotifyChannelSwitching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyPromiscRx()

void ns3::WifiMac::NotifyPromiscRx ( Ptr< const Packet packet)
Parameters
packetthe packet we received promiscuously

Public method used to fire a MacPromiscRx trace. Implemented for encapsulation purposes.

Definition at line 537 of file wifi-mac.cc.

References m_macPromiscRxTrace.

◆ NotifyRx()

void ns3::WifiMac::NotifyRx ( Ptr< const Packet packet)
Parameters
packetthe packet we received

Public method used to fire a MacRx trace. Implemented for encapsulation purposes.

Definition at line 531 of file wifi-mac.cc.

References m_macRxTrace.

◆ NotifyRxDrop()

void ns3::WifiMac::NotifyRxDrop ( Ptr< const Packet packet)
Parameters
packetthe packet we received but is not destined for us

Public method used to fire a MacRxDrop trace. Implemented for encapsulation purposes.

Definition at line 543 of file wifi-mac.cc.

References m_macRxDropTrace.

Referenced by ns3::OcbWifiMac::Receive(), ns3::ApWifiMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the caller graph for this function:

◆ NotifyTx()

void ns3::WifiMac::NotifyTx ( Ptr< const Packet packet)
Parameters
packetthe packet being enqueued

Public method used to fire a MacTx trace. Implemented for encapsulation purposes. Note this trace indicates that the packet was accepted by the device only. The packet may be dropped later (e.g. if the queue is full).

Definition at line 519 of file wifi-mac.cc.

References m_macTxTrace.

◆ NotifyTxDrop()

void ns3::WifiMac::NotifyTxDrop ( Ptr< const Packet packet)
Parameters
packetthe packet being dropped

Public method used to fire a MacTxDrop trace. This trace indicates that the packet was dropped before it was queued for transmission (e.g. when a STA is not associated with an AP).

Definition at line 525 of file wifi-mac.cc.

References m_macTxDropTrace.

Referenced by ns3::StaWifiMac::Enqueue(), and ns3::ApWifiMac::Enqueue().

+ Here is the caller graph for this function:

◆ operator=()

WifiMac& ns3::WifiMac::operator= ( const WifiMac mac)
private

assignment operator

Parameters
macthe WifiMac to assign
Returns
the assigned value

◆ Receive()

void ns3::WifiMac::Receive ( Ptr< WifiMacQueueItem mpdu)
protectedvirtual

This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received.

The implementation is intended to capture logic that is going to be common to all (or most) derived classes. Specifically, handling of Block Ack management frames is dealt with here.

This method will need, however, to be overridden by derived classes so that they can perform their data handling before invoking the base version.

Parameters
mpduthe MPDU that has been received.

Reimplemented in ns3::StaWifiMac, ns3::ApWifiMac, ns3::AdhocWifiMac, ns3::OcbWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 923 of file wifi-mac.cc.

References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE, ns3::WifiActionHeader::BLOCK_ACK_DELBA, ns3::WifiActionHeader::ActionValue::blockAck, ns3::WifiActionHeader::GetAction(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetAddress(), ns3::QosTxop::GetBaManager(), ns3::WifiActionHeader::GetCategory(), GetQosSupported(), GetQosTxop(), ns3::MgtAddBaResponseHeader::GetTid(), ns3::MgtDelBaHeader::GetTid(), ns3::WifiMacHeader::GetType(), ns3::QosTxop::GotAddBaResponse(), ns3::QosTxop::GotDelBaFrame(), ns3::WifiMacHeader::IsAction(), ns3::MgtDelBaHeader::IsByOriginator(), ns3::WifiMacHeader::IsMgt(), m_feManager, ns3::MakeCallback(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Packet::RemoveHeader(), and ns3::HtFrameExchangeManager::SendDelbaFrame().

Referenced by WifiMac(), ns3::OcbWifiMac::Receive(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetWifiPhy()

void ns3::WifiMac::ResetWifiPhy ( void  )

Remove currently attached WifiPhy device from this MAC.

Definition at line 783 of file wifi-mac.cc.

References m_channelAccessManager, m_feManager, m_phy, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::DefaultChannelScheduler::SwitchToNextChannel().

+ Here is the caller graph for this function:

◆ SetAddress()

void ns3::WifiMac::SetAddress ( Mac48Address  address)
virtual
Parameters
addressthe current address of this MAC layer.

Reimplemented in ns3::ApWifiMac, and ns3::AdhocWifiMac.

Definition at line 396 of file wifi-mac.cc.

References first::address, m_address, and NS_LOG_FUNCTION.

Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRunSubTest(), ns3::AdhocWifiMac::SetAddress(), and ns3::ApWifiMac::SetAddress().

+ Here is the caller graph for this function:

◆ SetBeBlockAckInactivityTimeout()

void ns3::WifiMac::SetBeBlockAckInactivityTimeout ( uint16_t  timeout)
private

Set BE block ack inactivity timeout.

Parameters
timeoutthe BE block ack inactivity timeout.

Definition at line 1155 of file wifi-mac.cc.

References GetBEQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBeBlockAckThreshold()

void ns3::WifiMac::SetBeBlockAckThreshold ( uint8_t  threshold)
private

Set the block ack threshold for AC_BE.

Parameters
thresholdthe block ack threshold for AC_BE.

Definition at line 1115 of file wifi-mac.cc.

References GetBEQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBkBlockAckInactivityTimeout()

void ns3::WifiMac::SetBkBlockAckInactivityTimeout ( uint16_t  timeout)
private

Set BK block ack inactivity timeout.

Parameters
timeoutthe BK block ack inactivity timeout.

Definition at line 1165 of file wifi-mac.cc.

References GetBKQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBkBlockAckThreshold()

void ns3::WifiMac::SetBkBlockAckThreshold ( uint8_t  threshold)
private

Set the block ack threshold for AC_BK.

Parameters
thresholdthe block ack threshold for AC_BK.

Definition at line 1125 of file wifi-mac.cc.

References GetBKQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBssid()

void ns3::WifiMac::SetBssid ( Mac48Address  bssid)
Parameters
bssidthe BSSID of the network that this device belongs to.

Definition at line 422 of file wifi-mac.cc.

References m_bssid, m_feManager, and NS_LOG_FUNCTION.

Referenced by ns3::OcbWifiMac::OcbWifiMac(), ns3::AdhocWifiMac::SetAddress(), ns3::ApWifiMac::SetAddress(), ns3::StaWifiMac::UpdateApInfoFromBeacon(), and ns3::StaWifiMac::UpdateApInfoFromProbeResp().

+ Here is the caller graph for this function:

◆ SetCtsToSelfSupported()

void ns3::WifiMac::SetCtsToSelfSupported ( bool  enable)

Enable or disable CTS-to-self feature.

Parameters
enabletrue if CTS-to-self is to be supported, false otherwise

Definition at line 858 of file wifi-mac.cc.

References m_ctsToSelfSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDevice()

void ns3::WifiMac::SetDevice ( const Ptr< WifiNetDevice device)

Sets the device this PHY is associated with.

Parameters
devicethe device this PHY is associated with

Definition at line 384 of file wifi-mac.cc.

References m_device.

Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), and HeAggregationTest::DoRunSubTest().

+ Here is the caller graph for this function:

◆ SetDsssSupported()

void ns3::WifiMac::SetDsssSupported ( bool  enable)
private

Enable or disable DSSS support for the device.

Parameters
enablewhether DSSS is supported

Definition at line 845 of file wifi-mac.cc.

References m_dsssSupported, and NS_LOG_FUNCTION.

Referenced by ConfigurePhyDependentParameters(), and SetErpSupported().

+ Here is the caller graph for this function:

◆ SetErpSupported()

void ns3::WifiMac::SetErpSupported ( bool  enable)
private

Enable or disable ERP support for the device.

Parameters
enablewhether ERP is supported

Definition at line 834 of file wifi-mac.cc.

References m_erpSupported, NS_LOG_FUNCTION, and SetDsssSupported().

Referenced by ConfigurePhyDependentParameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetForwardUpCallback()

void ns3::WifiMac::SetForwardUpCallback ( ForwardUpCallback  upCallback)
Parameters
upCallbackthe callback to invoke when a packet must be forwarded up the stack.

Definition at line 884 of file wifi-mac.cc.

References m_forwardUp, and NS_LOG_FUNCTION.

◆ SetLinkDownCallback()

void ns3::WifiMac::SetLinkDownCallback ( Callback< void >  linkDown)
Parameters
linkDownthe callback to invoke when the link becomes down.

Definition at line 898 of file wifi-mac.cc.

References m_linkDown, and NS_LOG_FUNCTION.

Referenced by ns3::OcbWifiMac::SetLinkDownCallback().

+ Here is the caller graph for this function:

◆ SetLinkUpCallback()

void ns3::WifiMac::SetLinkUpCallback ( Callback< void >  linkUp)
virtual
Parameters
linkUpthe callback to invoke when the link becomes up.

Reimplemented in ns3::ApWifiMac, ns3::AdhocWifiMac, ns3::OcbWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 891 of file wifi-mac.cc.

References m_linkUp, and NS_LOG_FUNCTION.

Referenced by ns3::MeshWifiInterfaceMac::SetLinkUpCallback(), ns3::OcbWifiMac::SetLinkUpCallback(), ns3::AdhocWifiMac::SetLinkUpCallback(), and ns3::ApWifiMac::SetLinkUpCallback().

+ Here is the caller graph for this function:

◆ SetPromisc()

void ns3::WifiMac::SetPromisc ( void  )

Sets the interface in promiscuous mode.

Enables promiscuous mode on the interface. Note that any further filtering on the incoming frame path may affect the overall behavior.

Definition at line 439 of file wifi-mac.cc.

References m_feManager, and NS_ASSERT.

◆ SetQosSupported()

void ns3::WifiMac::SetQosSupported ( bool  enable)
protected

Enable or disable QoS support for the device.

Construct a Txop object or QosTxop objects accordingly. This method can only be called before initialization.

Parameters
enablewhether QoS is supported

Definition at line 793 of file wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, ns3::Object::IsInitialized(), m_channelAccessManager, m_droppedMpduCallback, m_qosSupported, m_txMiddle, m_txop, ns3::MakeCallback(), NS_ABORT_IF, NS_LOG_FUNCTION, ns3::Txop::SetChannelAccessManager(), ns3::Txop::SetDroppedMpduCallback(), ns3::Txop::SetTxMiddle(), SetupEdcaQueue(), and ns3::Txop::SetWifiMac().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetShortSlotTimeSupported()

void ns3::WifiMac::SetShortSlotTimeSupported ( bool  enable)
protected

Enable or disable short slot time feature.

Parameters
enabletrue if short slot time is to be supported, false otherwise

Definition at line 865 of file wifi-mac.cc.

References m_shortSlotTimeSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSsid()

void ns3::WifiMac::SetSsid ( Ssid  ssid)
Parameters
ssidthe current SSID of this MAC layer.

Definition at line 409 of file wifi-mac.cc.

References m_ssid, NS_LOG_FUNCTION, and third::ssid.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetTypeOfStation()

void ns3::WifiMac::SetTypeOfStation ( TypeOfStation  type)

This method is invoked by a subclass to specify what type of station it is implementing.

This is something that the channel access functions need to know.

Parameters
typethe type of station.

Definition at line 371 of file wifi-mac.cc.

References m_typeOfStation, and NS_LOG_FUNCTION.

Referenced by ns3::AdhocWifiMac::AdhocWifiMac(), ns3::ApWifiMac::ApWifiMac(), ns3::MeshWifiInterfaceMac::MeshWifiInterfaceMac(), ns3::OcbWifiMac::OcbWifiMac(), and ns3::StaWifiMac::StaWifiMac().

+ Here is the caller graph for this function:

◆ SetupEdcaQueue()

void ns3::WifiMac::SetupEdcaQueue ( AcIndex  ac)
private

This method is a private utility invoked to configure the channel access function for the specified Access Category.

Parameters
acthe Access Category of the queue to initialise.

Definition at line 549 of file wifi-mac.cc.

References ns3::QosTxop::GetBaManager(), m_ackedMpduCallback, m_channelAccessManager, m_droppedMpduCallback, m_edca, m_nackedMpduCallback, m_txMiddle, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Txop::SetChannelAccessManager(), ns3::QosTxop::SetDroppedMpduCallback(), ns3::Txop::SetTxMiddle(), and ns3::Txop::SetWifiMac().

Referenced by SetQosSupported().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetupFrameExchangeManager()

void ns3::WifiMac::SetupFrameExchangeManager ( WifiStandard  standard)
private

Create a Frame Exchange Manager depending on the supported version of the standard.

Parameters
standardthe supported version of the standard

Definition at line 692 of file wifi-mac.cc.

References GetAddress(), GetBssid(), GetQosSupported(), m_ackedMpduCallback, m_channelAccessManager, m_droppedMpduCallback, m_edca, m_feManager, m_mpduResponseTimeoutCallback, m_psduMapResponseTimeoutCallback, m_psduResponseTimeoutCallback, m_qosSupported, m_rxMiddle, m_txMiddle, ns3::MakeCallback(), NS_ABORT_MSG_IF, NS_LOG_FUNCTION, ns3::WIFI_STANDARD_80211ac, ns3::WIFI_STANDARD_80211ax, ns3::WIFI_STANDARD_80211n, and ns3::WIFI_STANDARD_UNSPECIFIED.

Referenced by ConfigureStandard().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetViBlockAckInactivityTimeout()

void ns3::WifiMac::SetViBlockAckInactivityTimeout ( uint16_t  timeout)
private

Set VI block ack inactivity timeout.

Parameters
timeoutthe VI block ack inactivity timeout.

Definition at line 1145 of file wifi-mac.cc.

References GetVIQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetViBlockAckThreshold()

void ns3::WifiMac::SetViBlockAckThreshold ( uint8_t  threshold)
private

Set the block ack threshold for AC_VI.

Parameters
thresholdthe block ack threshold for AC_VI.

Definition at line 1105 of file wifi-mac.cc.

References GetVIQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetVoBlockAckInactivityTimeout()

void ns3::WifiMac::SetVoBlockAckInactivityTimeout ( uint16_t  timeout)
private

Set VO block ack inactivity timeout.

Parameters
timeoutthe VO block ack inactivity timeout.

Definition at line 1135 of file wifi-mac.cc.

References GetVOQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetVoBlockAckThreshold()

void ns3::WifiMac::SetVoBlockAckThreshold ( uint8_t  threshold)
private

Set the block ack threshold for AC_VO.

Parameters
thresholdthe block ack threshold for AC_VO.

Definition at line 1095 of file wifi-mac.cc.

References GetVOQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWifiPhy()

void ns3::WifiMac::SetWifiPhy ( Ptr< WifiPhy phy)
virtual
Parameters
phythe physical layer attached to this MAC.

Reimplemented in ns3::StaWifiMac.

Definition at line 763 of file wifi-mac.cc.

References ConfigurePhyDependentParameters(), ns3::WifiPhy::GetOperatingChannel(), ns3::WifiPhyOperatingChannel::IsSet(), m_channelAccessManager, m_feManager, m_phy, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_FUNCTION, and third::phy.

Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), ns3::StaWifiMac::SetWifiPhy(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWifiRemoteStationManager()

void ns3::WifiMac::SetWifiRemoteStationManager ( Ptr< WifiRemoteStationManager stationManager)
Parameters
stationManagerthe station manager attached to this MAC.

Definition at line 750 of file wifi-mac.cc.

References m_stationManager, and NS_LOG_FUNCTION.

Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), HeAggregationTest::DoRunSubTest(), and ns3::WaveHelper::Install().

+ Here is the caller graph for this function:

◆ SupportsSendFrom()

bool ns3::WifiMac::SupportsSendFrom ( void  ) const
virtual
Returns
if this MAC supports sending from arbitrary address.

The interface may or may not support sending from arbitrary address. This function returns true if sending from arbitrary address is supported, false otherwise.

Reimplemented in ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 878 of file wifi-mac.cc.

Member Data Documentation

◆ m_ackedMpduCallback

MpduTracedCallback ns3::WifiMac::m_ackedMpduCallback
private

ack'ed MPDU callback

Definition at line 753 of file wifi-mac.h.

Referenced by GetTypeId(), SetupEdcaQueue(), and SetupFrameExchangeManager().

◆ m_address

Mac48Address ns3::WifiMac::m_address
private

MAC address of this station.

Definition at line 669 of file wifi-mac.h.

Referenced by GetAddress(), and SetAddress().

◆ m_beMaxAmpduSize

uint32_t ns3::WifiMac::m_beMaxAmpduSize
private

maximum A-MPDU size for AC_BE (in bytes)

Definition at line 688 of file wifi-mac.h.

Referenced by GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_beMaxAmsduSize

uint16_t ns3::WifiMac::m_beMaxAmsduSize
private

maximum A-MSDU size for AC_BE (in bytes)

Definition at line 683 of file wifi-mac.h.

Referenced by GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_bkMaxAmpduSize

uint32_t ns3::WifiMac::m_bkMaxAmpduSize
private

maximum A-MPDU size for AC_BK (in bytes)

Definition at line 689 of file wifi-mac.h.

Referenced by GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_bkMaxAmsduSize

uint16_t ns3::WifiMac::m_bkMaxAmsduSize
private

maximum A-MSDU size for AC_BK (in bytes)

Definition at line 684 of file wifi-mac.h.

Referenced by GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_bssid

Mac48Address ns3::WifiMac::m_bssid
private

the BSSID

Definition at line 671 of file wifi-mac.h.

Referenced by GetBssid(), and SetBssid().

◆ m_channelAccessManager

◆ m_ctsToSelfSupported

bool ns3::WifiMac::m_ctsToSelfSupported
private

flag indicating whether CTS-To-Self is supported

Definition at line 661 of file wifi-mac.h.

Referenced by SetCtsToSelfSupported().

◆ m_device

Ptr<WifiNetDevice> ns3::WifiMac::m_device
private

Pointer to the device.

Definition at line 665 of file wifi-mac.h.

Referenced by DoDispose(), GetDevice(), and SetDevice().

◆ m_droppedMpduCallback

DroppedMpduTracedCallback ns3::WifiMac::m_droppedMpduCallback
private

This trace indicates that an MPDU was dropped for the given reason.

Definition at line 748 of file wifi-mac.h.

Referenced by GetTypeId(), SetQosSupported(), SetupEdcaQueue(), and SetupFrameExchangeManager().

◆ m_dsssSupported

bool ns3::WifiMac::m_dsssSupported
private

This Boolean is set true iff this WifiMac is to model 802.11b.

It is exposed through the attribute system.

Definition at line 658 of file wifi-mac.h.

Referenced by GetDsssSupported(), and SetDsssSupported().

◆ m_edca

EdcaQueues ns3::WifiMac::m_edca
private

This is a map from Access Category index to the corresponding channel access function.

Definition at line 679 of file wifi-mac.h.

Referenced by ConfigureContentionWindow(), DoDispose(), DoInitialize(), GetQosTxop(), SetupEdcaQueue(), and SetupFrameExchangeManager().

◆ m_erpSupported

bool ns3::WifiMac::m_erpSupported
private

This Boolean is set true iff this WifiMac is to model 802.11g.

It is exposed through the attribute system.

Definition at line 653 of file wifi-mac.h.

Referenced by GetErpSupported(), and SetErpSupported().

◆ m_feManager

◆ m_forwardUp

ForwardUpCallback ns3::WifiMac::m_forwardUp
private

Callback to forward packet up the stack.

Definition at line 691 of file wifi-mac.h.

Referenced by ForwardUp(), and SetForwardUpCallback().

◆ m_linkDown

Callback<void> ns3::WifiMac::m_linkDown
protected

Callback when a link is down.

Definition at line 526 of file wifi-mac.h.

Referenced by SetLinkDownCallback(), and ns3::StaWifiMac::TryToEnsureAssociated().

◆ m_linkUp

Callback<void> ns3::WifiMac::m_linkUp
protected

Callback when a link is up.

Definition at line 525 of file wifi-mac.h.

Referenced by ns3::StaWifiMac::Receive(), and SetLinkUpCallback().

◆ m_macPromiscRxTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macPromiscRxTrace
private

The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).

This is a promiscuous trace.

See also
class CallBackTraceSource

Definition at line 714 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyPromiscRx().

◆ m_macRxDropTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macRxDropTrace
private

The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer during reception.

See also
class CallBackTraceSource

Definition at line 729 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyRxDrop().

◆ m_macRxTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macRxTrace
private

The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).

This is a non- promiscuous trace.

See also
class CallBackTraceSource

Definition at line 722 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyRx().

◆ m_macTxDropTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macTxDropTrace
private

The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer before being queued for transmission.

See also
class CallBackTraceSource

Definition at line 706 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyTxDrop().

◆ m_macTxTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macTxTrace
private

The trace source fired when packets come into the "top" of the device at the L3/L2 transition, before being queued for transmission.

See also
class CallBackTraceSource

Definition at line 699 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyTx().

◆ m_mpduResponseTimeoutCallback

MpduResponseTimeoutTracedCallback ns3::WifiMac::m_mpduResponseTimeoutCallback
private

MPDU response timeout traced callback.

This trace source is fed by a WifiTxTimer object.

Definition at line 773 of file wifi-mac.h.

Referenced by GetTypeId(), and SetupFrameExchangeManager().

◆ m_nackedMpduCallback

MpduTracedCallback ns3::WifiMac::m_nackedMpduCallback
private

nack'ed MPDU callback

Definition at line 754 of file wifi-mac.h.

Referenced by GetTypeId(), and SetupEdcaQueue().

◆ m_phy

Ptr<WifiPhy> ns3::WifiMac::m_phy
private

◆ m_psduMapResponseTimeoutCallback

PsduMapResponseTimeoutTracedCallback ns3::WifiMac::m_psduMapResponseTimeoutCallback
private

PSDU map response timeout traced callback.

This trace source is fed by a WifiTxTimer object.

Definition at line 813 of file wifi-mac.h.

Referenced by GetTypeId(), and SetupFrameExchangeManager().

◆ m_psduResponseTimeoutCallback

PsduResponseTimeoutTracedCallback ns3::WifiMac::m_psduResponseTimeoutCallback
private

PSDU response timeout traced callback.

This trace source is fed by a WifiTxTimer object.

Definition at line 792 of file wifi-mac.h.

Referenced by GetTypeId(), and SetupFrameExchangeManager().

◆ m_qosSupported

bool ns3::WifiMac::m_qosSupported
private

This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.

It is exposed through the attribute system.

At the moment, this flag is the sole selection between QoS and non-QoS operation for the STA (whether IBSS, AP, or non-AP). Ultimately, we will want a QoS-enabled STA to be able to fall back to non-QoS operation with a non-QoS peer. This'll require further intelligence - i.e., per-association QoS state. Having a big switch seems like a good intermediate stage, however.

Definition at line 648 of file wifi-mac.h.

Referenced by ConfigureStandard(), GetBEQueue(), GetBKQueue(), GetQosSupported(), GetVIQueue(), GetVOQueue(), SetBeBlockAckInactivityTimeout(), SetBeBlockAckThreshold(), SetBkBlockAckInactivityTimeout(), SetBkBlockAckThreshold(), SetQosSupported(), SetupFrameExchangeManager(), SetViBlockAckInactivityTimeout(), SetViBlockAckThreshold(), SetVoBlockAckInactivityTimeout(), and SetVoBlockAckThreshold().

◆ m_rxMiddle

Ptr<MacRxMiddle> ns3::WifiMac::m_rxMiddle
protected

RX middle (defragmentation etc.)

Definition at line 519 of file wifi-mac.h.

Referenced by WifiMac(), ns3::OcbWifiMac::ConfigureStandard(), DoDispose(), and SetupFrameExchangeManager().

◆ m_shortSlotTimeSupported

bool ns3::WifiMac::m_shortSlotTimeSupported
private

flag whether short slot time is supported

Definition at line 660 of file wifi-mac.h.

Referenced by GetShortSlotTimeSupported(), and SetShortSlotTimeSupported().

◆ m_ssid

Ssid ns3::WifiMac::m_ssid
private

Service Set ID (SSID)

Definition at line 670 of file wifi-mac.h.

Referenced by GetSsid(), and SetSsid().

◆ m_stationManager

Ptr<WifiRemoteStationManager> ns3::WifiMac::m_stationManager
private

Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)

Definition at line 667 of file wifi-mac.h.

Referenced by DoDispose(), GetWifiRemoteStationManager(), NotifyChannelSwitching(), and SetWifiRemoteStationManager().

◆ m_txErrCallback

TracedCallback<const WifiMacHeader &> ns3::WifiMac::m_txErrCallback
private

transmit error callback

Definition at line 732 of file wifi-mac.h.

Referenced by GetTypeId().

◆ m_txMiddle

◆ m_txOkCallback

TracedCallback<const WifiMacHeader &> ns3::WifiMac::m_txOkCallback
private

transmit OK callback

Definition at line 731 of file wifi-mac.h.

Referenced by GetTypeId().

◆ m_txop

Ptr<Txop> ns3::WifiMac::m_txop
protected

◆ m_typeOfStation

TypeOfStation ns3::WifiMac::m_typeOfStation
private

the type of station

Definition at line 663 of file wifi-mac.h.

Referenced by GetTypeOfStation(), and SetTypeOfStation().

◆ m_viMaxAmpduSize

uint32_t ns3::WifiMac::m_viMaxAmpduSize
private

maximum A-MPDU size for AC_VI (in bytes)

Definition at line 687 of file wifi-mac.h.

Referenced by GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_viMaxAmsduSize

uint16_t ns3::WifiMac::m_viMaxAmsduSize
private

maximum A-MSDU size for AC_VI (in bytes)

Definition at line 682 of file wifi-mac.h.

Referenced by GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_voMaxAmpduSize

uint32_t ns3::WifiMac::m_voMaxAmpduSize
private

maximum A-MPDU size for AC_VO (in bytes)

Definition at line 686 of file wifi-mac.h.

Referenced by GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_voMaxAmsduSize

uint16_t ns3::WifiMac::m_voMaxAmsduSize
private

maximum A-MSDU size for AC_VO (in bytes)

Definition at line 681 of file wifi-mac.h.

Referenced by GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().


The documentation for this class was generated from the following files: