wifi: Implement a WifiMacQueue-specific Flush() method
This commit is contained in:
committed by
Stefano Avallone
parent
0569e6ad89
commit
70a32c145b
@@ -398,6 +398,17 @@ WifiMacQueue::Remove(Ptr<const WifiMpdu> mpdu)
|
||||
return DoRemove(it);
|
||||
}
|
||||
|
||||
void
|
||||
WifiMacQueue::Flush()
|
||||
{
|
||||
NS_LOG_FUNCTION(this);
|
||||
|
||||
// there may be some expired MPDUs in the container queue storing MPDUs with expired lifetime,
|
||||
// which will not be flushed by the Flush() method of the base class.
|
||||
WipeAllExpiredMpdus();
|
||||
Queue<WifiMpdu, WifiMacQueueContainer>::Flush();
|
||||
}
|
||||
|
||||
void
|
||||
WifiMacQueue::Replace(Ptr<const WifiMpdu> currentItem, Ptr<WifiMpdu> newItem)
|
||||
{
|
||||
|
||||
@@ -212,6 +212,11 @@ class WifiMacQueue : public Queue<WifiMpdu, ns3::WifiMacQueueContainer>
|
||||
*/
|
||||
Ptr<WifiMpdu> Remove(Ptr<const WifiMpdu> item);
|
||||
|
||||
/**
|
||||
* Flush the queue.
|
||||
*/
|
||||
void Flush();
|
||||
|
||||
/**
|
||||
* Replace the given current item with the given new item. Actually, the current
|
||||
* item is dequeued and the new item is enqueued in its place. In this way,
|
||||
|
||||
Reference in New Issue
Block a user