From 3bd5db3da4dbb1dbd58f11748ea6d1c2c752dba8 Mon Sep 17 00:00:00 2001 From: Rediet Date: Tue, 26 Mar 2019 15:21:31 +0100 Subject: [PATCH] wifi: Add per-MPDU reception status to NotifyMonitorSniffRx --- src/wifi/model/wifi-phy.cc | 5 +++-- src/wifi/model/wifi-phy.h | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 21b372e7c..b431846d0 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -2374,7 +2374,8 @@ WifiPhy::NotifyRxDrop (Ptr packet) } void -WifiPhy::NotifyMonitorSniffRx (Ptr packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise) +WifiPhy::NotifyMonitorSniffRx (Ptr packet, uint16_t channelFreqMhz, WifiTxVector txVector, + MpduInfo aMpdu, SignalNoiseDbm signalNoise, std::vector statusPerMpdu) { m_phyMonitorSniffRxTrace (packet, channelFreqMhz, txVector, aMpdu, signalNoise); } @@ -2765,7 +2766,7 @@ WifiPhy::EndReceive (Ptr packet, WifiPreamble preamble, MpduType mpdutyp aMpdu.type = mpdutype; aMpdu.mpduRefNumber = m_rxMpduReferenceNumber; std::vector statusPerMpdu {true}; //TODO update when A-MPDUs are handled as single packet - NotifyMonitorSniffRx (packet, GetFrequency (), event->GetTxVector (), aMpdu, signalNoise); + NotifyMonitorSniffRx (packet, GetFrequency (), event->GetTxVector (), aMpdu, signalNoise, statusPerMpdu); m_state->SwitchFromRxEndOk (packet, snrPer.snr, event->GetTxVector (), statusPerMpdu); } else diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index c56af9fd0..5f86322db 100644 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -1158,12 +1158,14 @@ public: * \param aMpdu the type of the packet (0 is not A-MPDU, 1 is a MPDU that is part of an A-MPDU and 2 is the last MPDU in an A-MPDU) * and the A-MPDU reference number (must be a different value for each A-MPDU but the same for each subframe within one A-MPDU) * \param signalNoise signal power and noise power in dBm (noise power includes the noise figure) + * \param statusPerMpdu reception status per MPDU */ void NotifyMonitorSniffRx (Ptr packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, - SignalNoiseDbm signalNoise); + SignalNoiseDbm signalNoise, + std::vector statusPerMpdu); /** * TracedCallback signature for monitor mode receive events.