wifi: Add support for setting the Queue Size subfield in the QoS control field

This commit is contained in:
Stefano Avallone
2020-11-25 17:24:16 +01:00
parent 95711be71b
commit b60fb53916
2 changed files with 26 additions and 0 deletions

View File

@@ -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
{

View File

@@ -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.