wifi: Do no longer copy WifiPpdu for HE portion of MU transmissions

This commit is contained in:
Sébastien Deronne
2022-11-02 20:01:59 +01:00
committed by Sebastien Deronne
parent 343d37778f
commit ea8860e75f
4 changed files with 27 additions and 13 deletions

View File

@@ -1378,17 +1378,13 @@ HePhy::StartTx(Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector)
Transmit(nonOfdmaDuration, ppdu, txVector, "non-OFDMA transmission");
// OFDMA part
auto hePpdu = DynamicCast<HePpdu>(ppdu->Copy()); // since flag will be modified
NS_ASSERT(hePpdu);
hePpdu->SetTxPsdFlag(HePpdu::PSD_HE_PORTION);
Time ofdmaDuration = ppdu->GetTxDuration() - nonOfdmaDuration;
Simulator::Schedule(nonOfdmaDuration,
&PhyEntity::Transmit,
&HePhy::StartTxOfdma,
this,
ofdmaDuration,
hePpdu,
ppdu,
txVector,
"OFDMA transmission");
ofdmaDuration);
}
else
{
@@ -1396,6 +1392,15 @@ HePhy::StartTx(Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector)
}
}
void
HePhy::StartTxOfdma(Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector, Time ofdmaDuration)
{
auto hePpdu = DynamicCast<const HePpdu>(ppdu);
NS_ASSERT(hePpdu);
hePpdu->SetTxPsdFlag(HePpdu::PSD_HE_PORTION);
Transmit(ofdmaDuration, ppdu, txVector, "OFDMA transmission");
}
Time
HePhy::CalculateTxDuration(WifiConstPsduMap psduMap,
const WifiTxVector& txVector,

View File

@@ -475,9 +475,9 @@ class HePhy : public VhtPhy
virtual PhyFieldRxStatus ProcessSigB(Ptr<Event> event, PhyFieldRxStatus status);
/**
* Start receiving the PSDU (i.e. the first symbol of the PSDU has arrived) of an UL-OFDMA
* Start receiving the PSDU (i.e. the first symbol of the PSDU has arrived) of an OFDMA
* transmission. This function is called upon the RX event corresponding to the OFDMA part of
* the UL MU PPDU.
* the MU PPDU.
*
* \param event the event holding incoming OFDMA part of the PPDU's information
*/
@@ -527,6 +527,15 @@ class HePhy : public VhtPhy
uint8_t GetNumberBccEncoders(const WifiTxVector& txVector) const override;
Time GetSymbolDuration(const WifiTxVector& txVector) const override;
/**
* Start the transmission of the OFDMA part of the MU PPDU.
*
* \param ppdu the PPDU
* \param txVector the TXVECTOR
* \param ofdmaDuration the duration of the OFDMA part
*/
void StartTxOfdma(Ptr<const WifiPpdu> ppdu, const WifiTxVector& txVector, Time ofdmaDuration);
/**
* Notify PHY state helper to switch to CCA busy state,
*

View File

@@ -303,7 +303,7 @@ HePpdu::GetTxPsdFlag() const
}
void
HePpdu::SetTxPsdFlag(TxPsdFlag flag)
HePpdu::SetTxPsdFlag(TxPsdFlag flag) const
{
NS_LOG_FUNCTION(this << flag);
m_txPsdFlag = flag;

View File

@@ -230,7 +230,7 @@ class HePpdu : public OfdmPpdu
*
* \see TxPsdFlag
*/
void SetTxPsdFlag(TxPsdFlag flag);
void SetTxPsdFlag(TxPsdFlag flag) const;
/**
* Check if STA ID is in HE SIG-B Content Channel ID
@@ -275,8 +275,8 @@ class HePpdu : public OfdmPpdu
*/
virtual void SetPhyHeaders(const WifiTxVector& txVector, Time ppduDuration);
HeSigHeader m_heSig; //!< the HE-SIG PHY header
TxPsdFlag m_txPsdFlag; //!< the transmit power spectral density flag
HeSigHeader m_heSig; //!< the HE-SIG PHY header
mutable TxPsdFlag m_txPsdFlag; //!< the transmit power spectral density flag
WifiTxVector::HeMuUserInfoMap m_muUserInfos; //!< HE MU specific per-user information (to be
//!< removed once HE-SIG-B headers are implemented)