|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef REGULAR_WIFI_MAC_H
22 #define REGULAR_WIFI_MAC_H
28 #include <unordered_map>
34 class ChannelAccessManager;
35 class ExtendedCapabilities;
36 class FrameExchangeManager;
39 enum WifiTxTimerReason : uint8_t;
41 typedef std::unordered_map <uint16_t , Ptr<WifiPsdu> >
WifiPsduMap;
517 const std::set<Mac48Address>* missingStations,
518 std::size_t nTotalStations);
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
a unique identifier for an interface.
Ptr< FrameExchangeManager > GetFrameExchangeManager(void) const
Get the Frame Exchange Manager.
RegularWifiMac(const RegularWifiMac &)
type conversion operator
The IEEE 802.11ac VHT Capabilities.
bool m_erpSupported
This Boolean is set true iff this WifiMac is to model 802.11g.
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
RegularWifiMac & operator=(const RegularWifiMac &mac)
assignment operator
std::unordered_map< uint16_t, Ptr< WifiPsdu > > WifiPsduMap
Map of PSDUs indexed by STA-ID.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities of the device.
Mac48Address m_address
MAC address of this station.
void(* PsduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
TracedCallback signature for PSDU response timeout events.
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
WifiMacDropReason
The reason why an MPDU was dropped.
Ssid GetSsid(void) const override
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
void SetBssid(Mac48Address bssid)
static TypeId GetTypeId(void)
Get the type ID.
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
bool GetHeSupported() const
Return whether the device supports HE.
The IEEE 802.11ax HE Capabilities.
void SetLinkDownCallback(Callback< void > linkDown) override
bool m_shortSlotTimeSupported
flag whether short slot time is supported
Mac48Address GetBssid(void) const override
bool GetErpSupported() const
Return whether the device supports ERP.
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
uint16_t m_viMaxAmsduSize
maximum A-MSDU 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...
TypeOfStation
Enumeration for type of station.
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
void SetLinkUpCallback(Callback< void > linkUp) override
base class for all MAC-level wifi objects.
void(* PsduMapResponseTimeoutCallback)(uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
TracedCallback signature for PSDU map response timeout events.
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.
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
bool GetQosSupported() const
Return whether the device supports QoS.
void SetSsid(Ssid ssid) override
The IEEE 802.11 SSID Information Element.
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
TypeOfStation m_typeOfStation
the type of station
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Callback< void > m_linkDown
Callback when a link is down.
Mac48Address GetAddress(void) const override
bool SupportsSendFrom(void) const override
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
void(* MpduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiMacQueueItem > mpdu, const WifiTxVector &txVector)
TracedCallback signature for MPDU response timeout events.
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
bool GetVhtSupported() const
Return whether the device supports VHT.
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
void ResetWifiPhy(void) override
Remove currently attached WifiPhy device from this MAC.
void SetupFrameExchangeManager(void)
Create a Frame Exchange Manager depending on the supported version of the standard.
void SetAddress(Mac48Address address) override
The HT Capabilities Information Element.
void DoDispose() override
Destructor implementation.
Callback< void > m_linkUp
Callback when a link is up.
Ptr< Txop > m_txop
This holds a pointer to the TXOP instance for this WifiMac - used for transmission of frames to non-Q...
bool GetShortSlotTimeSupported(void) const override
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Ptr< Txop > GetTxop(void) const
Accessor for the DCF object.
base class for all MAC-level wifi objects.
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
TracedCallback< Ptr< const WifiMacQueueItem > > MpduTracedCallback
TracedCallback for acked/nacked MPDUs typedef.
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
std::map< AcIndex, Ptr< QosTxop > > EdcaQueues
This type defines a mapping between an Access Category index, and a pointer to the corresponding chan...
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
void SetTypeOfStation(TypeOfStation type) override
This method is invoked by a subclass to specify what type of station it is implementing.
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
void SetWifiRemoteStationManager(const Ptr< WifiRemoteStationManager > stationManager) override
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
virtual Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const
Get the wifi MAC queue of the (Qos)Txop associated with the given AC.
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Mac48Address m_bssid
the BSSID
TypeOfStation GetTypeOfStation(void) const override
Return the type of station.
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
bool m_dsssSupported
This Boolean is set true iff this WifiMac is to model 802.11b.
void(* DroppedMpduCallback)(WifiMacDropReason reason, Ptr< const WifiMacQueueItem > mpdu)
TracedCallback signature for MPDU drop events.
The Extended Capabilities Information Element.
virtual void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
void ConfigureStandard(WifiStandard standard) override
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from) override
TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
TracedCallback for PSDU map response timeout events typedef.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities of the device.
Ptr< FrameExchangeManager > m_feManager
Frame Exchange Manager.
void SetDsssSupported(bool enable)
Enable or disable DSSS support for the device.
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
void SetForwardUpCallback(ForwardUpCallback upCallback) override
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
void SetWifiPhy(const Ptr< WifiPhy > phy) override
TracedCallback< uint8_t, Ptr< const WifiMacQueueItem >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
TracedCallback for MPDU response timeout events typedef.
Ptr< QosTxop > GetBKQueue(void) const
Accessor for the AC_BK channel access function.
void SetShortSlotTimeSupported(bool enable) override
Enable or disable short slot time feature.
TracedCallback< WifiMacDropReason, Ptr< const WifiMacQueueItem > > DroppedMpduTracedCallback
TracedCallback for MPDU drop events typedef.
void DoInitialize() override
Initialize() implementation.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
bool GetDsssSupported() const
Return whether the device supports DSSS.
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(void) const override
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
Forward calls to a chain of Callback.
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
Ptr< WifiPhy > m_phy
Wifi PHY.
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
void SetPromisc(void) override
Sets the interface in promiscuous mode.
virtual ~RegularWifiMac()
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
void Enqueue(Ptr< Packet > packet, Mac48Address to) override=0
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
bool GetHtSupported() const
Return whether the device supports HT.
bool m_qosSupported
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.
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...
TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
TracedCallback for PSDU response timeout events typedef.
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
void SetErpSupported(bool enable)
Enable or disable ERP support for the device.
Ssid m_ssid
Service Set ID (SSID)
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Ptr< WifiPhy > GetWifiPhy(void) const override