wifi: Move operations to be done by PHY at the end of TX in a separate function
This commit is contained in:
committed by
Sébastien Deronne
parent
fb358034cd
commit
99a6477d5e
@@ -1842,17 +1842,23 @@ WifiPhy::Send(WifiConstPsduMap psdus, const WifiTxVector& txVector)
|
||||
}
|
||||
|
||||
m_endTxEvent =
|
||||
Simulator::Schedule(txDuration, &WifiPhy::NotifyTxEnd, this, psdus); // TODO: fix for MU
|
||||
Simulator::Schedule(txDuration, &WifiPhy::TxDone, this, psdus); // TODO: fix for MU
|
||||
|
||||
StartTx(ppdu);
|
||||
ppdu->ResetTxVector();
|
||||
|
||||
m_channelAccessRequested = false;
|
||||
m_powerRestricted = false;
|
||||
}
|
||||
|
||||
Simulator::Schedule(txDuration, &WifiPhy::Reset, this);
|
||||
|
||||
Simulator::Schedule(txDuration, &WifiPhy::SwitchMaybeToCcaBusy, this, nullptr);
|
||||
void
|
||||
WifiPhy::TxDone(const WifiConstPsduMap& psdus)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << psdus);
|
||||
NotifyTxEnd(psdus);
|
||||
Reset();
|
||||
// we might have received signals during TX
|
||||
SwitchMaybeToCcaBusy();
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
||||
@@ -1389,6 +1389,12 @@ class WifiPhy : public Object
|
||||
*/
|
||||
void AbortCurrentReception(WifiPhyRxfailureReason reason);
|
||||
|
||||
/**
|
||||
* Callback function when a transmission is completed
|
||||
* \param psdus the PSDUs that have been sent
|
||||
*/
|
||||
void TxDone(const WifiConstPsduMap& psdus);
|
||||
|
||||
/**
|
||||
* Get the PSDU addressed to that PHY in a PPDU (useful for MU PPDU).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user