From dfd8d72c2772f3e22066fff64b0f67c117ffec01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sun, 18 Feb 2018 09:31:53 +0100 Subject: [PATCH] wifi: Fix some unused function parameters (based on Robert Ammon's patch) --- src/wifi/helper/athstats-helper.cc | 3 +-- src/wifi/test/spectrum-wifi-phy-test.cc | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/wifi/helper/athstats-helper.cc b/src/wifi/helper/athstats-helper.cc index 5ce03c6ea..06cd6820f 100644 --- a/src/wifi/helper/athstats-helper.cc +++ b/src/wifi/helper/athstats-helper.cc @@ -222,7 +222,7 @@ AthstatsWifiTraceSink::PhyRxErrorTrace (std::string context, Ptr p void AthstatsWifiTraceSink::PhyTxTrace (std::string context, Ptr packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower) { - NS_LOG_FUNCTION (this << context << packet << "PHYTX mode=" << mode ); + NS_LOG_FUNCTION (this << context << packet << "PHYTX mode=" << mode << "Preamble=" << preamble << "Power=" << txPower); ++m_phyTxCount; } @@ -230,7 +230,6 @@ void AthstatsWifiTraceSink::PhyStateTrace (std::string context, Time start, Time duration, WifiPhy::State state) { NS_LOG_FUNCTION (this << context << start << duration << state); - } void diff --git a/src/wifi/test/spectrum-wifi-phy-test.cc b/src/wifi/test/spectrum-wifi-phy-test.cc index 67e09b9db..c44673c15 100644 --- a/src/wifi/test/spectrum-wifi-phy-test.cc +++ b/src/wifi/test/spectrum-wifi-phy-test.cc @@ -25,9 +25,12 @@ #include "ns3/wifi-mac-trailer.h" #include "ns3/wifi-phy-tag.h" #include "ns3/wifi-spectrum-signal-parameters.h" +#include "ns3/log.h" using namespace ns3; +NS_LOG_COMPONENT_DEFINE("SpectrumWifiPhyBasicTest"); + static const uint8_t CHANNEL_NUMBER = 36; static const uint32_t FREQUENCY = 5180; // MHz static const uint8_t CHANNEL_WIDTH = 20; // MHz @@ -134,12 +137,14 @@ SpectrumWifiPhyBasicTest::SendSignal (double txPowerWatts) void SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxSuccess (Ptr p, double snr, WifiTxVector txVector) { + NS_LOG_FUNCTION(this << p << snr << txVector); m_count++; } void SpectrumWifiPhyBasicTest::SpectrumWifiPhyRxFailure (Ptr p, double snr) { + NS_LOG_FUNCTION(this << p << snr); m_count++; } @@ -207,21 +212,26 @@ public: } virtual void NotifyRxStart (Time duration) { + NS_LOG_FUNCTION (this << duration); ++m_notifyRxStart; } virtual void NotifyRxEndOk (void) { + NS_LOG_FUNCTION (this); ++m_notifyRxEndOk; } virtual void NotifyRxEndError (void) { + NS_LOG_FUNCTION (this); ++m_notifyRxEndError; } virtual void NotifyTxStart (Time duration, double txPowerDbm) { + NS_LOG_FUNCTION (this << duration << txPowerDbm); } virtual void NotifyMaybeCcaBusyStart (Time duration) { + NS_LOG_FUNCTION (this); ++m_notifyMaybeCcaBusyStart; } virtual void NotifySwitchingStart (Time duration)