A Discrete-Event Network Simulator
API
wifi-phy-test.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2005,2006 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 
21 #include "ns3/packet.h"
22 #include "ns3/constant-position-mobility-model.h"
23 #include "ns3/simulator.h"
24 #include "ns3/command-line.h"
25 #include "ns3/flow-id-tag.h"
26 #include "ns3/yans-wifi-channel.h"
27 #include "ns3/yans-wifi-phy.h"
28 #include "ns3/propagation-loss-model.h"
29 #include "ns3/propagation-delay-model.h"
30 #include "ns3/nist-error-rate-model.h"
31 #include "ns3/wifi-psdu.h"
32 
33 using namespace ns3;
34 
37 {
38 public:
40  struct Input
41  {
42  Input ();
43  double distance;
44  std::string txMode;
45  uint8_t txPowerLevel;
46  uint32_t packetSize;
47  uint32_t nPackets;
48  };
50  struct Output
51  {
52  uint32_t received;
53  };
54  PsrExperiment ();
55 
61  struct PsrExperiment::Output Run (struct PsrExperiment::Input input);
62 
63 private:
65  void Send (void);
73  void Receive (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
74  WifiTxVector txVector, std::vector<bool> statusPerMpdu);
75  Ptr<WifiPhy> m_tx;
76  struct Input m_input;
77  struct Output m_output;
78 };
79 
80 void
82 {
83  Ptr<WifiPsdu> psdu = Create<WifiPsdu> (Create<Packet> (m_input.packetSize), WifiMacHeader ());
84  WifiMode mode = WifiMode (m_input.txMode);
85  WifiTxVector txVector;
86  txVector.SetTxPowerLevel (m_input.txPowerLevel);
87  txVector.SetMode (mode);
89  m_tx->Send (psdu, txVector);
90 }
91 
92 void
94  WifiTxVector txVector, std::vector<bool> statusPerMpdu)
95 {
96  m_output.received++;
97 }
98 
100 {
101 }
103  : distance (5.0),
104  txMode ("OfdmRate6Mbps"),
105  txPowerLevel (0),
106  packetSize (2304),
107  nPackets (400)
108 {
109 }
110 
112 PsrExperiment::Run (struct PsrExperiment::Input input)
113 {
114  m_output.received = 0;
115  m_input = input;
116 
117  Ptr<MobilityModel> posTx = CreateObject<ConstantPositionMobilityModel> ();
118  posTx->SetPosition (Vector (0.0, 0.0, 0.0));
119  Ptr<MobilityModel> posRx = CreateObject<ConstantPositionMobilityModel> ();
120  posRx->SetPosition (Vector (m_input.distance, 0.0, 0.0));
121 
122  Ptr<YansWifiChannel> channel = CreateObject<YansWifiChannel> ();
123  channel->SetPropagationDelayModel (CreateObject<ConstantSpeedPropagationDelayModel> ());
124  Ptr<LogDistancePropagationLossModel> log = CreateObject<LogDistancePropagationLossModel> ();
125  channel->SetPropagationLossModel (log);
126 
127  Ptr<YansWifiPhy> tx = CreateObject<YansWifiPhy> ();
128  Ptr<YansWifiPhy> rx = CreateObject<YansWifiPhy> ();
129  Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
130  tx->SetErrorRateModel (error);
131  rx->SetErrorRateModel (error);
132  tx->SetChannel (channel);
133  rx->SetChannel (channel);
134  tx->SetMobility (posTx);
135  rx->SetMobility (posRx);
136 
139 
141 
142  for (uint32_t i = 0; i < m_input.nPackets; ++i)
143  {
144  Simulator::Schedule (Seconds (i), &PsrExperiment::Send, this);
145  }
146  m_tx = tx;
147  Simulator::Run ();
148  Simulator::Destroy ();
149  return m_output;
150 }
151 
154 {
155 public:
157  struct Input
158  {
159  Input ();
161  double xA;
162  double xB;
163  std::string txModeA;
164  std::string txModeB;
165  uint8_t txPowerLevelA;
166  uint8_t txPowerLevelB;
167  uint32_t packetSizeA;
168  uint32_t packetSizeB;
169  uint32_t nPackets;
170  };
172  struct Output
173  {
174  uint32_t receivedA;
175  uint32_t receivedB;
176  };
178 
185 private:
187  void SendA (void) const;
189  void SendB (void) const;
197  void Receive (Ptr<WifiPsdu> psdu, RxSignalInfo rxSignalInfo,
198  WifiTxVector txVector, std::vector<bool> statusPerMpdu);
199  Ptr<WifiPhy> m_txA;
200  Ptr<WifiPhy> m_txB;
201  uint32_t m_flowIdA;
202  uint32_t m_flowIdB;
203  struct Input m_input;
204  struct Output m_output;
205 };
206 
207 void
209 {
210  Ptr<WifiPsdu> psdu = Create<WifiPsdu> (Create<Packet> (m_input.packetSizeA), WifiMacHeader ());
211  (*psdu->begin ())->GetPacket ()->AddByteTag (FlowIdTag (m_flowIdA));
212  WifiTxVector txVector;
214  txVector.SetMode (WifiMode (m_input.txModeA));
216  m_txA->Send (psdu, txVector);
217 }
218 
219 void
221 {
222  Ptr<WifiPsdu> psdu = Create<WifiPsdu> (Create<Packet> (m_input.packetSizeB), WifiMacHeader ());
223  (*psdu->begin ())->GetPacket ()->AddByteTag (FlowIdTag (m_flowIdB));
224  WifiTxVector txVector;
226  txVector.SetMode (WifiMode (m_input.txModeB));
228  m_txB->Send (psdu, txVector);
229 }
230 
231 void
233  WifiTxVector txVector, std::vector<bool> statusPerMpdu)
234 {
235  FlowIdTag tag;
236  if ((*psdu->begin ())->GetPacket ()->FindFirstMatchingByteTag (tag))
237  {
238  if (tag.GetFlowId () == m_flowIdA)
239  {
241  }
242  else if (tag.GetFlowId () == m_flowIdB)
243  {
245  }
246  }
247 }
248 
250 {
251 }
253  : interval (MicroSeconds (0)),
254  xA (-5),
255  xB (5),
256  txModeA ("OfdmRate6Mbps"),
257  txModeB ("OfdmRate6Mbps"),
258  txPowerLevelA (0),
259  txPowerLevelB (0),
260  packetSizeA (2304),
261  packetSizeB (2304),
262  nPackets (400)
263 {
264 }
265 
267 CollisionExperiment::Run (struct CollisionExperiment::Input input)
268 {
269  m_output.receivedA = 0;
270  m_output.receivedB = 0;
271  m_input = input;
272 
273  m_flowIdA = FlowIdTag::AllocateFlowId ();
274  m_flowIdB = FlowIdTag::AllocateFlowId ();
275 
276  Ptr<YansWifiChannel> channel = CreateObject<YansWifiChannel> ();
277  channel->SetPropagationDelayModel (CreateObject<ConstantSpeedPropagationDelayModel> ());
278  Ptr<LogDistancePropagationLossModel> log = CreateObject<LogDistancePropagationLossModel> ();
279  channel->SetPropagationLossModel (log);
280 
281  Ptr<MobilityModel> posTxA = CreateObject<ConstantPositionMobilityModel> ();
282  posTxA->SetPosition (Vector (input.xA, 0.0, 0.0));
283  Ptr<MobilityModel> posTxB = CreateObject<ConstantPositionMobilityModel> ();
284  posTxB->SetPosition (Vector (input.xB, 0.0, 0.0));
285  Ptr<MobilityModel> posRx = CreateObject<ConstantPositionMobilityModel> ();
286  posRx->SetPosition (Vector (0, 0.0, 0.0));
287 
288  Ptr<YansWifiPhy> txA = CreateObject<YansWifiPhy> ();
289  Ptr<YansWifiPhy> txB = CreateObject<YansWifiPhy> ();
290  Ptr<YansWifiPhy> rx = CreateObject<YansWifiPhy> ();
291 
292  Ptr<ErrorRateModel> error = CreateObject<NistErrorRateModel> ();
293  txA->SetErrorRateModel (error);
294  txB->SetErrorRateModel (error);
295  rx->SetErrorRateModel (error);
296  txA->SetChannel (channel);
297  txB->SetChannel (channel);
298  rx->SetChannel (channel);
299  txA->SetMobility (posTxA);
300  txB->SetMobility (posTxB);
301  rx->SetMobility (posRx);
302 
306 
308 
309  for (uint32_t i = 0; i < m_input.nPackets; ++i)
310  {
311  Simulator::Schedule (Seconds (i), &CollisionExperiment::SendA, this);
312  }
313  for (uint32_t i = 0; i < m_input.nPackets; ++i)
314  {
315  Simulator::Schedule (Seconds (i) + m_input.interval, &CollisionExperiment::SendB, this);
316  }
317  m_txA = txA;
318  m_txB = txB;
319  Simulator::Run ();
320  Simulator::Destroy ();
321  return m_output;
322 }
323 
324 
325 static void PrintPsr (int argc, char *argv[])
326 {
328  struct PsrExperiment::Input input;
329 
330  CommandLine cmd (__FILE__);
331  cmd.AddValue ("Distance", "The distance between two phys", input.distance);
332  cmd.AddValue ("PacketSize", "The size of each packet sent", input.packetSize);
333  cmd.AddValue ("TxMode", "The mode to use to send each packet", input.txMode);
334  cmd.AddValue ("NPackets", "The number of packets to send", input.nPackets);
335  cmd.AddValue ("TxPowerLevel", "The power level index to use to send each packet", input.txPowerLevel);
336  cmd.Parse (argc, argv);
337 
338  struct PsrExperiment::Output output;
339  output = experiment.Run (input);
340 
341  double psr = output.received;
342  psr /= input.nPackets;
343 
344  std::cout << psr << std::endl;
345 }
346 
347 double CalcPsr (struct PsrExperiment::Output output, struct PsrExperiment::Input input)
348 {
349  double psr = output.received;
350  psr /= input.nPackets;
351  return psr;
352 }
353 
354 static void PrintPsrVsDistance (int argc, char *argv[])
355 {
356  struct PsrExperiment::Input input;
357  CommandLine cmd (__FILE__);
358  cmd.AddValue ("TxPowerLevel", "The power level index to use to send each packet", input.txPowerLevel);
359  cmd.AddValue ("TxMode", "The mode to use to send each packet", input.txMode);
360  cmd.AddValue ("NPackets", "The number of packets to send", input.nPackets);
361  cmd.AddValue ("PacketSize", "The size of each packet sent", input.packetSize);
362  cmd.Parse (argc, argv);
363 
364  for (input.distance = 1.0; input.distance < 165; input.distance += 2.0)
365  {
366  std::cout << input.distance;
368  struct PsrExperiment::Output output;
369 
370  input.txMode = "OfdmRate6Mbps";
371  output = experiment.Run (input);
372  std::cout << " " << CalcPsr (output, input);
373 
374  input.txMode = "OfdmRate9Mbps";
375  output = experiment.Run (input);
376  std::cout << " " << CalcPsr (output, input);
377 
378  input.txMode = "OfdmRate12Mbps";
379  output = experiment.Run (input);
380  std::cout << " " << CalcPsr (output, input);
381 
382  input.txMode = "OfdmRate18Mbps";
383  output = experiment.Run (input);
384  std::cout << " " << CalcPsr (output, input);
385 
386  input.txMode = "OfdmRate24Mbps";
387  output = experiment.Run (input);
388  std::cout << " " << CalcPsr (output, input);
389 
390  input.txMode = "OfdmRate36Mbps";
391  output = experiment.Run (input);
392  std::cout << " " << CalcPsr (output, input);
393 
394  input.txMode = "OfdmRate48Mbps";
395  output = experiment.Run (input);
396  std::cout << " " << CalcPsr (output, input);
397 
398  input.txMode = "OfdmRate54Mbps";
399  output = experiment.Run (input);
400  std::cout << " " << CalcPsr (output, input);
401 
402  std::cout << std::endl;
403  }
404 }
405 
406 static void PrintSizeVsRange (int argc, char *argv[])
407 {
408  double targetPsr = 0.05;
409  struct PsrExperiment::Input input;
410  CommandLine cmd (__FILE__);
411  cmd.AddValue ("TxPowerLevel", "The power level index to use to send each packet", input.txPowerLevel);
412  cmd.AddValue ("TxMode", "The mode to use to send each packet", input.txMode);
413  cmd.AddValue ("NPackets", "The number of packets to send", input.nPackets);
414  cmd.AddValue ("TargetPsr", "The psr needed to assume that we are within range", targetPsr);
415  cmd.Parse (argc, argv);
416 
417  for (input.packetSize = 10; input.packetSize < 3000; input.packetSize += 40)
418  {
419  double precision = 0.1;
420  double low = 1.0;
421  double high = 200.0;
422  while (high - low > precision)
423  {
424  double middle = low + (high - low) / 2;
425  struct PsrExperiment::Output output;
427  input.distance = middle;
428  output = experiment.Run (input);
429  double psr = CalcPsr (output, input);
430  if (psr >= targetPsr)
431  {
432  low = middle;
433  }
434  else
435  {
436  high = middle;
437  }
438  }
439  std::cout << input.packetSize << " " << input.distance << std::endl;
440  }
441 }
442 
443 static void PrintPsrVsCollisionInterval (int argc, char *argv[])
444 {
446  input.nPackets = 100;
447  CommandLine cmd (__FILE__);
448  cmd.AddValue ("NPackets", "The number of packets to send for each transmitter", input.nPackets);
449  cmd.AddValue ("xA", "the position of transmitter A", input.xA);
450  cmd.AddValue ("xB", "the position of transmitter B", input.xB);
451  cmd.Parse (argc, argv);
452 
453  for (uint32_t i = 0; i < 100; i += 1)
454  {
457  input.interval = MicroSeconds (i);
458  output = experiment.Run (input);
459  double perA = (output.receivedA + 0.0) / (input.nPackets + 0.0);
460  double perB = (output.receivedB + 0.0) / (input.nPackets + 0.0);
461  std::cout << i << " " << perA << " " << perB << std::endl;
462  }
463  for (uint32_t i = 100; i < 4000; i += 50)
464  {
467  input.interval = MicroSeconds (i);
468  output = experiment.Run (input);
469  double perA = (output.receivedA + 0.0) / (input.nPackets + 0.0);
470  double perB = (output.receivedB + 0.0) / (input.nPackets + 0.0);
471  std::cout << i << " " << perA << " " << perB << std::endl;
472  }
473 }
474 
475 
476 int main (int argc, char *argv[])
477 {
478  if (argc <= 1)
479  {
480  std::cout << "Available experiments: "
481  << "Psr "
482  << "SizeVsRange "
483  << "PsrVsDistance "
484  << "PsrVsCollisionInterval "
485  << std::endl;
486  return 0;
487  }
488  std::string type = argv[1];
489  argc--;
490  argv[1] = argv[0];
491  argv++;
492  if (type == "Psr")
493  {
494  PrintPsr (argc, argv);
495  }
496  else if (type == "SizeVsRange")
497  {
498  PrintSizeVsRange (argc, argv);
499  }
500  else if (type == "PsrVsDistance")
501  {
502  PrintPsrVsDistance (argc, argv);
503  }
504  else if (type == "PsrVsCollisionInterval")
505  {
506  PrintPsrVsCollisionInterval (argc, argv);
507  }
508  else
509  {
510  std::cout << "Wrong arguments!" << std::endl;
511  }
512 
513  return 0;
514 }
CollisionExperiment::Input::txPowerLevelA
uint8_t txPowerLevelA
transmit power level A
Definition: wifi-phy-test.cc:165
CollisionExperiment::m_input
struct Input m_input
input
Definition: wifi-phy-test.cc:203
PsrExperiment
PsrExperiment.
Definition: wifi-phy-test.cc:37
ns3::CommandLine
Parse command-line arguments.
Definition: command-line.h:228
ns3::YansWifiPhy::SetChannel
void SetChannel(const Ptr< YansWifiChannel > channel)
Set the YansWifiChannel this YansWifiPhy is to be connected to.
Definition: yans-wifi-phy.cc:74
ns3::WifiTxVector::SetTxPowerLevel
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
Definition: wifi-tx-vector.cc:241
CollisionExperiment::m_flowIdB
uint32_t m_flowIdB
flow ID B
Definition: wifi-phy-test.cc:202
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
CollisionExperiment::m_output
struct Output m_output
output
Definition: wifi-phy-test.cc:204
PsrExperiment::Send
void Send(void)
Send function.
Definition: wifi-phy-test.cc:81
PrintPsrVsCollisionInterval
static void PrintPsrVsCollisionInterval(int argc, char *argv[])
Definition: wifi-phy-test.cc:443
CollisionExperiment::Input::txPowerLevelB
uint8_t txPowerLevelB
transmit power level B
Definition: wifi-phy-test.cc:166
CollisionExperiment::Input::xA
double xA
x A
Definition: wifi-phy-test.cc:161
CollisionExperiment::Output
Output struture.
Definition: wifi-phy-test.cc:173
ns3::MicroSeconds
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
CollisionExperiment::m_txB
Ptr< WifiPhy > m_txB
transmit B
Definition: wifi-phy-test.cc:200
ns3::WIFI_PHY_BAND_5GHZ
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Definition: wifi-phy-band.h:37
CalcPsr
double CalcPsr(struct PsrExperiment::Output output, struct PsrExperiment::Input input)
Definition: wifi-phy-test.cc:347
third.channel
channel
Definition: third.py:92
ns3::MobilityModel::SetPosition
void SetPosition(const Vector &position)
Definition: mobility-model.cc:88
PrintPsr
static void PrintPsr(int argc, char *argv[])
Definition: wifi-phy-test.cc:325
CollisionExperiment::Input
Input structure.
Definition: wifi-phy-test.cc:158
CollisionExperiment::SendB
void SendB(void) const
Send B function.
Definition: wifi-phy-test.cc:220
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition: wifi-tx-vector.cc:225
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
ns3::WifiPhy::SetReceiveOkCallback
void SetReceiveOkCallback(RxOkCallback callback)
Definition: wifi-phy.cc:635
PsrExperiment::Input::txPowerLevel
uint8_t txPowerLevel
transmit power level
Definition: wifi-phy-test.cc:45
PsrExperiment::PsrExperiment
PsrExperiment()
Definition: wifi-phy-test.cc:99
CollisionExperiment::Input::Input
Input()
Definition: wifi-phy-test.cc:252
PsrExperiment::m_output
struct Output m_output
output
Definition: wifi-phy-test.cc:77
PsrExperiment::Input
Input structure.
Definition: wifi-phy-test.cc:41
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition: wifi-mac-header.h:85
CollisionExperiment::Input::packetSizeB
uint32_t packetSizeB
packet size B
Definition: wifi-phy-test.cc:168
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
PsrExperiment::m_tx
Ptr< WifiPhy > m_tx
transmit
Definition: wifi-phy-test.cc:75
CollisionExperiment::Input::txModeB
std::string txModeB
transmit mode B
Definition: wifi-phy-test.cc:164
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
CollisionExperiment::Run
struct CollisionExperiment::Output Run(struct CollisionExperiment::Input input)
Run function.
Definition: wifi-phy-test.cc:267
PsrExperiment::Receive
void Receive(Ptr< WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Send receive function.
Definition: wifi-phy-test.cc:93
CollisionExperiment::Input::interval
Time interval
interval
Definition: wifi-phy-test.cc:160
Send
static void Send(Ptr< NetDevice > dev, int level, std::string emuMode)
Definition: fd-emu-send.cc:55
CollisionExperiment::CollisionExperiment
CollisionExperiment()
Definition: wifi-phy-test.cc:249
CollisionExperiment::m_txA
Ptr< WifiPhy > m_txA
transmit A
Definition: wifi-phy-test.cc:199
ns3::WIFI_PHY_STANDARD_80211a
@ WIFI_PHY_STANDARD_80211a
OFDM PHY (Clause 17)
Definition: wifi-standards.h:37
PsrExperiment::Input::txMode
std::string txMode
transmit mode
Definition: wifi-phy-test.cc:44
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
PrintPsrVsDistance
static void PrintPsrVsDistance(int argc, char *argv[])
Definition: wifi-phy-test.cc:354
second.cmd
cmd
Definition: second.py:35
PrintSizeVsRange
static void PrintSizeVsRange(int argc, char *argv[])
Definition: wifi-phy-test.cc:406
PsrExperiment::Output::received
uint32_t received
received
Definition: wifi-phy-test.cc:52
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::FlowIdTag::GetFlowId
uint32_t GetFlowId(void) const
Gets the flow id for the tag.
Definition: flow-id-tag.cc:88
CollisionExperiment::Input::packetSizeA
uint32_t packetSizeA
packet size A
Definition: wifi-phy-test.cc:167
PsrExperiment::m_input
struct Input m_input
input
Definition: wifi-phy-test.cc:76
CollisionExperiment
CollisionExperiment.
Definition: wifi-phy-test.cc:154
ns3::WIFI_PREAMBLE_LONG
@ WIFI_PREAMBLE_LONG
Definition: wifi-phy-common.h:64
packetSize
static const uint32_t packetSize
Definition: wifi-power-adaptation-distance.cc:113
ns3::FlowIdTag
Introspection did not find any typical Config paths.
Definition: flow-id-tag.h:28
PsrExperiment::Input::packetSize
uint32_t packetSize
packet size
Definition: wifi-phy-test.cc:46
CollisionExperiment::m_flowIdA
uint32_t m_flowIdA
flow ID A
Definition: wifi-phy-test.cc:201
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
CollisionExperiment::Receive
void Receive(Ptr< WifiPsdu > psdu, RxSignalInfo rxSignalInfo, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
Receive function.
Definition: wifi-phy-test.cc:232
ns3::WifiPhy::ConfigureStandardAndBand
virtual void ConfigureStandardAndBand(WifiPhyStandard standard, WifiPhyBand band)
Configure the PHY-level parameters for different Wi-Fi standard.
Definition: wifi-phy.cc:1069
PsrExperiment::Input::Input
Input()
Definition: wifi-phy-test.cc:102
CollisionExperiment::SendA
void SendA(void) const
Send A function.
Definition: wifi-phy-test.cc:208
CollisionExperiment::Input::nPackets
uint32_t nPackets
number of packets
Definition: wifi-phy-test.cc:169
PsrExperiment::Output
Output structure.
Definition: wifi-phy-test.cc:51
CollisionExperiment::Output::receivedB
uint32_t receivedB
received B
Definition: wifi-phy-test.cc:175
ns3::WifiPsdu::begin
std::vector< Ptr< WifiMacQueueItem > >::const_iterator begin(void) const
Return a const iterator to the first MPDU.
Definition: wifi-psdu.cc:325
CollisionExperiment::Input::xB
double xB
x B
Definition: wifi-phy-test.cc:162
CollisionExperiment::Input::txModeA
std::string txModeA
transmit mode A
Definition: wifi-phy-test.cc:163
PsrExperiment::Input::distance
double distance
distance
Definition: wifi-phy-test.cc:43
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
PsrExperiment::Run
struct PsrExperiment::Output Run(struct PsrExperiment::Input input)
Run function.
Definition: wifi-phy-test.cc:112
ns3::WifiPhy::Send
void Send(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
This function is a wrapper for the Send variant that accepts a WifiConstPsduMap as first argument.
Definition: wifi-phy.cc:1789
CollisionExperiment::Output::receivedA
uint32_t receivedA
received A
Definition: wifi-phy-test.cc:174
PsrExperiment::Input::nPackets
uint32_t nPackets
number of packets
Definition: wifi-phy-test.cc:47