From b7e891ccfa50b8d9db2022f400aa76e7062f462b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Thu, 9 Jul 2015 18:20:34 +0200 Subject: [PATCH] rename snrDbm to snrDb --- src/wave/helper/wave-helper.cc | 2 +- src/wifi/helper/yans-wifi-helper.cc | 2 +- src/wifi/model/wifi-phy.cc | 2 +- src/wifi/model/wifi-phy.h | 12 ++++++------ src/wifi/model/yans-wifi-phy.cc | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wave/helper/wave-helper.cc b/src/wave/helper/wave-helper.cc index deb9a6573..30df04c9d 100644 --- a/src/wave/helper/wave-helper.cc +++ b/src/wave/helper/wave-helper.cc @@ -243,7 +243,7 @@ PcapSniffRxEvent ( WifiPreamble preamble, WifiTxVector txvector, struct mpduInfo aMpdu, - struct snrDbm snr) + struct snrDb snr) { uint32_t dlt = file->GetDataLinkType (); diff --git a/src/wifi/helper/yans-wifi-helper.cc b/src/wifi/helper/yans-wifi-helper.cc index 9fe527f23..309b0e3be 100644 --- a/src/wifi/helper/yans-wifi-helper.cc +++ b/src/wifi/helper/yans-wifi-helper.cc @@ -405,7 +405,7 @@ PcapSniffRxEvent ( WifiPreamble preamble, WifiTxVector txvector, struct mpduInfo aMpdu, - struct snrDbm snr) + struct snrDb snr) { uint32_t dlt = file->GetDataLinkType (); diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 158211408..94097d144 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -592,7 +592,7 @@ WifiPhy::NotifyRxDrop (Ptr packet) } void -WifiPhy::NotifyMonitorSniffRx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDbm snr) +WifiPhy::NotifyMonitorSniffRx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDb snr) { m_phyMonitorSniffRxTrace (packet, channelFreqMhz, channelNumber, rate, preamble, txvector, aMpdu, snr); } diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index d07a04bd0..804a84531 100644 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -38,7 +38,7 @@ namespace ns3 { class WifiChannel; class NetDevice; -struct snrDbm +struct snrDb { double signal; double noise; @@ -1014,11 +1014,11 @@ public: * \param txVector the txvector that holds rx parameters * \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 snr signal power and noise power in dBm + * \param snr signal power and noise power in dB */ void NotifyMonitorSniffRx (Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, - WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDbm snr); + WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDb snr); /** * TracedCallback signature for monitor mode receive events. @@ -1039,11 +1039,11 @@ public: * \param txVector the txvector that holds rx parameters * \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 snr signal power and noise power in dBm + * \param snr signal power and noise power in dB */ typedef void (* MonitorSnifferRxCallback)(Ptr packet, uint16_t channelFreqMhz, uint16_t channelNumber, uint32_t rate, WifiPreamble preamble, - WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDbm snr); + WifiTxVector txvector, struct mpduInfo aMpdu, struct snrDb snr); /** * Public method used to fire a MonitorSniffer trace for a wifi packet being transmitted. @@ -1216,7 +1216,7 @@ private: * * \see class CallBackTraceSource */ - TracedCallback, uint16_t, uint16_t, uint32_t, WifiPreamble, WifiTxVector, struct mpduInfo, struct snrDbm> m_phyMonitorSniffRxTrace; + TracedCallback, uint16_t, uint16_t, uint32_t, WifiPreamble, WifiTxVector, struct mpduInfo, struct snrDb> m_phyMonitorSniffRxTrace; /** * A trace source that emulates a wifi device in monitor mode diff --git a/src/wifi/model/yans-wifi-phy.cc b/src/wifi/model/yans-wifi-phy.cc index ad3c79f7d..c2b9f996b 100644 --- a/src/wifi/model/yans-wifi-phy.cc +++ b/src/wifi/model/yans-wifi-phy.cc @@ -1108,7 +1108,7 @@ YansWifiPhy::EndReceive (Ptr packet, enum WifiPreamble preamble, struct { dataRate500KbpsUnits = event->GetPayloadMode ().GetDataRate () * event->GetTxVector ().GetNss () / 500000; } - struct snrDbm snr; + struct snrDb snr; snr.signal = RatioToDb (event->GetRxPowerW ()) + 30; snr.noise = RatioToDb (event->GetRxPowerW () / snrPer.snr) - GetRxNoiseFigure () + 30; NotifyMonitorSniffRx (packet, (uint16_t)GetChannelFrequencyMhz (), GetChannelNumber (), dataRate500KbpsUnits, event->GetPreambleType (), event->GetTxVector (), aMpdu, snr);