From f99d624f5e7fbddf09c281ead421d235162cfaec Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Tue, 12 Jan 2021 12:42:20 +0100 Subject: [PATCH] wifi: Allow QosTxop to return its Access Category --- src/wifi/model/qos-txop.cc | 6 ++++++ src/wifi/model/qos-txop.h | 1 + src/wifi/model/txop.cc | 6 ++++++ src/wifi/model/txop.h | 7 +++++++ 4 files changed, 20 insertions(+) diff --git a/src/wifi/model/qos-txop.cc b/src/wifi/model/qos-txop.cc index d57749cb1..b739d0654 100644 --- a/src/wifi/model/qos-txop.cc +++ b/src/wifi/model/qos-txop.cc @@ -788,4 +788,10 @@ QosTxop::IsQosTxop (void) const return true; } +AcIndex +QosTxop::GetAccessCategory (void) const +{ + return m_ac; +} + } //namespace ns3 diff --git a/src/wifi/model/qos-txop.h b/src/wifi/model/qos-txop.h index df5e7a44a..1edda64b1 100644 --- a/src/wifi/model/qos-txop.h +++ b/src/wifi/model/qos-txop.h @@ -84,6 +84,7 @@ public: virtual ~QosTxop (); bool IsQosTxop (void) const override; + AcIndex GetAccessCategory (void) const override; void SetWifiRemoteStationManager (const Ptr remoteManager) override; bool HasFramesToTransmit (void) override; void NotifyInternalCollision (void) override; diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index 220cc661d..3476e337b 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -423,4 +423,10 @@ Txop::IsQosTxop () const return false; } +AcIndex +Txop::GetAccessCategory (void) const +{ + return AC_BE_NQOS; +} + } //namespace ns3 diff --git a/src/wifi/model/txop.h b/src/wifi/model/txop.h index 6d26975b5..8ee8c7fd9 100644 --- a/src/wifi/model/txop.h +++ b/src/wifi/model/txop.h @@ -36,6 +36,7 @@ class UniformRandomVariable; class CtrlBAckResponseHeader; class WifiRemoteStationManager; enum WifiMacDropReason : uint8_t; // opaque enum declaration +enum AcIndex : uint8_t; /** * \brief Handle packet fragmentation and retransmissions @@ -97,6 +98,12 @@ public: * \returns true if QoS TXOP. */ virtual bool IsQosTxop () const; + /** + * Get the access category. + * + * \return the access category. + */ + virtual AcIndex GetAccessCategory (void) const; /** * Set ChannelAccessManager this Txop is associated to.