wifi: Make Txop::StartAccessIfNeeded() public
This commit is contained in:
@@ -179,13 +179,11 @@ EhtFrameExchangeManager::StartTransmission(Ptr<Txop> edca, uint16_t allowedWidth
|
||||
edca->NotifyChannelReleased(m_linkId);
|
||||
NS_LOG_DEBUG("No new TXOP attempts allowed while MediumSyncDelay is running");
|
||||
// request channel access if needed when the MediumSyncDelay timer expires
|
||||
Simulator::Schedule(emlsrManager->GetMediumSyncDuration() - *elapsed, [=, this]() {
|
||||
if (edca->GetAccessStatus(m_linkId) == Txop::NOT_REQUESTED &&
|
||||
edca->HasFramesToTransmit(m_linkId))
|
||||
{
|
||||
m_staMac->GetChannelAccessManager(m_linkId)->RequestAccess(edca);
|
||||
}
|
||||
});
|
||||
Simulator::Schedule(emlsrManager->GetMediumSyncDuration() - *elapsed,
|
||||
&Txop::StartAccessIfNeeded,
|
||||
edca,
|
||||
m_linkId);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -395,6 +395,13 @@ class Txop : public Object
|
||||
*/
|
||||
virtual ChannelAccessStatus GetAccessStatus(uint8_t linkId) const;
|
||||
|
||||
/**
|
||||
* Request access from Txop on the given link if needed.
|
||||
*
|
||||
* \param linkId the ID of the given link
|
||||
*/
|
||||
void StartAccessIfNeeded(uint8_t linkId);
|
||||
|
||||
/**
|
||||
* \param nSlots the number of slots of the backoff.
|
||||
* \param linkId the ID of the given link
|
||||
@@ -443,12 +450,6 @@ class Txop : public Object
|
||||
* \param linkId the ID of the given link
|
||||
*/
|
||||
virtual void GenerateBackoff(uint8_t linkId);
|
||||
/**
|
||||
* Request access from Txop on the given link if needed.
|
||||
*
|
||||
* \param linkId the ID of the given link
|
||||
*/
|
||||
virtual void StartAccessIfNeeded(uint8_t linkId);
|
||||
/**
|
||||
* Request access to the ChannelAccessManager associated with the given link
|
||||
*
|
||||
|
||||
@@ -1465,14 +1465,7 @@ WifiMac::UnblockUnicastTxOnLinks(WifiQueueBlockedReason reason,
|
||||
{linkId});
|
||||
// request channel access if needed (schedule now because multiple invocations
|
||||
// of this method may be done in a loop at the caller)
|
||||
auto qosTxop = GetQosTxop(acIndex);
|
||||
Simulator::ScheduleNow([=, this]() {
|
||||
if (qosTxop->GetAccessStatus(linkId) == Txop::NOT_REQUESTED &&
|
||||
qosTxop->HasFramesToTransmit(linkId))
|
||||
{
|
||||
GetLink(linkId).channelAccessManager->RequestAccess(qosTxop);
|
||||
}
|
||||
});
|
||||
Simulator::ScheduleNow(&Txop::StartAccessIfNeeded, GetQosTxop(acIndex), linkId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user