wifi: Notify RX end only for the last received HE TB PPDU
This commit is contained in:
committed by
Stefano Avallone
parent
55a1578633
commit
c423249242
@@ -70,7 +70,8 @@ const PhyEntity::PpduFormats HePhy::m_hePpduFormats { //Ignoring PE (Packet Exte
|
||||
|
||||
HePhy::HePhy (bool buildModeList /* = true */)
|
||||
: VhtPhy (false), //don't add VHT modes to list
|
||||
m_trigVectorExpirationTime (Seconds (0))
|
||||
m_trigVectorExpirationTime (Seconds (0)),
|
||||
m_rxHeTbPpdus (0)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << buildModeList);
|
||||
m_bssMembershipSelector = HE_PHY;
|
||||
@@ -720,6 +721,34 @@ HePhy::DoStartReceivePayload (Ptr<Event> event)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HePhy::RxPayloadSucceeded (Ptr<const WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
|
||||
const WifiTxVector& txVector, uint16_t staId,
|
||||
const std::vector<bool>& statusPerMpdu)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << *psdu << txVector);
|
||||
m_state->NotifyRxPsduSucceeded (Copy (psdu), rxSignalInfo, txVector, staId, statusPerMpdu);
|
||||
if (!txVector.IsUlMu ())
|
||||
{
|
||||
m_state->SwitchFromRxEndOk ();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rxHeTbPpdus++;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HePhy::RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr, const WifiTxVector& txVector)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << *psdu << txVector << snr);
|
||||
m_state->NotifyRxPsduFailed (Copy (psdu), snr);
|
||||
if (!txVector.IsUlMu ())
|
||||
{
|
||||
m_state->SwitchFromRxEndError ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HePhy::DoEndReceivePayload (Ptr<const WifiPpdu> ppdu)
|
||||
{
|
||||
@@ -739,8 +768,19 @@ HePhy::DoEndReceivePayload (Ptr<const WifiPpdu> ppdu)
|
||||
}
|
||||
if (m_endRxPayloadEvents.empty ())
|
||||
{
|
||||
//We've got the last PPDU of the UL-OFDMA transmission
|
||||
//We've got the last PPDU of the UL-OFDMA transmission.
|
||||
//Indicate a successfull reception is terminated if at least one HE TB PPDU
|
||||
//has been successfully received, otherwise indicate a unsuccessfull reception is terminated.
|
||||
if (m_rxHeTbPpdus > 0)
|
||||
{
|
||||
m_state->SwitchFromRxEndOk ();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_state->SwitchFromRxEndError ();
|
||||
}
|
||||
NotifyInterferenceRxEndAndClear (true); //reset WifiPhy
|
||||
m_rxHeTbPpdus = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -768,6 +808,7 @@ HePhy::StartReceiveOfdmaPayload (Ptr<Event> event)
|
||||
}
|
||||
NS_LOG_FUNCTION (this << *event << it->second);
|
||||
NS_ASSERT (GetCurrentEvent () != 0);
|
||||
NS_ASSERT (m_rxHeTbPpdus == 0);
|
||||
auto itEvent = m_beginOfdmaPayloadRxEvents.find (GetStaId (ppdu));
|
||||
/**
|
||||
* m_beginOfdmaPayloadRxEvents should still be running only for APs, since canceled in StartReceivePayload for STAs.
|
||||
|
||||
@@ -388,6 +388,10 @@ protected:
|
||||
bool IsConfigSupported (Ptr<const WifiPpdu> ppdu) const override;
|
||||
void DoStartReceivePayload (Ptr<Event> event) override;
|
||||
std::pair<uint16_t, WifiSpectrumBand> GetChannelWidthAndBand (const WifiTxVector& txVector, uint16_t staId) const override;
|
||||
void RxPayloadSucceeded (Ptr<const WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
|
||||
const WifiTxVector& txVector, uint16_t staId,
|
||||
const std::vector<bool>& statusPerMpdu) override;
|
||||
void RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr, const WifiTxVector& txVector) override;
|
||||
void DoEndReceivePayload (Ptr<const WifiPpdu> ppdu) override;
|
||||
void DoResetReceive (Ptr<Event> event) override;
|
||||
void DoAbortCurrentReception (WifiPhyRxfailureReason reason) override;
|
||||
@@ -462,6 +466,8 @@ private:
|
||||
WifiPhyBand band);
|
||||
|
||||
static const PpduFormats m_hePpduFormats; //!< HE PPDU formats
|
||||
|
||||
std::size_t m_rxHeTbPpdus; //!< Number of successfully received HE TB PPDUS
|
||||
}; //class HePhy
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
@@ -662,7 +662,7 @@ PhyEntity::EndReceivePayload (Ptr<Event> event)
|
||||
}
|
||||
else
|
||||
{
|
||||
RxPayloadFailed (psdu, snr);
|
||||
RxPayloadFailed (psdu, snr, txVector);
|
||||
}
|
||||
|
||||
DoEndReceivePayload (ppdu);
|
||||
@@ -674,13 +674,15 @@ PhyEntity::RxPayloadSucceeded (Ptr<const WifiPsdu> psdu, RxSignalInfo rxSignalIn
|
||||
const WifiTxVector& txVector, uint16_t staId,
|
||||
const std::vector<bool>& statusPerMpdu)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << *psdu << txVector);
|
||||
m_state->NotifyRxPsduSucceeded (Copy (psdu), rxSignalInfo, txVector, staId, statusPerMpdu);
|
||||
m_state->SwitchFromRxEndOk ();
|
||||
}
|
||||
|
||||
void
|
||||
PhyEntity::RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr)
|
||||
PhyEntity::RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr, const WifiTxVector& txVector)
|
||||
{
|
||||
NS_LOG_FUNCTION (this << *psdu << txVector << snr);
|
||||
m_state->NotifyRxPsduFailed (Copy (psdu), snr);
|
||||
m_state->SwitchFromRxEndError ();
|
||||
}
|
||||
|
||||
@@ -658,8 +658,9 @@ protected:
|
||||
*
|
||||
* \param psdu the PSDU that we failed to received
|
||||
* \param snr the SNR of the received PSDU in linear scale
|
||||
* \param txVector TXVECTOR of the PSDU
|
||||
*/
|
||||
virtual void RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr);
|
||||
virtual void RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr, const WifiTxVector& txVector);
|
||||
|
||||
/**
|
||||
* Perform amendment-specific actions at the end of the reception of
|
||||
|
||||
Reference in New Issue
Block a user