diff --git a/src/wifi/model/wifi-mac-header.cc b/src/wifi/model/wifi-mac-header.cc index 65e0494f0..a7b09dcb1 100644 --- a/src/wifi/model/wifi-mac-header.cc +++ b/src/wifi/model/wifi-mac-header.cc @@ -383,6 +383,13 @@ void WifiMacHeader::SetQosTxopLimit (uint8_t txop) m_qosStuff = txop; } +void +WifiMacHeader::SetQosQueueSize (uint8_t size) +{ + m_qosEosp = 1; + m_qosStuff = size; +} + void WifiMacHeader::SetQosMeshControlPresent (void) { //Mark bit 0 of this variable instead of bit 8, since m_qosStuff is @@ -835,6 +842,13 @@ WifiMacHeader::GetQosTid (void) const return m_qosTid; } +uint8_t +WifiMacHeader::GetQosQueueSize (void) const +{ + NS_ASSERT (m_qosEosp == 1); + return m_qosStuff; +} + uint16_t WifiMacHeader::GetFrameControl (void) const { diff --git a/src/wifi/model/wifi-mac-header.h b/src/wifi/model/wifi-mac-header.h index e7c76dd43..0264d9625 100644 --- a/src/wifi/model/wifi-mac-header.h +++ b/src/wifi/model/wifi-mac-header.h @@ -249,6 +249,12 @@ public: * \param txop the TXOP limit */ void SetQosTxopLimit (uint8_t txop); + /** + * Set the Queue Size subfield in the QoS control field. + * + * \param size the value for the Queue Size subfield + */ + void SetQosQueueSize (uint8_t size); /** * Set the Mesh Control Present flag for the QoS header. */ @@ -544,6 +550,12 @@ public: * \return the QoS Ack policy in the QoS control field */ QosAckPolicy GetQosAckPolicy (void) const; + /** + * Get the Queue Size subfield in the QoS control field. + * + * \return the value of the Queue Size subfield + */ + uint8_t GetQosQueueSize (void) const; /** * Return the size of the WifiMacHeader in octets. * GetSerializedSize calls this function.