A Discrete-Event Network Simulator
API
wifi-test-interference-helper.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015
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 //
22 // This script is used to verify the behavior of InterferenceHelper.
23 //
24 // The scenario consists of two IEEE 802.11 hidden stations and an access point.
25 // The two stations have both a packet to transmit to the access point.
26 //
27 //
28 // (xA,0,0) (0,0,0) (xB,0,0)
29 //
30 // * -----> * <----- *
31 // | | |
32 // STA A AP STA B
33 //
34 //
35 // The program can be configured at run-time by passing command-line arguments.
36 // It enables to configure the delay between the transmission from station A
37 // and the transmission from station B (--delay option). It is also possible to
38 // select the tx power level (--txPowerA and --txPowerB options), the packet size
39 // (--packetSizeA and --packetSizeB options) and the modulation (--txModeA and
40 // --txModeB options) used for the respective transmissions.
41 //
42 // By default, IEEE 802.11a with long preamble type is considered, but those
43 // parameters can be also picked among other IEEE 802.11 flavors and preamble
44 // types available in the simulator (--standard and --preamble options).
45 // Note that the program checks the consistency between the selected standard
46 // the selected preamble type.
47 //
48 // The output of the program displays InterfenceHelper and SpectrumWifiPhy trace
49 // logs associated to the chosen scenario.
50 //
51 
52 #include "ns3/log.h"
53 #include "ns3/node.h"
54 #include "ns3/packet.h"
55 #include "ns3/config.h"
56 #include "ns3/double.h"
57 #include "ns3/simulator.h"
58 #include "ns3/command-line.h"
59 #include "ns3/single-model-spectrum-channel.h"
60 #include "ns3/spectrum-wifi-phy.h"
61 #include "ns3/propagation-loss-model.h"
62 #include "ns3/propagation-delay-model.h"
63 #include "ns3/nist-error-rate-model.h"
64 #include "ns3/constant-position-mobility-model.h"
65 #include "ns3/simple-frame-capture-model.h"
66 #include "ns3/wifi-psdu.h"
67 #include "ns3/wifi-mac-trailer.h"
68 #include "ns3/wifi-net-device.h"
69 
70 using namespace ns3;
71 
72 NS_LOG_COMPONENT_DEFINE ("test-interference-helper");
73 
74 bool checkResults = false;
75 bool expectRxASuccessfull = false;
76 bool expectRxBSuccessfull = false;
77 
80 {
81 public:
83  struct Input
84  {
85  Input ();
87  double xA;
88  double xB;
89  std::string txModeA;
90  std::string txModeB;
91  double txPowerLevelA;
92  double txPowerLevelB;
93  uint32_t packetSizeA;
94  uint32_t packetSizeB;
95  uint16_t channelA;
96  uint16_t channelB;
97  uint16_t widthA;
98  uint16_t widthB;
103  double captureMargin;
104  };
105 
111  void Run (struct InterferenceExperiment::Input input);
112 
113 private:
119  void PacketDropped (Ptr<const Packet> packet, WifiPhyRxfailureReason reason);
121  void SendA (void) const;
123  void SendB (void) const;
126  struct Input m_input;
127  bool m_droppedA;
128  bool m_droppedB;
129  mutable uint64_t m_uidA;
130  mutable uint64_t m_uidB;
131 };
132 
133 void
135 {
136  WifiMacHeader hdr;
137  hdr.SetType (WIFI_MAC_CTL_ACK); //so that size may not be empty while being as short as possible
138  Ptr<Packet> p = Create<Packet> (m_input.packetSizeA - hdr.GetSerializedSize () - WIFI_MAC_FCS_LENGTH);
139  m_uidA = p->GetUid ();
140  Ptr<WifiPsdu> psdu = Create<WifiPsdu> (p, hdr);
141  WifiTxVector txVector;
142  txVector.SetTxPowerLevel (0); //only one TX power level
143  txVector.SetMode (WifiMode (m_input.txModeA));
144  txVector.SetChannelWidth (m_input.widthA);
145  txVector.SetPreambleType (m_input.preamble);
146  m_txA->Send (psdu, txVector);
147 }
148 
149 void
151 {
152  WifiMacHeader hdr;
153  hdr.SetType (WIFI_MAC_CTL_ACK); //so that size may not be empty while being as short as possible
154  Ptr<Packet> p = Create<Packet> (m_input.packetSizeB - hdr.GetSerializedSize () - WIFI_MAC_FCS_LENGTH);
155  m_uidB = p->GetUid ();
156  Ptr<WifiPsdu> psdu = Create<WifiPsdu> (p, hdr);
157  WifiTxVector txVector;
158  txVector.SetTxPowerLevel (0); //only one TX power level
159  txVector.SetMode (WifiMode (m_input.txModeB));
160  txVector.SetChannelWidth (m_input.widthB);
161  txVector.SetPreambleType (m_input.preamble);
162  m_txB->Send (psdu, txVector);
163 }
164 
165 void
167 {
168  if (packet->GetUid () == m_uidA)
169  {
170  m_droppedA = true;
171  }
172  else if (packet->GetUid () == m_uidB)
173  {
174  m_droppedB = true;
175  }
176  else
177  {
178  NS_LOG_ERROR ("Unknown packet!");
179  exit (1);
180  }
181 }
182 
184  : m_droppedA (false),
185  m_droppedB (false),
186  m_uidA (0),
187  m_uidB (0)
188 {
189 }
190 
192  : interval (MicroSeconds (0)),
193  xA (-5),
194  xB (5),
195  txModeA ("OfdmRate54Mbps"),
196  txModeB ("OfdmRate54Mbps"),
197  txPowerLevelA (16.0206),
198  txPowerLevelB (16.0206),
199  packetSizeA (1500),
200  packetSizeB (1500),
201  channelA (36),
202  channelB (36),
203  widthA (20),
204  widthB (20),
205  standard (WIFI_PHY_STANDARD_80211a),
206  band (WIFI_PHY_BAND_5GHZ),
207  preamble (WIFI_PREAMBLE_LONG),
208  captureEnabled (false),
209  captureMargin (0)
210 {
211 }
212 
213 void
215 {
216  m_input = input;
217 
218  double range = std::max (std::abs (input.xA), input.xB);
219  Config::SetDefault ("ns3::RangePropagationLossModel::MaxRange", DoubleValue (range));
220 
221  Ptr<SingleModelSpectrumChannel> channel = CreateObject<SingleModelSpectrumChannel> ();
222  channel->SetPropagationDelayModel (CreateObject<ConstantSpeedPropagationDelayModel> ());
223  Ptr<RangePropagationLossModel> loss = CreateObject<RangePropagationLossModel> ();
224  channel->AddPropagationLossModel (loss);
225 
226  Ptr<MobilityModel> posTxA = CreateObject<ConstantPositionMobilityModel> ();
227  posTxA->SetPosition (Vector (input.xA, 0.0, 0.0));
228  Ptr<MobilityModel> posTxB = CreateObject<ConstantPositionMobilityModel> ();
229  posTxB->SetPosition (Vector (input.xB, 0.0, 0.0));
230  Ptr<MobilityModel> posRx = CreateObject<ConstantPositionMobilityModel> ();
231  posRx->SetPosition (Vector (0.0, 0.0, 0.0));
232 
233  Ptr<Node> nodeA = CreateObject<Node> ();
234  Ptr<WifiNetDevice> devA = CreateObject<WifiNetDevice> ();
235  m_txA = CreateObject<SpectrumWifiPhy> ();
237  m_txA->SetDevice (devA);
240 
241  Ptr<Node> nodeB = CreateObject<Node> ();
242  Ptr<WifiNetDevice> devB = CreateObject<WifiNetDevice> ();
243  m_txB = CreateObject<SpectrumWifiPhy> ();
245  m_txB->SetDevice (devB);
248 
249  Ptr<Node> nodeRx = CreateObject<Node> ();
250  Ptr<WifiNetDevice> devRx = CreateObject<WifiNetDevice> ();
251  Ptr<SpectrumWifiPhy> rx = CreateObject<SpectrumWifiPhy> ();
252  rx->CreateWifiSpectrumPhyInterface (devRx);
253  rx->SetDevice (devRx);
254 
255  Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
256  m_txA->SetErrorRateModel (error);
257  m_txB->SetErrorRateModel (error);
258  rx->SetErrorRateModel (error);
261  rx->SetChannel (channel);
262  m_txA->SetMobility (posTxA);
263  m_txB->SetMobility (posTxB);
264  rx->SetMobility (posRx);
265  if (input.captureEnabled)
266  {
267  Ptr<SimpleFrameCaptureModel> frameCaptureModel = CreateObject<SimpleFrameCaptureModel> ();
268  frameCaptureModel->SetMargin (input.captureMargin);
269  rx->SetFrameCaptureModel (frameCaptureModel);
270  }
271 
274  rx->ConfigureStandardAndBand (input.standard, input.band);
275 
276  devA->SetPhy (m_txA);
277  nodeA->AddDevice (devA);
278  devB->SetPhy (m_txB);
279  nodeB->AddDevice (devB);
280  devRx->SetPhy (rx);
281  nodeRx->AddDevice (devRx);
282 
285  rx->SetChannelNumber (std::max (input.channelA, input.channelB));
286 
288 
289  Simulator::Schedule (Seconds (0), &InterferenceExperiment::SendA, this);
290  Simulator::Schedule (Seconds (0) + input.interval, &InterferenceExperiment::SendB, this);
291 
292  Simulator::Run ();
293  Simulator::Destroy ();
294  m_txB->Dispose ();
295  m_txA->Dispose ();
296  rx->Dispose ();
297 
299  {
300  NS_LOG_ERROR ("Results are not expected!");
301  exit (1);
302  }
303 }
304 
305 int main (int argc, char *argv[])
306 {
308  std::string str_standard = "WIFI_PHY_STANDARD_80211a";
309  std::string str_preamble = "WIFI_PREAMBLE_LONG";
310  uint64_t delay = 0; //microseconds
311 
312  CommandLine cmd (__FILE__);
313  cmd.AddValue ("delay", "Delay in microseconds between frame transmission from sender A and frame transmission from sender B", delay);
314  cmd.AddValue ("xA", "The position of transmitter A (< 0)", input.xA);
315  cmd.AddValue ("xB", "The position of transmitter B (> 0)", input.xB);
316  cmd.AddValue ("packetSizeA", "Packet size in bytes of transmitter A", input.packetSizeA);
317  cmd.AddValue ("packetSizeB", "Packet size in bytes of transmitter B", input.packetSizeB);
318  cmd.AddValue ("txPowerA", "TX power level of transmitter A", input.txPowerLevelA);
319  cmd.AddValue ("txPowerB", "TX power level of transmitter B", input.txPowerLevelB);
320  cmd.AddValue ("txModeA", "Wifi mode used for payload transmission of sender A", input.txModeA);
321  cmd.AddValue ("txModeB", "Wifi mode used for payload transmission of sender B", input.txModeB);
322  cmd.AddValue ("channelA", "The selected channel number of sender A", input.channelA);
323  cmd.AddValue ("channelB", "The selected channel number of sender B", input.channelB);
324  cmd.AddValue ("widthA", "The selected channel width (MHz) of sender A", input.widthA);
325  cmd.AddValue ("widthB", "The selected channel width (MHz) of sender B", input.widthB);
326  cmd.AddValue ("standard", "IEEE 802.11 flavor", str_standard);
327  cmd.AddValue ("preamble", "Type of preamble", str_preamble);
328  cmd.AddValue ("enableCapture", "Enable/disable physical layer capture", input.captureEnabled);
329  cmd.AddValue ("captureMargin", "Margin used for physical layer capture", input.captureMargin);
330  cmd.AddValue ("checkResults", "Used to check results at the end of the test", checkResults);
331  cmd.AddValue ("expectRxASuccessfull", "Indicate whether packet A is expected to be successfully received", expectRxASuccessfull);
332  cmd.AddValue ("expectRxBSuccessfull", "Indicate whether packet B is expected to be successfully received", expectRxBSuccessfull);
333  cmd.Parse (argc, argv);
334 
335  input.interval = MicroSeconds (delay);
336 
337  if (input.xA >= 0 || input.xB <= 0)
338  {
339  std::cout << "Value of xA must be smaller than 0 and value of xB must be bigger than 0!" << std::endl;
340  return 0;
341  }
342 
343  if (str_standard == "WIFI_PHY_STANDARD_80211a")
344  {
346  input.band = WIFI_PHY_BAND_5GHZ;
347  }
348  else if (str_standard == "WIFI_PHY_STANDARD_80211b")
349  {
351  input.band = WIFI_PHY_BAND_2_4GHZ;
352  }
353  else if (str_standard == "WIFI_PHY_STANDARD_80211g")
354  {
356  input.band = WIFI_PHY_BAND_2_4GHZ;
357  }
358  else if (str_standard == "WIFI_PHY_STANDARD_80211n_2_4GHZ")
359  {
361  input.band = WIFI_PHY_BAND_2_4GHZ;
362  }
363  else if (str_standard == "WIFI_PHY_STANDARD_80211n_5GHZ")
364  {
366  input.band = WIFI_PHY_BAND_5GHZ;
367  }
368  else if (str_standard == "WIFI_PHY_STANDARD_80211ac")
369  {
371  input.band = WIFI_PHY_BAND_5GHZ;
372  }
373  else if (str_standard == "WIFI_PHY_STANDARD_80211ax_2_4GHZ")
374  {
376  input.band = WIFI_PHY_BAND_2_4GHZ;
377  }
378  else if (str_standard == "WIFI_PHY_STANDARD_80211ax_5GHZ")
379  {
381  input.band = WIFI_PHY_BAND_5GHZ;
382  }
383 
384  if (str_preamble == "WIFI_PREAMBLE_LONG" && (input.standard == WIFI_PHY_STANDARD_80211a || input.standard == WIFI_PHY_STANDARD_80211b || input.standard == WIFI_PHY_STANDARD_80211g))
385  {
387  }
388  else if (str_preamble == "WIFI_PREAMBLE_SHORT" && (input.standard == WIFI_PHY_STANDARD_80211b || input.standard == WIFI_PHY_STANDARD_80211g))
389  {
391  }
392  else if (str_preamble == "WIFI_PREAMBLE_HT_MF" && input.standard == WIFI_PHY_STANDARD_80211n)
393  {
395  }
396  else if (str_preamble == "WIFI_PREAMBLE_VHT_SU" && input.standard == WIFI_PHY_STANDARD_80211ac)
397  {
399  }
400  else if (str_preamble == "WIFI_PREAMBLE_HE_SU" && input.standard == WIFI_PHY_STANDARD_80211ax)
401  {
403  }
404  else
405  {
406  std::cout << "Preamble does not exist or is not compatible with the selected standard!" << std::endl;
407  return 0;
408  }
409 
411  experiment.Run (input);
412 
413  return 0;
414 }
InterferenceExperiment::m_droppedB
bool m_droppedB
flag to indicate whether packet B has been dropped
Definition: wifi-test-interference-helper.cc:128
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
InterferenceExperiment::m_txA
Ptr< SpectrumWifiPhy > m_txA
transmit A function
Definition: wifi-test-interference-helper.cc:124
ns3::SimpleFrameCaptureModel::SetMargin
void SetMargin(double margin)
Sets the frame capture margin (dB).
Definition: simple-frame-capture-model.cc:63
ns3::CommandLine
Parse command-line arguments.
Definition: command-line.h:228
ns3::Object::Dispose
void Dispose(void)
Dispose of this Object.
Definition: object.cc:214
ns3::WifiTxVector::SetTxPowerLevel
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
Definition: wifi-tx-vector.cc:241
InterferenceExperiment::Input::widthA
uint16_t widthA
channel width A
Definition: wifi-test-interference-helper.cc:97
InterferenceExperiment::Input::channelB
uint16_t channelB
channel number B
Definition: wifi-test-interference-helper.cc:96
InterferenceExperiment::Input::captureEnabled
bool captureEnabled
whether physical layer capture is enabled
Definition: wifi-test-interference-helper.cc:102
InterferenceExperiment::Input::txModeA
std::string txModeA
transmit mode A
Definition: wifi-test-interference-helper.cc:89
InterferenceExperiment::m_droppedA
bool m_droppedA
flag to indicate whether packet A has been dropped
Definition: wifi-test-interference-helper.cc:127
ns3::WifiPhy::SetDevice
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-phy.cc:777
ns3::SpectrumWifiPhy::SetChannelNumber
void SetChannelNumber(uint8_t id) override
Set channel number.
Definition: spectrum-wifi-phy.cc:239
expectRxBSuccessfull
bool expectRxBSuccessfull
Definition: wifi-test-interference-helper.cc:76
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiMacHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const override
Definition: wifi-mac-header.cc:1155
ns3::WIFI_MAC_FCS_LENGTH
static const uint16_t WIFI_MAC_FCS_LENGTH
The length in octects of the IEEE 802.11 MAC FCS field.
Definition: wifi-mac-trailer.h:31
InterferenceExperiment::SendB
void SendB(void) const
Send B function.
Definition: wifi-test-interference-helper.cc:150
ns3::MicroSeconds
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
ns3::WifiPhy::SetTxPowerStart
void SetTxPowerStart(double start)
Sets the minimum available transmission power level (dBm).
Definition: wifi-phy.cc:699
ns3::WIFI_PHY_BAND_5GHZ
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Definition: wifi-phy-band.h:37
InterferenceExperiment::PacketDropped
void PacketDropped(Ptr< const Packet > packet, WifiPhyRxfailureReason reason)
Function triggered when a packet is dropped.
Definition: wifi-test-interference-helper.cc:166
InterferenceExperiment::SendA
void SendA(void) const
Send A function.
Definition: wifi-test-interference-helper.cc:134
ns3::WIFI_PREAMBLE_VHT_SU
@ WIFI_PREAMBLE_VHT_SU
Definition: wifi-phy-common.h:67
third.channel
channel
Definition: third.py:92
ns3::SpectrumWifiPhy::SetChannel
void SetChannel(const Ptr< SpectrumChannel > channel)
Set the SpectrumChannel this SpectrumWifiPhy is to be connected to.
Definition: spectrum-wifi-phy.cc:219
ns3::MobilityModel::SetPosition
void SetPosition(const Vector &position)
Definition: mobility-model.cc:88
ns3::WifiPhy::SetTxPowerEnd
void SetTxPowerEnd(double end)
Sets the maximum available transmission power level (dBm).
Definition: wifi-phy.cc:712
InterferenceExperiment::Input::band
WifiPhyBand band
band
Definition: wifi-test-interference-helper.cc:100
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition: wifi-tx-vector.cc:225
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
checkResults
bool checkResults
Definition: wifi-test-interference-helper.cc:74
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
InterferenceExperiment::Input::txPowerLevelA
double txPowerLevelA
transmit power level A
Definition: wifi-test-interference-helper.cc:91
InterferenceExperiment::Input::packetSizeA
uint32_t packetSizeA
packet size A
Definition: wifi-test-interference-helper.cc:93
ns3::WIFI_PREAMBLE_HE_SU
@ WIFI_PREAMBLE_HE_SU
Definition: wifi-phy-common.h:69
ns3::WifiPhyStandard
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
Definition: wifi-standards.h:35
ns3::DoubleValue
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:41
InterferenceExperiment::Input::Input
Input()
Definition: wifi-test-interference-helper.cc:191
InterferenceExperiment::Input::txModeB
std::string txModeB
transmit mode B
Definition: wifi-test-interference-helper.cc:90
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition: wifi-mac-header.h:85
ns3::Ptr< const Packet >
InterferenceExperiment
InterferenceExperiment.
Definition: wifi-test-interference-helper.cc:80
ns3::WIFI_PHY_STANDARD_80211ax
@ WIFI_PHY_STANDARD_80211ax
HE PHY (clause 26)
Definition: wifi-standards.h:49
InterferenceExperiment::Input::xB
double xB
x B
Definition: wifi-test-interference-helper.cc:88
ns3::SpectrumWifiPhy::CreateWifiSpectrumPhyInterface
void CreateWifiSpectrumPhyInterface(Ptr< NetDevice > device)
Method to encapsulate the creation of the WifiSpectrumPhyInterface object (used to bind the WifiSpect...
Definition: spectrum-wifi-phy.cc:435
ns3::WifiPhyRxfailureReason
WifiPhyRxfailureReason
Enumeration of the possible reception failure reasons.
Definition: wifi-phy-common.h:258
experiment
void experiment(std::string queue_disc_type)
Definition: cobalt-vs-codel.cc:74
ns3::WifiMode
represent a single transmission mode
Definition: wifi-mode.h:48
max
#define max(a, b)
Definition: 80211b.c:43
InterferenceExperiment::Input::preamble
WifiPreamble preamble
preamble
Definition: wifi-test-interference-helper.cc:101
InterferenceExperiment::Input::captureMargin
double captureMargin
margin used for physical layer capture
Definition: wifi-test-interference-helper.cc:103
InterferenceExperiment::Input::xA
double xA
x A
Definition: wifi-test-interference-helper.cc:87
ns3::WIFI_PHY_STANDARD_80211a
@ WIFI_PHY_STANDARD_80211a
OFDM PHY (Clause 17)
Definition: wifi-standards.h:37
ns3::WIFI_PHY_STANDARD_80211b
@ WIFI_PHY_STANDARD_80211b
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
Definition: wifi-standards.h:39
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::WifiTxVector::SetChannelWidth
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
Definition: wifi-tx-vector.cc:253
second.cmd
cmd
Definition: second.py:35
InterferenceExperiment::m_txB
Ptr< SpectrumWifiPhy > m_txB
transmit B function
Definition: wifi-test-interference-helper.cc:125
ns3::Node::AddDevice
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Definition: node.cc:130
InterferenceExperiment::Input
Input structure.
Definition: wifi-test-interference-helper.cc:84
InterferenceExperiment::Input::packetSizeB
uint32_t packetSizeB
packet size B
Definition: wifi-test-interference-helper.cc:94
ns3::WIFI_MAC_CTL_ACK
@ WIFI_MAC_CTL_ACK
Definition: wifi-mac-header.h:42
ns3::WifiPhy::SetMobility
void SetMobility(const Ptr< MobilityModel > mobility)
assign a mobility model to this device
Definition: wifi-phy.cc:789
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
ns3::WIFI_PHY_STANDARD_80211n
@ WIFI_PHY_STANDARD_80211n
HT PHY (clause 20)
Definition: wifi-standards.h:45
ns3::WIFI_PHY_STANDARD_80211ac
@ WIFI_PHY_STANDARD_80211ac
VHT PHY (clause 22)
Definition: wifi-standards.h:47
ns3::WifiPreamble
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-phy-common.h:63
NS_LOG_ERROR
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:257
ns3::WIFI_PREAMBLE_LONG
@ WIFI_PREAMBLE_LONG
Definition: wifi-phy-common.h:64
expectRxASuccessfull
bool expectRxASuccessfull
Definition: wifi-test-interference-helper.cc:75
ns3::WifiPhy::SetFrameCaptureModel
void SetFrameCaptureModel(const Ptr< FrameCaptureModel > frameCaptureModel)
Sets the frame capture model.
Definition: wifi-phy.cc:822
ns3::WIFI_PHY_BAND_2_4GHZ
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Definition: wifi-phy-band.h:35
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
InterferenceExperiment::m_uidA
uint64_t m_uidA
UID to use for packet A.
Definition: wifi-test-interference-helper.cc:129
InterferenceExperiment::Input::widthB
uint16_t widthB
channel width B
Definition: wifi-test-interference-helper.cc:98
InterferenceExperiment::Input::standard
WifiPhyStandard standard
standard
Definition: wifi-test-interference-helper.cc:99
InterferenceExperiment::InterferenceExperiment
InterferenceExperiment()
Definition: wifi-test-interference-helper.cc:183
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
InterferenceExperiment::Input::interval
Time interval
interval
Definition: wifi-test-interference-helper.cc:86
InterferenceExperiment::Run
void Run(struct InterferenceExperiment::Input input)
Run function.
Definition: wifi-test-interference-helper.cc:214
ns3::Config::SetDefault
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:849
ns3::WifiPhyBand
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
InterferenceExperiment::m_input
struct Input m_input
input
Definition: wifi-test-interference-helper.cc:126
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
InterferenceExperiment::Input::txPowerLevelB
double txPowerLevelB
transmit power level B
Definition: wifi-test-interference-helper.cc:92
InterferenceExperiment::Input::channelA
uint16_t channelA
channel number A
Definition: wifi-test-interference-helper.cc:95
ns3::WIFI_PREAMBLE_HT_MF
@ WIFI_PREAMBLE_HT_MF
Definition: wifi-phy-common.h:66
ns3::WifiTxVector::SetPreambleType
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
Definition: wifi-tx-vector.cc:247
ns3::WifiPhy::SetErrorRateModel
void SetErrorRateModel(const Ptr< ErrorRateModel > rate)
Sets the error rate model.
Definition: wifi-phy.cc:808
InterferenceExperiment::m_uidB
uint64_t m_uidB
UID to use for packet B.
Definition: wifi-test-interference-helper.cc:130
ns3::WIFI_PREAMBLE_SHORT
@ WIFI_PREAMBLE_SHORT
Definition: wifi-phy-common.h:65
ns3::WIFI_PHY_STANDARD_80211g
@ WIFI_PHY_STANDARD_80211g
ERP-OFDM PHY (Clause 19, Section 19.5)
Definition: wifi-standards.h:41
ns3::WifiNetDevice::SetPhy
void SetPhy(const Ptr< WifiPhy > phy)
Definition: wifi-net-device.cc:187
ns3::Packet::GetUid
uint64_t GetUid(void) const
Returns the packet's Uid.
Definition: packet.cc:390