A Discrete-Event Network Simulator
API
wifi-phy-thresholds-test.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2018
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
19  */
20 
21 #include "ns3/log.h"
22 #include "ns3/test.h"
23 #include "ns3/spectrum-wifi-helper.h"
24 #include "ns3/wifi-spectrum-value-helper.h"
25 #include "ns3/spectrum-wifi-phy.h"
26 #include "ns3/nist-error-rate-model.h"
27 #include "ns3/wifi-mac-header.h"
28 #include "ns3/wifi-spectrum-signal-parameters.h"
29 #include "ns3/wifi-utils.h"
30 #include "ns3/wifi-psdu.h"
31 #include "ns3/ofdm-ppdu.h"
32 #include "ns3/ofdm-phy.h"
33 
34 using namespace ns3;
35 
36 NS_LOG_COMPONENT_DEFINE ("WifiPhyThresholdsTest");
37 
38 static const uint8_t CHANNEL_NUMBER = 36;
39 static const uint32_t FREQUENCY = 5180; //MHz
40 static const uint16_t CHANNEL_WIDTH = 20; //MHz
41 
49 {
50 public:
56  WifiPhyThresholdsTest (std::string test_name);
60  virtual ~WifiPhyThresholdsTest ();
61 
62 protected:
68  virtual Ptr<SpectrumSignalParameters> MakeWifiSignal (double txPowerWatts);
74  virtual Ptr<SpectrumSignalParameters> MakeForeignSignal (double txPowerWatts);
80  virtual void SendSignal (double txPowerWatts, bool wifiSignal);
88  virtual void RxSuccess (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
89  WifiTxVector txVector, std::vector<bool> statusPerMpdu);
94  virtual void RxFailure (Ptr<WifiPsdu> psdu);
100  void RxDropped (Ptr<const Packet> p, WifiPhyRxfailureReason reason);
107  virtual void PhyStateChanged (Time start, Time duration, WifiPhyState newState);
108 
110  uint32_t m_rxSuccess;
111  uint32_t m_rxFailure;
112  uint32_t m_rxDropped;
113  uint32_t m_stateChanged;
114  uint32_t m_rxStateCount;
115  uint32_t m_idleStateCount;
117 
118 private:
119  void DoSetup (void) override;
120  void DoTeardown (void) override;
121 };
122 
124  : TestCase (test_name),
125  m_rxSuccess (0),
126  m_rxFailure (0),
127  m_rxDropped (0),
128  m_stateChanged (0),
129  m_rxStateCount (0),
130  m_idleStateCount (0),
131  m_ccabusyStateCount (0)
132 {
133 }
134 
136 {
137 }
138 
141 {
142  WifiTxVector txVector = WifiTxVector (OfdmPhy::GetOfdmRate6Mbps (), 0, WIFI_PREAMBLE_LONG, 800, 1, 1, 0, 20, false);
143 
144  Ptr<Packet> pkt = Create<Packet> (1000);
145  WifiMacHeader hdr;
146 
148  hdr.SetQosTid (0);
149 
150  Ptr<WifiPsdu> psdu = Create<WifiPsdu> (pkt, hdr);
151  Time txDuration = m_phy->CalculateTxDuration (psdu->GetSize (), txVector, m_phy->GetPhyBand ());
152 
153  Ptr<WifiPpdu> ppdu = Create<OfdmPpdu> (psdu, txVector, WIFI_PHY_BAND_5GHZ, 0);
154 
155  Ptr<SpectrumValue> txPowerSpectrum = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (FREQUENCY, CHANNEL_WIDTH, txPowerWatts, CHANNEL_WIDTH);
156  Ptr<WifiSpectrumSignalParameters> txParams = Create<WifiSpectrumSignalParameters> ();
157  txParams->psd = txPowerSpectrum;
158  txParams->txPhy = 0;
159  txParams->duration = txDuration;
160  txParams->ppdu = ppdu;
161  return txParams;
162 }
163 
166 {
167  Ptr<SpectrumValue> txPowerSpectrum = WifiSpectrumValueHelper::CreateHeOfdmTxPowerSpectralDensity (FREQUENCY, CHANNEL_WIDTH, txPowerWatts, CHANNEL_WIDTH);
168  Ptr<SpectrumSignalParameters> txParams = Create<SpectrumSignalParameters> ();
169  txParams->psd = txPowerSpectrum;
170  txParams->txPhy = 0;
171  txParams->duration = Seconds (0.5);
172  return txParams;
173 }
174 
175 void
176 WifiPhyThresholdsTest::SendSignal (double txPowerWatts, bool wifiSignal)
177 {
178  if (wifiSignal)
179  {
180  m_phy->StartRx (MakeWifiSignal (txPowerWatts));
181  }
182  else
183  {
184  m_phy->StartRx (MakeForeignSignal (txPowerWatts));
185  }
186 }
187 
188 void
190  WifiTxVector txVector, std::vector<bool> statusPerMpdu)
191 {
192  NS_LOG_FUNCTION (this << *psdu << rxSignalInfo << txVector);
193  m_rxSuccess++;
194 }
195 
196 void
198 {
199  NS_LOG_FUNCTION (this << *psdu);
200  m_rxFailure++;
201 }
202 
203 void
205 {
206  NS_LOG_FUNCTION (this << p << reason);
207  m_rxDropped++;
208 }
209 
210 void
212 {
213  NS_LOG_FUNCTION (this << start << duration << newState);
214  m_stateChanged++;
215  if (newState == WifiPhyState::IDLE)
216  {
218  }
219  else if (newState == WifiPhyState::RX)
220  {
221  m_rxStateCount++;
222  }
223  else if (newState == WifiPhyState::CCA_BUSY)
224  {
226  }
227 }
228 
229 void
231 {
232  m_phy = CreateObject<SpectrumWifiPhy> ();
234  Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
235  m_phy->SetErrorRateModel (error);
241  m_phy->GetState ()->TraceConnectWithoutContext ("State", MakeCallback (&WifiPhyThresholdsTest::PhyStateChanged, this));
242 }
243 
244 void
246 {
247  m_phy->Dispose ();
248  m_phy = 0;
249 }
250 
261 {
262 public:
265  virtual void DoRun (void);
266 };
267 
269  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test weak wifi signal reception")
270 {
271 }
272 
274 {
275 }
276 
277 void
279 {
280  double txPowerWatts = DbmToW (-110);
281 
282  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsWeakWifiSignalTest::SendSignal, this, txPowerWatts, true);
283 
284  Simulator::Run ();
285  Simulator::Destroy ();
286 
287  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxSuccess + m_rxFailure, 0, "Reception should not have been triggered if packet is weaker than RxSensitivity threshold");
288  NS_TEST_ASSERT_MSG_EQ (m_stateChanged, 0, "State should stay idle if reception involves a signal weaker than RxSensitivity threshold");
289 }
290 
301 {
302 public:
305  virtual void DoRun (void);
306 };
307 
309  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test weak foreign signal reception")
310 {
311 }
312 
314 {
315 }
316 
317 void
319 {
320  double txPowerWatts = DbmToW (-90);
321 
322  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsWeakForeignSignalTest::SendSignal, this, txPowerWatts, false);
323 
324  Simulator::Run ();
325  Simulator::Destroy ();
326 
327  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxSuccess + m_rxFailure, 0, "Reception of non-wifi packet should not be triggered");
328  NS_TEST_ASSERT_MSG_EQ (m_stateChanged, 0, "State should stay idle if reception involves a signal weaker than RxSensitivity threshold");
329 }
330 
341 {
342 public:
345  virtual void DoRun (void);
346 };
347 
349  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test strong wifi signal reception")
350 {
351 }
352 
354 {
355 }
356 
357 void
359 {
360  double txPowerWatts = DbmToW (-60);
361 
362  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsStrongWifiSignalTest::SendSignal, this, txPowerWatts, true);
363 
364  Simulator::Run ();
365  Simulator::Destroy ();
366 
367  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxFailure, 0, "Packet reception should have been successfull");
368  NS_TEST_ASSERT_MSG_EQ (m_rxSuccess, 1, "Packet should have been successfully received");
369  NS_TEST_ASSERT_MSG_EQ (m_ccabusyStateCount, 2, "State should have moved to CCA_BUSY once");
370  NS_TEST_ASSERT_MSG_EQ (m_stateChanged, 4, "State should have moved to CCA_BUSY, then to RX and finally back to IDLE");
371  NS_TEST_ASSERT_MSG_EQ (m_rxStateCount, 1, "State should have moved to RX once");
372  NS_TEST_ASSERT_MSG_EQ (m_idleStateCount, 1, "State should have moved to IDLE once");
373 }
374 
385 {
386 public:
389  virtual void DoRun (void);
390 };
391 
393  : WifiPhyThresholdsTest ("WifiPhy reception thresholds: test weak foreign signal reception")
394 {
395 }
396 
398 {
399 }
400 
401 void
403 {
404  double txPowerWatts = DbmToW (-60);
405 
406  Simulator::Schedule (Seconds (1), &WifiPhyThresholdsStrongForeignSignalTest::SendSignal, this, txPowerWatts, false);
407 
408  Simulator::Run ();
409  Simulator::Destroy ();
410 
411  NS_TEST_ASSERT_MSG_EQ (m_rxDropped + m_rxSuccess + m_rxFailure, 0, "Reception of non-wifi packet should not be triggered");
412  NS_TEST_ASSERT_MSG_EQ (m_idleStateCount, 1, "State should have moved to CCA-BUSY then back to IDLE");
413 }
414 
422 {
423 public:
425 };
426 
428  : TestSuite ("wifi-phy-thresholds", UNIT)
429 {
430  AddTestCase (new WifiPhyThresholdsWeakWifiSignalTest, TestCase::QUICK);
432  AddTestCase (new WifiPhyThresholdsStrongWifiSignalTest, TestCase::QUICK);
434 }
435 
WifiPhyThresholdsWeakWifiSignalTest::DoRun
virtual void DoRun(void)
Implementation to actually run this TestCase.
Definition: wifi-phy-thresholds-test.cc:278
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::SpectrumSignalParameters::psd
Ptr< SpectrumValue > psd
The Power Spectral Density of the waveform, in linear units.
Definition: spectrum-signal-parameters.h:94
ns3::TestCase::AddTestCase
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:299
CHANNEL_NUMBER
static const uint8_t CHANNEL_NUMBER
Definition: wifi-phy-thresholds-test.cc:38
ns3::Object::Dispose
void Dispose(void)
Dispose of this Object.
Definition: object.cc:214
WifiPhyThresholdsTest
Wifi Phy Threshold Test base class.
Definition: wifi-phy-thresholds-test.cc:49
WifiPhyThresholdsTest::m_rxFailure
uint32_t m_rxFailure
count number of unsuccessfully received packets
Definition: wifi-phy-thresholds-test.cc:111
WifiPhyThresholdsTest::DoTeardown
void DoTeardown(void) override
Implementation to do any local setup required for this TestCase.
Definition: wifi-phy-thresholds-test.cc:245
WifiPhyThresholdsWeakWifiSignalTest
Wifi Phy Threshold Weak Wifi Signal Test.
Definition: wifi-phy-thresholds-test.cc:261
ns3::SpectrumWifiPhy::StartRx
void StartRx(Ptr< SpectrumSignalParameters > rxParams)
Input method for delivering a signal from the spectrum channel and low-level PHY interface to this Sp...
Definition: spectrum-wifi-phy.cc:283
ns3::SpectrumWifiPhy::SetChannelNumber
void SetChannelNumber(uint8_t id) override
Set channel number.
Definition: spectrum-wifi-phy.cc:239
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
RX
@ RX
The PHY layer is receiving a packet.
Definition: wifi-phy-state.h:48
ns3::WifiPhy::CalculateTxDuration
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
Definition: wifi-phy.cc:1610
WifiPhyThresholdsStrongForeignSignalTest::~WifiPhyThresholdsStrongForeignSignalTest
virtual ~WifiPhyThresholdsStrongForeignSignalTest()
Definition: wifi-phy-thresholds-test.cc:397
WifiPhyThresholdsTest::PhyStateChanged
virtual void PhyStateChanged(Time start, Time duration, WifiPhyState newState)
PHY state changed callback function.
Definition: wifi-phy-thresholds-test.cc:211
IDLE
@ IDLE
The PHY layer is IDLE.
Definition: wifi-phy-state.h:36
ns3::WIFI_PHY_BAND_5GHZ
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Definition: wifi-phy-band.h:37
WifiPhyThresholdsTest::RxDropped
void RxDropped(Ptr< const Packet > p, WifiPhyRxfailureReason reason)
PHY dropped packet callback function.
Definition: wifi-phy-thresholds-test.cc:204
ns3::SpectrumSignalParameters::txPhy
Ptr< SpectrumPhy > txPhy
The SpectrumPhy instance that is making the transmission.
Definition: spectrum-signal-parameters.h:107
WifiPhyThresholdsWeakForeignSignalTest
Wifi Phy Threshold Weak Foreign Signal Test.
Definition: wifi-phy-thresholds-test.cc:301
ns3::SpectrumWifiPhy::ConfigureStandardAndBand
void ConfigureStandardAndBand(WifiPhyStandard standard, WifiPhyBand band) override
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: spectrum-wifi-phy.cc:272
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition: wifi-tx-vector.h:71
WifiPhyThresholdsTest::m_phy
Ptr< SpectrumWifiPhy > m_phy
PHY object.
Definition: wifi-phy-thresholds-test.cc:109
ns3::WifiPhy::SetReceiveOkCallback
void SetReceiveOkCallback(RxOkCallback callback)
Definition: wifi-phy.cc:635
WifiPhyThresholdsTest::m_stateChanged
uint32_t m_stateChanged
count number of PHY state change
Definition: wifi-phy-thresholds-test.cc:113
CCA_BUSY
@ CCA_BUSY
The PHY layer has sense the medium busy through the CCA mechanism.
Definition: wifi-phy-state.h:40
WifiPhyThresholdsTest::RxFailure
virtual void RxFailure(Ptr< WifiPsdu > psdu)
PHY receive failure callback function.
Definition: wifi-phy-thresholds-test.cc:197
WifiPhyThresholdsStrongForeignSignalTest
Wifi Phy Threshold Strong Foreign Signal Test.
Definition: wifi-phy-thresholds-test.cc:385
wifiPhyThresholdsTestSuite
static WifiPhyThresholdsTestSuite wifiPhyThresholdsTestSuite
the test suite
Definition: wifi-phy-thresholds-test.cc:436
ns3::TestCase
encapsulates test code
Definition: test.h:1154
WifiPhyThresholdsWeakWifiSignalTest::WifiPhyThresholdsWeakWifiSignalTest
WifiPhyThresholdsWeakWifiSignalTest()
Definition: wifi-phy-thresholds-test.cc:268
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition: wifi-mac-header.h:85
ns3::WifiPhy::GetState
Ptr< WifiPhyStateHelper > GetState(void) const
Return the WifiPhyStateHelper of this PHY.
Definition: wifi-phy.cc:629
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::WIFI_PHY_STANDARD_80211ax
@ WIFI_PHY_STANDARD_80211ax
HE PHY (clause 26)
Definition: wifi-standards.h:49
WifiPhyThresholdsTest::m_rxSuccess
uint32_t m_rxSuccess
count number of successfully received packets
Definition: wifi-phy-thresholds-test.cc:110
visualizer.core.start
def start()
Definition: core.py:1855
WifiPhyThresholdsTest::WifiPhyThresholdsTest
WifiPhyThresholdsTest(std::string test_name)
Constructor.
Definition: wifi-phy-thresholds-test.cc:123
ns3::WifiPhyRxfailureReason
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
Definition: wifi-phy-common.h:263
WifiPhyThresholdsTest::MakeWifiSignal
virtual Ptr< SpectrumSignalParameters > MakeWifiSignal(double txPowerWatts)
Make wifi signal function.
Definition: wifi-phy-thresholds-test.cc:140
ns3::WifiPhy::SetReceiveErrorCallback
void SetReceiveErrorCallback(RxErrorCallback callback)
Definition: wifi-phy.cc:641
WifiPhyThresholdsTest::m_idleStateCount
uint32_t m_idleStateCount
count number of PHY state change to IDLE state
Definition: wifi-phy-thresholds-test.cc:115
CHANNEL_WIDTH
static const uint16_t CHANNEL_WIDTH
Definition: wifi-phy-thresholds-test.cc:40
WifiPhyThresholdsWeakForeignSignalTest::~WifiPhyThresholdsWeakForeignSignalTest
virtual ~WifiPhyThresholdsWeakForeignSignalTest()
Definition: wifi-phy-thresholds-test.cc:313
ns3::WifiPsdu::GetSize
uint32_t GetSize(void) const
Return the size of the PSDU in bytes.
Definition: wifi-psdu.cc:260
ns3::WifiPhy::GetPhyBand
WifiPhyBand GetPhyBand(void) const
Get the configured Wi-Fi band.
Definition: wifi-phy.cc:1124
ns3::WifiSpectrumSignalParameters::ppdu
Ptr< WifiPpdu > ppdu
The PPDU being transmitted.
Definition: wifi-spectrum-signal-parameters.h:53
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
WifiPhyThresholdsWeakForeignSignalTest::WifiPhyThresholdsWeakForeignSignalTest
WifiPhyThresholdsWeakForeignSignalTest()
Definition: wifi-phy-thresholds-test.cc:308
WifiPhyThresholdsStrongWifiSignalTest::~WifiPhyThresholdsStrongWifiSignalTest
virtual ~WifiPhyThresholdsStrongWifiSignalTest()
Definition: wifi-phy-thresholds-test.cc:353
ns3::SpectrumSignalParameters::duration
Time duration
The duration of the packet transmission.
Definition: spectrum-signal-parameters.h:102
WifiPhyThresholdsStrongForeignSignalTest::DoRun
virtual void DoRun(void)
Implementation to actually run this TestCase.
Definition: wifi-phy-thresholds-test.cc:402
ns3::MakeCallback
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
WifiPhyState
WifiPhyState
The state of the PHY layer.
Definition: wifi-phy-state.h:32
WifiPhyThresholdsTest::m_rxDropped
uint32_t m_rxDropped
count number of dropped packets
Definition: wifi-phy-thresholds-test.cc:112
ns3::WIFI_PREAMBLE_LONG
@ WIFI_PREAMBLE_LONG
Definition: wifi-phy-common.h:69
ns3::TestSuite
A suite of tests to run.
Definition: test.h:1344
WifiPhyThresholdsWeakWifiSignalTest::~WifiPhyThresholdsWeakWifiSignalTest
virtual ~WifiPhyThresholdsWeakWifiSignalTest()
Definition: wifi-phy-thresholds-test.cc:273
NS_TEST_ASSERT_MSG_EQ
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition: test.h:166
ns3::DbmToW
double DbmToW(double dBm)
Convert from dBm to Watts.
Definition: wifi-utils.cc:37
WifiPhyThresholdsStrongForeignSignalTest::WifiPhyThresholdsStrongForeignSignalTest
WifiPhyThresholdsStrongForeignSignalTest()
Definition: wifi-phy-thresholds-test.cc:392
ns3::RxSignalInfo
RxSignalInfo structure containing info on the received signal.
Definition: phy-entity.h:67
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
WifiPhyThresholdsTestSuite
Wifi Phy Thresholds Test Suite.
Definition: wifi-phy-thresholds-test.cc:422
ns3::WIFI_MAC_QOSDATA
@ WIFI_MAC_QOSDATA
Definition: wifi-mac-header.h:70
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition: log-macros-enabled.h:244
WifiPhyThresholdsTest::SendSignal
virtual void SendSignal(double txPowerWatts, bool wifiSignal)
Send signal function.
Definition: wifi-phy-thresholds-test.cc:176
WifiPhyThresholdsTest::RxSuccess
virtual void RxSuccess(Ptr< WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
PHY receive success callback function.
Definition: wifi-phy-thresholds-test.cc:189
WifiPhyThresholdsTestSuite::WifiPhyThresholdsTestSuite
WifiPhyThresholdsTestSuite()
Definition: wifi-phy-thresholds-test.cc:427
ns3::SpectrumWifiPhy::SetFrequency
void SetFrequency(uint16_t freq) override
If the operating channel for this object has not been set yet, the given center frequency is saved an...
Definition: spectrum-wifi-phy.cc:250
ns3::WifiMacHeader::SetType
void SetType(WifiMacType type, bool resetToDsFromDs=true)
Set Type/Subtype values with the correct values depending on the given type.
Definition: wifi-mac-header.cc:132
WifiPhyThresholdsWeakForeignSignalTest::DoRun
virtual void DoRun(void)
Implementation to actually run this TestCase.
Definition: wifi-phy-thresholds-test.cc:318
WifiPhyThresholdsStrongWifiSignalTest::WifiPhyThresholdsStrongWifiSignalTest
WifiPhyThresholdsStrongWifiSignalTest()
Definition: wifi-phy-thresholds-test.cc:348
WifiPhyThresholdsStrongWifiSignalTest::DoRun
virtual void DoRun(void)
Implementation to actually run this TestCase.
Definition: wifi-phy-thresholds-test.cc:358
ns3::ObjectBase::TraceConnectWithoutContext
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
Definition: object-base.cc:293
WifiPhyThresholdsStrongWifiSignalTest
Wifi Phy Threshold Strong Wifi Signal Test.
Definition: wifi-phy-thresholds-test.cc:341
WifiPhyThresholdsTest::m_rxStateCount
uint32_t m_rxStateCount
count number of PHY state change to RX state
Definition: wifi-phy-thresholds-test.cc:114
FREQUENCY
static const uint32_t FREQUENCY
Definition: wifi-phy-thresholds-test.cc:39
ns3::WifiMacHeader::SetQosTid
void SetQosTid(uint8_t tid)
Set the TID for the QoS header.
Definition: wifi-mac-header.cc:352
WifiPhyThresholdsTest::MakeForeignSignal
virtual Ptr< SpectrumSignalParameters > MakeForeignSignal(double txPowerWatts)
Make foreign signal function.
Definition: wifi-phy-thresholds-test.cc:165
WifiPhyThresholdsTest::m_ccabusyStateCount
uint32_t m_ccabusyStateCount
count number of PHY state change to CCA_BUSY state
Definition: wifi-phy-thresholds-test.cc:116
ns3::WifiPhy::SetErrorRateModel
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:808
WifiPhyThresholdsTest::~WifiPhyThresholdsTest
virtual ~WifiPhyThresholdsTest()
Destructor.
Definition: wifi-phy-thresholds-test.cc:135
WifiPhyThresholdsTest::DoSetup
void DoSetup(void) override
Implementation to do any local setup required for this TestCase.
Definition: wifi-phy-thresholds-test.cc:230