wifi: Handle RX end notifications to WifiPhyStateHelper in seperate functions
This commit is contained in:
committed by
Stefano Avallone
parent
719011058b
commit
5855aefa17
@@ -657,18 +657,32 @@ PhyEntity::EndReceivePayload (Ptr<Event> event)
|
||||
RxSignalInfo rxSignalInfo;
|
||||
rxSignalInfo.snr = snr;
|
||||
rxSignalInfo.rssi = signalNoiseIt->second.signal; //same information for all MPDUs
|
||||
m_state->SwitchFromRxEndOk (Copy (psdu), rxSignalInfo, txVector, staId, statusPerMpduIt->second);
|
||||
RxPayloadSucceeded (psdu, rxSignalInfo, txVector, staId, statusPerMpduIt->second);
|
||||
m_wifiPhy->m_previouslyRxPpduUid = ppdu->GetUid (); //store UID only if reception is successful (because otherwise trigger won't be read by MAC layer)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_state->SwitchFromRxEndError (Copy (psdu), snr);
|
||||
RxPayloadFailed (psdu, snr);
|
||||
}
|
||||
|
||||
DoEndReceivePayload (ppdu);
|
||||
m_wifiPhy->SwitchMaybeToCcaBusy (GetMeasurementChannelWidth (ppdu));
|
||||
}
|
||||
|
||||
void
|
||||
PhyEntity::RxPayloadSucceeded (Ptr<const WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
|
||||
const WifiTxVector& txVector, uint16_t staId,
|
||||
const std::vector<bool>& statusPerMpdu)
|
||||
{
|
||||
m_state->SwitchFromRxEndOk (Copy (psdu), rxSignalInfo, txVector, staId, statusPerMpdu);
|
||||
}
|
||||
|
||||
void
|
||||
PhyEntity::RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr)
|
||||
{
|
||||
m_state->SwitchFromRxEndError (Copy (psdu), snr);
|
||||
}
|
||||
|
||||
void
|
||||
PhyEntity::DoEndReceivePayload (Ptr<const WifiPpdu> ppdu)
|
||||
{
|
||||
|
||||
@@ -641,6 +641,26 @@ protected:
|
||||
*/
|
||||
void ScheduleEndOfMpdus (Ptr<Event> event);
|
||||
|
||||
/**
|
||||
* Perform amendment-specific actions when the payload is successfully received.
|
||||
*
|
||||
* \param psdu the successfully received PSDU
|
||||
* \param rxSignalInfo the info on the received signal (\see RxSignalInfo)
|
||||
* \param txVector TXVECTOR of the PSDU
|
||||
* \param staId the station ID of the PSDU (only used for MU)
|
||||
* \param statusPerMpdu reception status per MPDU
|
||||
*/
|
||||
virtual void RxPayloadSucceeded (Ptr<const WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
|
||||
const WifiTxVector& txVector, uint16_t staId,
|
||||
const std::vector<bool>& statusPerMpdu);
|
||||
/**
|
||||
* Perform amendment-specific actions when the payload is unsuccessfully received.
|
||||
*
|
||||
* \param psdu the PSDU that we failed to received
|
||||
* \param snr the SNR of the received PSDU in linear scale
|
||||
*/
|
||||
virtual void RxPayloadFailed (Ptr<const WifiPsdu> psdu, double snr);
|
||||
|
||||
/**
|
||||
* Perform amendment-specific actions at the end of the reception of
|
||||
* the payload.
|
||||
|
||||
Reference in New Issue
Block a user