wifi: Make it easier to get the links over which an MPDU can be sent
This commit is contained in:
@@ -515,9 +515,7 @@ void
|
||||
Txop::Queue(Ptr<WifiMpdu> mpdu)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << *mpdu);
|
||||
const auto linkIds =
|
||||
m_mac->GetMacQueueScheduler()->GetLinkIds(m_queue->GetAc(),
|
||||
WifiMacQueueContainer::GetQueueId(mpdu));
|
||||
const auto linkIds = m_mac->GetMacQueueScheduler()->GetLinkIds(m_queue->GetAc(), mpdu);
|
||||
for (const auto linkId : linkIds)
|
||||
{
|
||||
if (m_mac->GetChannelAccessManager(linkId)->NeedBackoffUponAccess(this))
|
||||
|
||||
@@ -73,7 +73,7 @@ class WifiMacQueueSchedulerImpl : public WifiMacQueueScheduler
|
||||
uint8_t linkId,
|
||||
const WifiContainerQueueId& prevQueueId) final;
|
||||
/** \copydoc ns3::WifiMacQueueScheduler::GetLinkIds */
|
||||
std::list<uint8_t> GetLinkIds(AcIndex ac, const WifiContainerQueueId& queueId) final;
|
||||
std::list<uint8_t> GetLinkIds(AcIndex ac, Ptr<const WifiMpdu> mpdu) final;
|
||||
/** \copydoc ns3::WifiMacQueueScheduler::SetLinkIds */
|
||||
void SetLinkIds(AcIndex ac,
|
||||
const WifiContainerQueueId& queueId,
|
||||
@@ -363,10 +363,9 @@ WifiMacQueueSchedulerImpl<Priority, Compare>::SetPriority(AcIndex ac,
|
||||
|
||||
template <class Priority, class Compare>
|
||||
std::list<uint8_t>
|
||||
WifiMacQueueSchedulerImpl<Priority, Compare>::GetLinkIds(AcIndex ac,
|
||||
const WifiContainerQueueId& queueId)
|
||||
WifiMacQueueSchedulerImpl<Priority, Compare>::GetLinkIds(AcIndex ac, Ptr<const WifiMpdu> mpdu)
|
||||
{
|
||||
auto queueInfoIt = InitQueueInfo(ac, queueId);
|
||||
auto queueInfoIt = InitQueueInfo(ac, WifiMacQueueContainer::GetQueueId(mpdu));
|
||||
|
||||
if (queueInfoIt->second.linkIds.empty())
|
||||
{
|
||||
|
||||
@@ -81,14 +81,14 @@ class WifiMacQueueScheduler : public Object
|
||||
const WifiContainerQueueId& prevQueueId) = 0;
|
||||
|
||||
/**
|
||||
* Get the list of the IDs of the links the given container queue (belonging to
|
||||
* the given Access Category) is associated with.
|
||||
* Get the list of the IDs of the links the given MPDU (belonging to the given
|
||||
* Access Category) can be sent over.
|
||||
*
|
||||
* \param ac the given Access Category
|
||||
* \param queueId the given container queue
|
||||
* \return the list of the IDs of the links the given container queue is associated with
|
||||
* \param mpdu the given MPDU
|
||||
* \return the list of the IDs of the links the given MPDU can be sent over
|
||||
*/
|
||||
virtual std::list<uint8_t> GetLinkIds(AcIndex ac, const WifiContainerQueueId& queueId) = 0;
|
||||
virtual std::list<uint8_t> GetLinkIds(AcIndex ac, Ptr<const WifiMpdu> mpdu) = 0;
|
||||
/**
|
||||
* Set the list of the IDs of the links the given container queue (belonging to
|
||||
* the given Access Category) is associated with.
|
||||
|
||||
Reference in New Issue
Block a user