A Discrete-Event Network Simulator
API
wifi-helper.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Mirko Banchi <mk.banchi@gmail.com>
21  */
22 
23 #include "ns3/wifi-net-device.h"
24 #include "ns3/ap-wifi-mac.h"
25 #include "ns3/ampdu-subframe-header.h"
26 #include "ns3/mobility-model.h"
27 #include "ns3/log.h"
28 #include "ns3/pointer.h"
29 #include "ns3/radiotap-header.h"
30 #include "ns3/config.h"
31 #include "ns3/names.h"
32 #include "ns3/net-device-queue-interface.h"
33 #include "ns3/wifi-mac-queue.h"
34 #include "ns3/qos-utils.h"
35 #include "ns3/ht-configuration.h"
36 #include "ns3/vht-configuration.h"
37 #include "ns3/he-configuration.h"
38 #include "ns3/obss-pd-algorithm.h"
39 #include "wifi-helper.h"
40 
41 namespace ns3 {
42 
43 NS_LOG_COMPONENT_DEFINE ("WifiHelper");
44 
54 static void
57  std::string context,
59  WifiMode mode,
60  WifiPreamble preamble,
61  uint8_t txLevel)
62 {
63  NS_LOG_FUNCTION (stream << context << p << mode << preamble << txLevel);
64  *stream->GetStream () << "t " << Simulator::Now ().GetSeconds () << " " << context << " " << mode << " " << *p << std::endl;
65 }
66 
75 static void
79  WifiMode mode,
80  WifiPreamble preamble,
81  uint8_t txLevel)
82 {
83  NS_LOG_FUNCTION (stream << p << mode << preamble << txLevel);
84  *stream->GetStream () << "t " << Simulator::Now ().GetSeconds () << " " << mode << " " << *p << std::endl;
85 }
86 
96 static void
99  std::string context,
101  double snr,
102  WifiMode mode,
103  WifiPreamble preamble)
104 {
105  NS_LOG_FUNCTION (stream << context << p << snr << mode << preamble);
106  *stream->GetStream () << "r " << Simulator::Now ().GetSeconds () << " " << mode << "" << context << " " << *p << std::endl;
107 }
108 
117 static void
121  double snr,
122  WifiMode mode,
123  WifiPreamble preamble)
124 {
125  NS_LOG_FUNCTION (stream << p << snr << mode << preamble);
126  *stream->GetStream () << "r " << Simulator::Now ().GetSeconds () << " " << mode << " " << *p << std::endl;
127 }
128 
130  : m_pcapDlt (PcapHelper::DLT_IEEE802_11)
131 {
132  SetPreambleDetectionModel ("ns3::ThresholdPreambleDetectionModel");
133 }
134 
136 {
137 }
138 
139 void
140 WifiPhyHelper::Set (std::string name, const AttributeValue &v)
141 {
142  m_phy.Set (name, v);
143 }
144 
145 void
147  std::string n0, const AttributeValue &v0,
148  std::string n1, const AttributeValue &v1,
149  std::string n2, const AttributeValue &v2,
150  std::string n3, const AttributeValue &v3,
151  std::string n4, const AttributeValue &v4,
152  std::string n5, const AttributeValue &v5,
153  std::string n6, const AttributeValue &v6,
154  std::string n7, const AttributeValue &v7)
155 {
158  m_errorRateModel.Set (n0, v0);
159  m_errorRateModel.Set (n1, v1);
160  m_errorRateModel.Set (n2, v2);
161  m_errorRateModel.Set (n3, v3);
162  m_errorRateModel.Set (n4, v4);
163  m_errorRateModel.Set (n5, v5);
164  m_errorRateModel.Set (n6, v6);
165  m_errorRateModel.Set (n7, v7);
166 }
167 
168 void
170  std::string n0, const AttributeValue &v0,
171  std::string n1, const AttributeValue &v1,
172  std::string n2, const AttributeValue &v2,
173  std::string n3, const AttributeValue &v3,
174  std::string n4, const AttributeValue &v4,
175  std::string n5, const AttributeValue &v5,
176  std::string n6, const AttributeValue &v6,
177  std::string n7, const AttributeValue &v7)
178 {
181  m_frameCaptureModel.Set (n0, v0);
182  m_frameCaptureModel.Set (n1, v1);
183  m_frameCaptureModel.Set (n2, v2);
184  m_frameCaptureModel.Set (n3, v3);
185  m_frameCaptureModel.Set (n4, v4);
186  m_frameCaptureModel.Set (n5, v5);
187  m_frameCaptureModel.Set (n6, v6);
188  m_frameCaptureModel.Set (n7, v7);
189 }
190 
191 void
193  std::string n0, const AttributeValue &v0,
194  std::string n1, const AttributeValue &v1,
195  std::string n2, const AttributeValue &v2,
196  std::string n3, const AttributeValue &v3,
197  std::string n4, const AttributeValue &v4,
198  std::string n5, const AttributeValue &v5,
199  std::string n6, const AttributeValue &v6,
200  std::string n7, const AttributeValue &v7)
201 {
204  m_preambleDetectionModel.Set (n0, v0);
205  m_preambleDetectionModel.Set (n1, v1);
206  m_preambleDetectionModel.Set (n2, v2);
207  m_preambleDetectionModel.Set (n3, v3);
208  m_preambleDetectionModel.Set (n4, v4);
209  m_preambleDetectionModel.Set (n5, v5);
210  m_preambleDetectionModel.Set (n6, v6);
211  m_preambleDetectionModel.Set (n7, v7);
212 }
213 
214 void
216 {
218 }
219 
220 void
223  Ptr<const Packet> packet,
224  uint16_t channelFreqMhz,
225  WifiTxVector txVector,
226  MpduInfo aMpdu,
227  uint16_t staId)
228 {
229  uint32_t dlt = file->GetDataLinkType ();
230  switch (dlt)
231  {
233  file->Write (Simulator::Now (), packet);
234  return;
236  {
237  NS_FATAL_ERROR ("PcapSniffTxEvent(): DLT_PRISM_HEADER not implemented");
238  return;
239  }
241  {
242  Ptr<Packet> p = packet->Copy ();
243  RadiotapHeader header;
244  GetRadiotapHeader (header, p, channelFreqMhz, txVector, aMpdu, staId);
245  p->AddHeader (header);
246  file->Write (Simulator::Now (), p);
247  return;
248  }
249  default:
250  NS_ABORT_MSG ("PcapSniffTxEvent(): Unexpected data link type " << dlt);
251  }
252 }
253 
254 void
257  Ptr<const Packet> packet,
258  uint16_t channelFreqMhz,
259  WifiTxVector txVector,
260  MpduInfo aMpdu,
261  SignalNoiseDbm signalNoise,
262  uint16_t staId)
263 {
264  uint32_t dlt = file->GetDataLinkType ();
265  switch (dlt)
266  {
268  file->Write (Simulator::Now (), packet);
269  return;
271  {
272  NS_FATAL_ERROR ("PcapSniffRxEvent(): DLT_PRISM_HEADER not implemented");
273  return;
274  }
276  {
277  Ptr<Packet> p = packet->Copy ();
278  RadiotapHeader header;
279  GetRadiotapHeader (header, p, channelFreqMhz, txVector, aMpdu, staId, signalNoise);
280  p->AddHeader (header);
281  file->Write (Simulator::Now (), p);
282  return;
283  }
284  default:
285  NS_ABORT_MSG ("PcapSniffRxEvent(): Unexpected data link type " << dlt);
286  }
287 }
288 
289 void
291  RadiotapHeader &header,
292  Ptr<Packet> packet,
293  uint16_t channelFreqMhz,
294  WifiTxVector txVector,
295  MpduInfo aMpdu,
296  uint16_t staId,
297  SignalNoiseDbm signalNoise)
298 {
299  header.SetAntennaSignalPower (signalNoise.signal);
300  header.SetAntennaNoisePower (signalNoise.noise);
301  GetRadiotapHeader (header, packet, channelFreqMhz, txVector, aMpdu, staId);
302 }
303 
304 void
306  RadiotapHeader &header,
307  Ptr<Packet> packet,
308  uint16_t channelFreqMhz,
309  WifiTxVector txVector,
310  MpduInfo aMpdu,
311  uint16_t staId)
312 {
313  WifiPreamble preamble = txVector.GetPreambleType ();
314 
315  uint8_t frameFlags = RadiotapHeader::FRAME_FLAG_NONE;
316  header.SetTsft (Simulator::Now ().GetMicroSeconds ());
317 
318  //Our capture includes the FCS, so we set the flag to say so.
320 
321  if (preamble == WIFI_PREAMBLE_SHORT)
322  {
324  }
325 
326  if (txVector.GetGuardInterval () == 400)
327  {
329  }
330 
331  header.SetFrameFlags (frameFlags);
332 
333  uint64_t rate = 0;
334  if (txVector.GetMode (staId).GetModulationClass () != WIFI_MOD_CLASS_HT
335  && txVector.GetMode (staId).GetModulationClass () != WIFI_MOD_CLASS_VHT
336  && txVector.GetMode (staId).GetModulationClass () != WIFI_MOD_CLASS_HE)
337  {
338  rate = txVector.GetMode (staId).GetDataRate (txVector.GetChannelWidth (), txVector.GetGuardInterval (), 1) * txVector.GetNss (staId) / 500000;
339  header.SetRate (static_cast<uint8_t> (rate));
340  }
341 
342  uint16_t channelFlags = 0;
343  switch (rate)
344  {
345  case 2: //1Mbps
346  case 4: //2Mbps
347  case 10: //5Mbps
348  case 22: //11Mbps
349  channelFlags |= RadiotapHeader::CHANNEL_FLAG_CCK;
350  break;
351  default:
352  channelFlags |= RadiotapHeader::CHANNEL_FLAG_OFDM;
353  break;
354  }
355 
356  if (channelFreqMhz < 2500)
357  {
359  }
360  else
361  {
363  }
364 
365  header.SetChannelFrequencyAndFlags (channelFreqMhz, channelFlags);
366 
367  if (txVector.GetMode (staId).GetModulationClass () == WIFI_MOD_CLASS_HT)
368  {
369  uint8_t mcsKnown = RadiotapHeader::MCS_KNOWN_NONE;
370  uint8_t mcsFlags = RadiotapHeader::MCS_FLAGS_NONE;
371 
373 
375  if (txVector.GetChannelWidth () == 40)
376  {
378  }
379 
381  if (txVector.GetGuardInterval () == 400)
382  {
384  }
385 
387 
388  mcsKnown |= RadiotapHeader::MCS_KNOWN_NESS;
389  if (txVector.GetNess () & 0x01) //bit 1
390  {
392  }
393  if (txVector.GetNess () & 0x02) //bit 2
394  {
396  }
397 
398  mcsKnown |= RadiotapHeader::MCS_KNOWN_FEC_TYPE; //only BCC is currently supported
399 
400  mcsKnown |= RadiotapHeader::MCS_KNOWN_STBC;
401  if (txVector.IsStbc ())
402  {
404  }
405 
406  header.SetMcsFields (mcsKnown, mcsFlags, txVector.GetMode (staId).GetMcsValue ());
407  }
408 
409  if (txVector.IsAggregation ())
410  {
411  uint16_t ampduStatusFlags = RadiotapHeader::A_MPDU_STATUS_NONE;
412  ampduStatusFlags |= RadiotapHeader::A_MPDU_STATUS_LAST_KNOWN;
413  /* For PCAP file, MPDU Delimiter and Padding should be removed by the MAC Driver */
415  uint32_t extractedLength;
416  packet->RemoveHeader (hdr);
417  extractedLength = hdr.GetLength ();
418  packet = packet->CreateFragment (0, static_cast<uint32_t> (extractedLength));
419  if (aMpdu.type == LAST_MPDU_IN_AGGREGATE || (hdr.GetEof () == true && hdr.GetLength () > 0))
420  {
421  ampduStatusFlags |= RadiotapHeader::A_MPDU_STATUS_LAST;
422  }
423  header.SetAmpduStatus (aMpdu.mpduRefNumber, ampduStatusFlags, 1 /*CRC*/);
424  }
425 
426  if (txVector.GetMode (staId).GetModulationClass () == WIFI_MOD_CLASS_VHT)
427  {
428  uint16_t vhtKnown = RadiotapHeader::VHT_KNOWN_NONE;
429  uint8_t vhtFlags = RadiotapHeader::VHT_FLAGS_NONE;
430  uint8_t vhtBandwidth = 0;
431  uint8_t vhtMcsNss[4] = {0,0,0,0};
432  uint8_t vhtCoding = 0;
433  uint8_t vhtGroupId = 0;
434  uint16_t vhtPartialAid = 0;
435 
436  vhtKnown |= RadiotapHeader::VHT_KNOWN_STBC;
437  if (txVector.IsStbc ())
438  {
439  vhtFlags |= RadiotapHeader::VHT_FLAGS_STBC;
440  }
441 
443  if (txVector.GetGuardInterval () == 400)
444  {
446  }
447 
448  vhtKnown |= RadiotapHeader::VHT_KNOWN_BEAMFORMED; //Beamforming is currently not supported
449 
451  //not all bandwidth values are currently supported
452  if (txVector.GetChannelWidth () == 40)
453  {
454  vhtBandwidth = 1;
455  }
456  else if (txVector.GetChannelWidth () == 80)
457  {
458  vhtBandwidth = 4;
459  }
460  else if (txVector.GetChannelWidth () == 160)
461  {
462  vhtBandwidth = 11;
463  }
464 
465  //only SU PPDUs are currently supported
466  vhtMcsNss[0] |= (txVector.GetNss (staId) & 0x0f);
467  vhtMcsNss[0] |= ((txVector.GetMode (staId).GetMcsValue () << 4) & 0xf0);
468 
469  header.SetVhtFields (vhtKnown, vhtFlags, vhtBandwidth, vhtMcsNss, vhtCoding, vhtGroupId, vhtPartialAid);
470  }
471 
472  if (txVector.GetMode (staId).GetModulationClass () == WIFI_MOD_CLASS_HE)
473  {
475  if (preamble == WIFI_PREAMBLE_HE_ER_SU)
476  {
478  }
479  else if (preamble == WIFI_PREAMBLE_HE_MU)
480  {
483  }
484  else if (preamble == WIFI_PREAMBLE_HE_TB)
485  {
487  }
488 
489  uint16_t data2 = RadiotapHeader::HE_DATA2_GI_KNOWN;
490  if (preamble == WIFI_PREAMBLE_HE_MU || preamble == WIFI_PREAMBLE_HE_TB)
491  {
493  //HeRu indices start at 1 whereas RadioTap starts at 0
494  data2 |= (((txVector.GetHeMuUserInfo (staId).ru.GetIndex () - 1) << 8) & 0x3f00);
495  data2 |= (((!txVector.GetHeMuUserInfo (staId).ru.GetPrimary80MHz ()) << 15) & 0x8000);
496  }
497 
498  uint16_t data3 = 0;
499  data3 |= (txVector.GetBssColor () & 0x003f);
500  data3 |= ((txVector.GetMode (staId).GetMcsValue () << 8) & 0x0f00);
501 
502  uint16_t data4 = 0;
503  if (preamble == WIFI_PREAMBLE_HE_MU)
504  {
505  data4 |= ((staId << 4) & 0x7ff0);
506  }
507 
508  uint16_t data5 = 0;
509  if (preamble == WIFI_PREAMBLE_HE_MU || preamble == WIFI_PREAMBLE_HE_TB)
510  {
511  HeRu::RuType ruType = txVector.GetHeMuUserInfo (staId).ru.GetRuType ();
512  switch (ruType)
513  {
514  case HeRu::RU_26_TONE:
516  break;
517  case HeRu::RU_52_TONE:
519  break;
520  case HeRu::RU_106_TONE:
522  break;
523  case HeRu::RU_242_TONE:
525  break;
526  case HeRu::RU_484_TONE:
528  break;
529  case HeRu::RU_996_TONE:
531  break;
532  case HeRu::RU_2x996_TONE:
534  break;
535  default:
536  NS_ABORT_MSG ("Unexpected RU type");
537  }
538  }
539  else if (txVector.GetChannelWidth () == 40)
540  {
542  }
543  else if (txVector.GetChannelWidth () == 80)
544  {
546  }
547  else if (txVector.GetChannelWidth () == 160)
548  {
550  }
551  if (txVector.GetGuardInterval () == 1600)
552  {
554  }
555  else if (txVector.GetGuardInterval () == 3200)
556  {
558  }
559 
560  header.SetHeFields (data1, data2, data3, data4, data5, 0);
561  }
562 
563  if (preamble == WIFI_PREAMBLE_HE_MU)
564  {
565  //TODO: fill in fields (everything is set to 0 so far)
566  std::array<uint8_t, 4> ruChannel1, ruChannel2;
567  header.SetHeMuFields (0, 0, ruChannel1, ruChannel2);
568  header.SetHeMuPerUserFields (0, 0, 0, 0);
569  }
570 }
571 
572 void
574 {
575  switch (dlt)
576  {
577  case DLT_IEEE802_11:
579  return;
580  case DLT_PRISM_HEADER:
582  return;
585  return;
586  default:
587  NS_ABORT_MSG ("WifiPhyHelper::SetPcapFormat(): Unexpected format");
588  }
589 }
590 
593 {
594  return m_pcapDlt;
595 }
596 
597 void
598 WifiPhyHelper::EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename)
599 {
600  NS_LOG_FUNCTION (this << prefix << nd << promiscuous << explicitFilename);
601 
602  //All of the Pcap enable functions vector through here including the ones
603  //that are wandering through all of devices on perhaps all of the nodes in
604  //the system. We can only deal with devices of type WifiNetDevice.
605  Ptr<WifiNetDevice> device = nd->GetObject<WifiNetDevice> ();
606  if (device == 0)
607  {
608  NS_LOG_INFO ("WifiHelper::EnablePcapInternal(): Device " << &device << " not of type ns3::WifiNetDevice");
609  return;
610  }
611 
612  Ptr<WifiPhy> phy = device->GetPhy ();
613  NS_ABORT_MSG_IF (phy == 0, "WifiPhyHelper::EnablePcapInternal(): Phy layer in WifiNetDevice must be set");
614 
615  PcapHelper pcapHelper;
616 
617  std::string filename;
618  if (explicitFilename)
619  {
620  filename = prefix;
621  }
622  else
623  {
624  filename = pcapHelper.GetFilenameFromDevice (prefix, device);
625  }
626 
627  Ptr<PcapFileWrapper> file = pcapHelper.CreateFile (filename, std::ios::out, m_pcapDlt);
628 
629  phy->TraceConnectWithoutContext ("MonitorSnifferTx", MakeBoundCallback (&WifiPhyHelper::PcapSniffTxEvent, file));
630  phy->TraceConnectWithoutContext ("MonitorSnifferRx", MakeBoundCallback (&WifiPhyHelper::PcapSniffRxEvent, file));
631 }
632 
633 void
636  std::string prefix,
637  Ptr<NetDevice> nd,
638  bool explicitFilename)
639 {
640  //All of the ASCII enable functions vector through here including the ones
641  //that are wandering through all of devices on perhaps all of the nodes in
642  //the system. We can only deal with devices of type WifiNetDevice.
643  Ptr<WifiNetDevice> device = nd->GetObject<WifiNetDevice> ();
644  if (device == 0)
645  {
646  NS_LOG_INFO ("WifiHelper::EnableAsciiInternal(): Device " << device << " not of type ns3::WifiNetDevice");
647  return;
648  }
649 
650  //Our trace sinks are going to use packet printing, so we have to make sure
651  //that is turned on.
653 
654  uint32_t nodeid = nd->GetNode ()->GetId ();
655  uint32_t deviceid = nd->GetIfIndex ();
656  std::ostringstream oss;
657 
658  //If we are not provided an OutputStreamWrapper, we are expected to create
659  //one using the usual trace filename conventions and write our traces
660  //without a context since there will be one file per context and therefore
661  //the context would be redundant.
662  if (stream == 0)
663  {
664  //Set up an output stream object to deal with private ofstream copy
665  //constructor and lifetime issues. Let the helper decide the actual
666  //name of the file given the prefix.
667  AsciiTraceHelper asciiTraceHelper;
668 
669  std::string filename;
670  if (explicitFilename)
671  {
672  filename = prefix;
673  }
674  else
675  {
676  filename = asciiTraceHelper.GetFilenameFromDevice (prefix, device);
677  }
678 
679  Ptr<OutputStreamWrapper> theStream = asciiTraceHelper.CreateFileStream (filename);
680  //We could go poking through the PHY and the state looking for the
681  //correct trace source, but we can let Config deal with that with
682  //some search cost. Since this is presumably happening at topology
683  //creation time, it doesn't seem much of a price to pay.
684  oss.str ("");
685  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNetDevice/Phy/State/RxOk";
687 
688  oss.str ("");
689  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNetDevice/Phy/State/Tx";
691 
692  return;
693  }
694 
695  //If we are provided an OutputStreamWrapper, we are expected to use it, and
696  //to provide a context. We are free to come up with our own context if we
697  //want, and use the AsciiTraceHelper Hook*WithContext functions, but for
698  //compatibility and simplicity, we just use Config::Connect and let it deal
699  //with coming up with a context.
700  oss.str ("");
701  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNetDevice/Phy/State/RxOk";
703 
704  oss.str ("");
705  oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid << "/$ns3::WifiNetDevice/Phy/State/Tx";
707 }
708 
710 {
711 }
712 
714  : m_standard (WIFI_STANDARD_80211a),
715  m_selectQueueCallback (&SelectQueueByDSField)
716 {
717  SetRemoteStationManager ("ns3::ArfWifiManager");
718 }
719 
720 void
722  std::string n0, const AttributeValue &v0,
723  std::string n1, const AttributeValue &v1,
724  std::string n2, const AttributeValue &v2,
725  std::string n3, const AttributeValue &v3,
726  std::string n4, const AttributeValue &v4,
727  std::string n5, const AttributeValue &v5,
728  std::string n6, const AttributeValue &v6,
729  std::string n7, const AttributeValue &v7)
730 {
733  m_stationManager.Set (n0, v0);
734  m_stationManager.Set (n1, v1);
735  m_stationManager.Set (n2, v2);
736  m_stationManager.Set (n3, v3);
737  m_stationManager.Set (n4, v4);
738  m_stationManager.Set (n5, v5);
739  m_stationManager.Set (n6, v6);
740  m_stationManager.Set (n7, v7);
741 }
742 
743 void
745  std::string n0, const AttributeValue &v0,
746  std::string n1, const AttributeValue &v1,
747  std::string n2, const AttributeValue &v2,
748  std::string n3, const AttributeValue &v3,
749  std::string n4, const AttributeValue &v4,
750  std::string n5, const AttributeValue &v5,
751  std::string n6, const AttributeValue &v6,
752  std::string n7, const AttributeValue &v7)
753 {
756  m_obssPdAlgorithm.Set (n0, v0);
757  m_obssPdAlgorithm.Set (n1, v1);
758  m_obssPdAlgorithm.Set (n2, v2);
759  m_obssPdAlgorithm.Set (n3, v3);
760  m_obssPdAlgorithm.Set (n4, v4);
761  m_obssPdAlgorithm.Set (n5, v5);
762  m_obssPdAlgorithm.Set (n6, v6);
763  m_obssPdAlgorithm.Set (n7, v7);
764 }
765 
766 void
768 {
769  m_standard = standard;
770 }
771 
772 void
774 {
776 }
777 
780  const WifiMacHelper &macHelper,
782  NodeContainer::Iterator last) const
783 {
785  for (NodeContainer::Iterator i = first; i != last; ++i)
786  {
787  Ptr<Node> node = *i;
788  Ptr<WifiNetDevice> device = CreateObject<WifiNetDevice> ();
789  auto it = wifiStandards.find (m_standard);
790  if (it == wifiStandards.end ())
791  {
792  NS_FATAL_ERROR ("Selected standard is not defined!");
793  return devices;
794  }
795  if (it->second.phyStandard >= WIFI_PHY_STANDARD_80211n)
796  {
797  Ptr<HtConfiguration> htConfiguration = CreateObject<HtConfiguration> ();
798  device->SetHtConfiguration (htConfiguration);
799  }
800  if ((it->second.phyStandard >= WIFI_PHY_STANDARD_80211ac) && (it->second.phyBand != WIFI_PHY_BAND_2_4GHZ))
801  {
802  Ptr<VhtConfiguration> vhtConfiguration = CreateObject<VhtConfiguration> ();
803  device->SetVhtConfiguration (vhtConfiguration);
804  }
805  if (it->second.phyStandard >= WIFI_PHY_STANDARD_80211ax)
806  {
807  Ptr<HeConfiguration> heConfiguration = CreateObject<HeConfiguration> ();
808  device->SetHeConfiguration (heConfiguration);
809  }
811  Ptr<WifiPhy> phy = phyHelper.Create (node, device);
812  phy->ConfigureStandardAndBand (it->second.phyStandard, it->second.phyBand);
813  device->SetPhy (phy);
814  Ptr<WifiMac> mac = macHelper.Create (device, m_standard);
815  device->SetMac (mac);
816  device->SetRemoteStationManager (manager);
817  node->AddDevice (device);
818  if ((it->second.phyStandard >= WIFI_PHY_STANDARD_80211ax) && (m_obssPdAlgorithm.IsTypeIdSet ()))
819  {
821  device->AggregateObject (obssPdAlgorithm);
822  obssPdAlgorithm->ConnectWifiNetDevice (device);
823  }
824  devices.Add (device);
825  NS_LOG_DEBUG ("node=" << node << ", mob=" << node->GetObject<MobilityModel> ());
826  // Aggregate a NetDeviceQueueInterface object if a RegularWifiMac is installed
827  Ptr<RegularWifiMac> rmac = DynamicCast<RegularWifiMac> (mac);
828  if (rmac)
829  {
831  BooleanValue qosSupported;
832  Ptr<WifiMacQueue> wmq;
833 
834  rmac->GetAttributeFailSafe ("QosSupported", qosSupported);
835  if (qosSupported.Get ())
836  {
837  ndqi = CreateObjectWithAttributes<NetDeviceQueueInterface> ("NTxQueues",
838  UintegerValue (4));
839  for (auto& ac : {AC_BE, AC_BK, AC_VI, AC_VO})
840  {
841  Ptr<QosTxop> qosTxop = rmac->GetQosTxop (ac);
842  wmq = qosTxop->GetWifiMacQueue ();
843  ndqi->GetTxQueue (static_cast<std::size_t> (ac))->ConnectQueueTraces (wmq);
844  }
845  ndqi->SetSelectQueueCallback (m_selectQueueCallback);
846  }
847  else
848  {
849  ndqi = CreateObject<NetDeviceQueueInterface> ();
850 
851  wmq = rmac->GetTxop ()->GetWifiMacQueue ();
852  ndqi->GetTxQueue (0)->ConnectQueueTraces (wmq);
853  }
854  device->AggregateObject (ndqi);
855  }
856  }
857  return devices;
858 }
859 
862  const WifiMacHelper &macHelper, NodeContainer c) const
863 {
864  return Install (phyHelper, macHelper, c.Begin (), c.End ());
865 }
866 
869  const WifiMacHelper &mac, Ptr<Node> node) const
870 {
871  return Install (phy, mac, NodeContainer (node));
872 }
873 
876  const WifiMacHelper &mac, std::string nodeName) const
877 {
878  Ptr<Node> node = Names::Find<Node> (nodeName);
879  return Install (phy, mac, NodeContainer (node));
880 }
881 
882 void
884 {
887 
888  LogComponentEnable ("AarfWifiManager", LOG_LEVEL_ALL);
889  LogComponentEnable ("AarfcdWifiManager", LOG_LEVEL_ALL);
890  LogComponentEnable ("AdhocWifiMac", LOG_LEVEL_ALL);
891  LogComponentEnable ("AmrrWifiManager", LOG_LEVEL_ALL);
892  LogComponentEnable ("ApWifiMac", LOG_LEVEL_ALL);
893  LogComponentEnable ("AparfWifiManager", LOG_LEVEL_ALL);
894  LogComponentEnable ("ArfWifiManager", LOG_LEVEL_ALL);
895  LogComponentEnable ("BlockAckAgreement", LOG_LEVEL_ALL);
896  LogComponentEnable ("RecipientBlockAckAgreement", LOG_LEVEL_ALL);
897  LogComponentEnable ("BlockAckManager", LOG_LEVEL_ALL);
898  LogComponentEnable ("CaraWifiManager", LOG_LEVEL_ALL);
899  LogComponentEnable ("ChannelAccessManager", LOG_LEVEL_ALL);
900  LogComponentEnable ("ConstantObssPdAlgorithm", LOG_LEVEL_ALL);
901  LogComponentEnable ("ConstantRateWifiManager", LOG_LEVEL_ALL);
902  LogComponentEnable ("ChannelAccessManager", LOG_LEVEL_ALL);
903  LogComponentEnable ("DsssErrorRateModel", LOG_LEVEL_ALL);
904  LogComponentEnable ("DsssPhy", LOG_LEVEL_ALL);
905  LogComponentEnable ("DsssPpdu", LOG_LEVEL_ALL);
906  LogComponentEnable ("ErpOfdmPhy", LOG_LEVEL_ALL);
907  LogComponentEnable ("ErpOfdmPpdu", LOG_LEVEL_ALL);
908  LogComponentEnable ("FrameExchangeManager", LOG_LEVEL_ALL);
909  LogComponentEnable ("HeConfiguration", LOG_LEVEL_ALL);
910  LogComponentEnable ("HeFrameExchangeManager", LOG_LEVEL_ALL);
912  LogComponentEnable ("HePpdu", LOG_LEVEL_ALL);
913  LogComponentEnable ("HtConfiguration", LOG_LEVEL_ALL);
914  LogComponentEnable ("HtFrameExchangeManager", LOG_LEVEL_ALL);
916  LogComponentEnable ("HtPpdu", LOG_LEVEL_ALL);
917  LogComponentEnable ("IdealWifiManager", LOG_LEVEL_ALL);
918  LogComponentEnable ("InterferenceHelper", LOG_LEVEL_ALL);
919  LogComponentEnable ("MacRxMiddle", LOG_LEVEL_ALL);
920  LogComponentEnable ("MacTxMiddle", LOG_LEVEL_ALL);
921  LogComponentEnable ("MinstrelHtWifiManager", LOG_LEVEL_ALL);
922  LogComponentEnable ("MinstrelWifiManager", LOG_LEVEL_ALL);
923  LogComponentEnable ("MpduAggregator", LOG_LEVEL_ALL);
924  LogComponentEnable ("MsduAggregator", LOG_LEVEL_ALL);
925  LogComponentEnable ("MultiUserScheduler", LOG_LEVEL_ALL);
926  LogComponentEnable ("NistErrorRateModel", LOG_LEVEL_ALL);
927  LogComponentEnable ("ObssPdAlgorithm", LOG_LEVEL_ALL);
928  LogComponentEnable ("OfdmPhy", LOG_LEVEL_ALL);
929  LogComponentEnable ("OnoeWifiManager", LOG_LEVEL_ALL);
930  LogComponentEnable ("OriginatorBlockAckAgreement", LOG_LEVEL_ALL);
931  LogComponentEnable ("OfdmPpdu", LOG_LEVEL_ALL);
932  LogComponentEnable ("ParfWifiManager", LOG_LEVEL_ALL);
933  LogComponentEnable ("PhyEntity", LOG_LEVEL_ALL);
934  LogComponentEnable ("QosFrameExchangeManager", LOG_LEVEL_ALL);
935  LogComponentEnable ("QosTxop", LOG_LEVEL_ALL);
936  LogComponentEnable ("RegularWifiMac", LOG_LEVEL_ALL);
937  LogComponentEnable ("RraaWifiManager", LOG_LEVEL_ALL);
938  LogComponentEnable ("RrMultiUserScheduler", LOG_LEVEL_ALL);
939  LogComponentEnable ("RrpaaWifiManager", LOG_LEVEL_ALL);
940  LogComponentEnable ("SimpleFrameCaptureModel", LOG_LEVEL_ALL);
941  LogComponentEnable ("SpectrumWifiPhy", LOG_LEVEL_ALL);
942  LogComponentEnable ("StaWifiMac", LOG_LEVEL_ALL);
943  LogComponentEnable ("SupportedRates", LOG_LEVEL_ALL);
944  LogComponentEnable ("TableBasedErrorRateModel", LOG_LEVEL_ALL);
945  LogComponentEnable ("ThompsonSamplingWifiManager", LOG_LEVEL_ALL);
946  LogComponentEnable ("ThresholdPreambleDetectionModel", LOG_LEVEL_ALL);
948  LogComponentEnable ("VhtConfiguration", LOG_LEVEL_ALL);
949  LogComponentEnable ("VhtFrameExchangeManager", LOG_LEVEL_ALL);
950  LogComponentEnable ("VhtPhy", LOG_LEVEL_ALL);
951  LogComponentEnable ("VhtPpdu", LOG_LEVEL_ALL);
952  LogComponentEnable ("WifiAckManager", LOG_LEVEL_ALL);
953  LogComponentEnable ("WifiDefaultAckManager", LOG_LEVEL_ALL);
954  LogComponentEnable ("WifiDefaultProtectionManager", LOG_LEVEL_ALL);
955  LogComponentEnable ("WifiMac", LOG_LEVEL_ALL);
956  LogComponentEnable ("WifiMacQueue", LOG_LEVEL_ALL);
957  LogComponentEnable ("WifiMacQueueItem", LOG_LEVEL_ALL);
958  LogComponentEnable ("WifiNetDevice", LOG_LEVEL_ALL);
959  LogComponentEnable ("WifiPhyStateHelper", LOG_LEVEL_ALL);
960  LogComponentEnable ("WifiPhy", LOG_LEVEL_ALL);
961  LogComponentEnable ("WifiPhyOperatingChannel", LOG_LEVEL_ALL);
962  LogComponentEnable ("WifiPpdu", LOG_LEVEL_ALL);
963  LogComponentEnable ("WifiProtectionManager", LOG_LEVEL_ALL);
964  LogComponentEnable ("WifiPsdu", LOG_LEVEL_ALL);
965  LogComponentEnable ("WifiRadioEnergyModel", LOG_LEVEL_ALL);
966  LogComponentEnable ("WifiRemoteStationManager", LOG_LEVEL_ALL);
967  LogComponentEnable ("WifiSpectrumPhyInterface", LOG_LEVEL_ALL);
968  LogComponentEnable ("WifiSpectrumSignalParameters", LOG_LEVEL_ALL);
969  LogComponentEnable ("WifiTxCurrentModel", LOG_LEVEL_ALL);
970  LogComponentEnable ("WifiTxParameters", LOG_LEVEL_ALL);
971  LogComponentEnable ("WifiTxTimer", LOG_LEVEL_ALL);
972  LogComponentEnable ("YansErrorRateModel", LOG_LEVEL_ALL);
973  LogComponentEnable ("YansWifiChannel", LOG_LEVEL_ALL);
974  LogComponentEnable ("YansWifiPhy", LOG_LEVEL_ALL);
975 
976  //From Spectrum
977  LogComponentEnable ("WifiSpectrumValueHelper", LOG_LEVEL_ALL);
978 }
979 
980 int64_t
982 {
983  int64_t currentStream = stream;
984  Ptr<NetDevice> netDevice;
985  for (NetDeviceContainer::Iterator i = c.Begin (); i != c.End (); ++i)
986  {
987  netDevice = (*i);
988  Ptr<WifiNetDevice> wifi = DynamicCast<WifiNetDevice> (netDevice);
989  if (wifi)
990  {
991  //Handle any random numbers in the PHY objects.
992  currentStream += wifi->GetPhy ()->AssignStreams (currentStream);
993 
994  //Handle any random numbers in the station managers.
995  currentStream += wifi->GetRemoteStationManager ()->AssignStreams (currentStream);
996 
997  //Handle any random numbers in the MAC objects.
998  Ptr<WifiMac> mac = wifi->GetMac ();
999  Ptr<RegularWifiMac> rmac = DynamicCast<RegularWifiMac> (mac);
1000  if (rmac)
1001  {
1002  PointerValue ptr;
1003  rmac->GetAttribute ("Txop", ptr);
1004  Ptr<Txop> txop = ptr.Get<Txop> ();
1005  currentStream += txop->AssignStreams (currentStream);
1006 
1007  rmac->GetAttribute ("VO_Txop", ptr);
1008  Ptr<QosTxop> vo_txop = ptr.Get<QosTxop> ();
1009  currentStream += vo_txop->AssignStreams (currentStream);
1010 
1011  rmac->GetAttribute ("VI_Txop", ptr);
1012  Ptr<QosTxop> vi_txop = ptr.Get<QosTxop> ();
1013  currentStream += vi_txop->AssignStreams (currentStream);
1014 
1015  rmac->GetAttribute ("BE_Txop", ptr);
1016  Ptr<QosTxop> be_txop = ptr.Get<QosTxop> ();
1017  currentStream += be_txop->AssignStreams (currentStream);
1018 
1019  rmac->GetAttribute ("BK_Txop", ptr);
1020  Ptr<QosTxop> bk_txop = ptr.Get<QosTxop> ();
1021  currentStream += bk_txop->AssignStreams (currentStream);
1022 
1023  //if an AP, handle any beacon jitter
1024  Ptr<ApWifiMac> apmac = DynamicCast<ApWifiMac> (rmac);
1025  if (apmac)
1026  {
1027  currentStream += apmac->AssignStreams (currentStream);
1028  }
1029  }
1030  }
1031  }
1032  return (currentStream - stream);
1033 }
1034 
1035 } //namespace ns3
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition: net-device-container.h:42
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_106T
@ HE_DATA5_DATA_BW_RU_ALLOC_106T
106-tone RU allocation
Definition: radiotap-header.h:336
ns3::RadiotapHeader::SetHeMuPerUserFields
void SetHeMuPerUserFields(uint16_t perUser1, uint16_t perUser2, uint8_t perUserPosition, uint8_t perUserKnown)
Set the HE MU per user fields.
Definition: radiotap-header.cc:875
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::SignalNoiseDbm::noise
double noise
noise power in dBm
Definition: phy-entity.h:55
ns3::PcapHelper::CreateFile
Ptr< PcapFileWrapper > CreateFile(std::string filename, std::ios::openmode filemode, DataLinkType dataLinkType, uint32_t snapLen=std::numeric_limits< uint32_t >::max(), int32_t tzCorrection=0)
Create and initialize a pcap file.
Definition: trace-helper.cc:49
ns3::WifiTxVector::IsStbc
bool IsStbc(void) const
Check if STBC is used or not.
Definition: wifi-tx-vector.cc:213
ns3::WifiTxVector::GetBssColor
uint8_t GetBssColor(void) const
Get the BSS color.
Definition: wifi-tx-vector.cc:315
first
Definition: first.py:1
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_160MHZ
@ HE_DATA5_DATA_BW_RU_ALLOC_160MHZ
160 MHz data Bandwidth
Definition: radiotap-header.h:333
ns3::HeRu::RU_484_TONE
@ RU_484_TONE
Definition: he-ru.h:47
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition: boolean.h:37
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_996T
@ HE_DATA5_DATA_BW_RU_ALLOC_996T
996-tone RU allocation
Definition: radiotap-header.h:339
ns3::RadiotapHeader::VHT_KNOWN_STBC
@ VHT_KNOWN_STBC
Space-time block coding (1 if all spatial streams of all users have STBC, 0 otherwise).
Definition: radiotap-header.h:243
ns3::WifiPhyHelper::EnablePcapInternal
virtual void EnablePcapInternal(std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename) override
Enable pcap output the indicated net device.
Definition: wifi-helper.cc:598
ns3::WifiPhyHelper::PcapSniffTxEvent
static void PcapSniffTxEvent(Ptr< PcapFileWrapper > file, Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, uint16_t staId=SU_STA_ID)
Definition: wifi-helper.cc:221
ns3::RadiotapHeader::HE_DATA1_FORMAT_MU
@ HE_DATA1_FORMAT_MU
HE MU PPDU format.
Definition: radiotap-header.h:290
ns3::Node::GetId
uint32_t GetId(void) const
Definition: node.cc:109
ns3::Packet::AddHeader
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
ns3::WifiNetDevice::GetPhy
Ptr< WifiPhy > GetPhy(void) const
Definition: wifi-net-device.cc:207
ns3::Packet::CreateFragment
Ptr< Packet > CreateFragment(uint32_t start, uint32_t length) const
Create a new packet which contains a fragment of the original packet.
Definition: packet.cc:227
ns3::WifiPhyHelper::PcapSniffRxEvent
static void PcapSniffRxEvent(Ptr< PcapFileWrapper > file, Ptr< const Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, SignalNoiseDbm signalNoise, uint16_t staId=SU_STA_ID)
Definition: wifi-helper.cc:255
ns3::Simulator::Now
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_80MHZ
@ HE_DATA5_DATA_BW_RU_ALLOC_80MHZ
80 MHz data Bandwidth
Definition: radiotap-header.h:332
ns3::WifiPhyHelper::EnableAsciiInternal
virtual void EnableAsciiInternal(Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename) override
Enable ASCII trace output on the indicated net device.
Definition: wifi-helper.cc:634
ns3::WifiNetDevice::SetMac
void SetMac(const Ptr< WifiMac > mac)
Definition: wifi-net-device.cc:180
ns3::PcapHelper::GetFilenameFromDevice
std::string GetFilenameFromDevice(std::string prefix, Ptr< NetDevice > device, bool useObjectNames=true)
Let the pcap helper figure out a reasonable filename to use for a pcap file associated with a device.
Definition: trace-helper.cc:80
ns3::WIFI_MOD_CLASS_HT
@ WIFI_MOD_CLASS_HT
HT (Clause 19)
Definition: wifi-phy-common.h:125
ns3::WIFI_MOD_CLASS_HE
@ WIFI_MOD_CLASS_HE
HE (Clause 27)
Definition: wifi-phy-common.h:127
wifi-helper.h
ns3::WifiHelper::EnableLogComponents
static void EnableLogComponents(void)
Helper to enable all WifiNetDevice log components with one statement.
Definition: wifi-helper.cc:883
ns3::RadiotapHeader::MCS_KNOWN_STBC
@ MCS_KNOWN_STBC
STBC known.
Definition: radiotap-header.h:184
ns3::HeRu::RU_106_TONE
@ RU_106_TONE
Definition: he-ru.h:45
ns3::LOG_PREFIX_NODE
@ LOG_PREFIX_NODE
Prefix all trace prints with simulation node.
Definition: log.h:120
ns3::WifiNetDevice::SetHeConfiguration
void SetHeConfiguration(Ptr< HeConfiguration > heConfiguration)
Definition: wifi-net-device.cc:474
ns3::RadiotapHeader::MCS_KNOWN_NESS
@ MCS_KNOWN_NESS
Ness known (Number of extension spatial streams)
Definition: radiotap-header.h:185
ns3::Object::GetObject
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:470
ns3::Packet::EnablePrinting
static void EnablePrinting(void)
Enable printing packets metadata.
Definition: packet.cc:572
ns3::RadiotapHeader::VHT_KNOWN_GUARD_INTERVAL
@ VHT_KNOWN_GUARD_INTERVAL
Guard interval.
Definition: radiotap-header.h:245
ns3::LOG_LEVEL_ALL
@ LOG_LEVEL_ALL
Print everything.
Definition: log.h:116
ns3::AttributeValue
Hold a value for an Attribute.
Definition: attribute.h:69
ns3::WifiHelper::m_stationManager
ObjectFactory m_stationManager
station manager
Definition: wifi-helper.h:500
ns3::RadiotapHeader::SetHeFields
void SetHeFields(uint16_t data1, uint16_t data2, uint16_t data3, uint16_t data4, uint16_t data5, uint16_t data6)
Set the HE fields.
Definition: radiotap-header.cc:839
ns3::WifiNetDevice::SetVhtConfiguration
void SetVhtConfiguration(Ptr< VhtConfiguration > vhtConfiguration)
Definition: wifi-net-device.cc:462
ns3::RadiotapHeader
Radiotap header implementation.
Definition: radiotap-header.h:38
ns3::WifiMode::GetModulationClass
WifiModulationClass GetModulationClass() const
Definition: wifi-mode.cc:159
ns3::RadiotapHeader::FRAME_FLAG_SHORT_GUARD
@ FRAME_FLAG_SHORT_GUARD
Frame used short guard interval (HT)
Definition: radiotap-header.h:116
ns3::WifiPhyHelper::m_errorRateModel
ObjectFactory m_errorRateModel
error rate model
Definition: wifi-helper.h:241
ns3::LogComponentEnable
void LogComponentEnable(char const *name, enum LogLevel level)
Enable the logging output associated with that log component.
Definition: log.cc:361
ns3::LogComponentEnableAll
void LogComponentEnableAll(enum LogLevel level)
Enable the logging output for all registered log components.
Definition: log.cc:385
ns3::WifiRemoteStationManager
hold a list of per-remote-station state.
Definition: wifi-remote-station-manager.h:121
ns3::WifiPhyHelper::m_preambleDetectionModel
ObjectFactory m_preambleDetectionModel
preamble detection model
Definition: wifi-helper.h:243
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::RadiotapHeader::HE_DATA1_SPTL_REUSE2_KNOWN
@ HE_DATA1_SPTL_REUSE2_KNOWN
Spatial Reuse 2 known (HE TRIG PPDU format), STA-ID known (HE MU PPDU format)
Definition: radiotap-header.h:301
ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO
@ DLT_IEEE802_11_RADIO
Include Radiotap link layer information.
Definition: wifi-helper.h:180
ns3::OutputStreamWrapper::GetStream
std::ostream * GetStream(void)
Return a pointer to an ostream previously set in the wrapper.
Definition: output-stream-wrapper.cc:58
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::ObjectFactory::IsTypeIdSet
bool IsTypeIdSet(void) const
Check if the ObjectFactory has been configured with a TypeId.
Definition: object-factory.cc:58
third.mac
mac
Definition: third.py:99
ns3::Txop::AssignStreams
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition: txop.cc:304
ns3::RadiotapHeader::VHT_KNOWN_NONE
@ VHT_KNOWN_NONE
No flags set.
Definition: radiotap-header.h:242
ns3::WifiHelper::SetObssPdAlgorithm
void SetObssPdAlgorithm(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition: wifi-helper.cc:744
ns3::RadiotapHeader::SetHeMuFields
void SetHeMuFields(uint16_t flags1, uint16_t flags2, const std::array< uint8_t, 4 > &ruChannel1, const std::array< uint8_t, 4 > &ruChannel2)
Set the HE MU fields.
Definition: radiotap-header.cc:859
ns3::RadiotapHeader::CHANNEL_FLAG_SPECTRUM_5GHZ
@ CHANNEL_FLAG_SPECTRUM_5GHZ
5 GHz spectrum channel
Definition: radiotap-header.h:141
ns3::WifiPhyHelper::SetErrorRateModel
void SetErrorRateModel(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition: wifi-helper.cc:146
ns3::RadiotapHeader::SetRate
void SetRate(uint8_t rate)
Set the transmit/receive channel frequency in units of megahertz.
Definition: radiotap-header.cc:698
ns3::RadiotapHeader::VHT_KNOWN_BANDWIDTH
@ VHT_KNOWN_BANDWIDTH
Bandwidth known.
Definition: radiotap-header.h:249
ns3::WifiHelper::SetSelectQueueCallback
void SetSelectQueueCallback(SelectQueueCallback f)
Definition: wifi-helper.cc:773
first.devices
devices
Definition: first.py:39
ns3::RadiotapHeader::MCS_KNOWN_NONE
@ MCS_KNOWN_NONE
No flags set.
Definition: radiotap-header.h:178
ns3::WifiHelper::m_standard
WifiStandard m_standard
wifi standard
Definition: wifi-helper.h:502
ns3::RadiotapHeader::VHT_KNOWN_BEAMFORMED
@ VHT_KNOWN_BEAMFORMED
Beamformed known/applicable (this flag should be set to zero for MU PPDUs).
Definition: radiotap-header.h:248
ns3::SignalNoiseDbm
SignalNoiseDbm structure.
Definition: phy-entity.h:53
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_52T
@ HE_DATA5_DATA_BW_RU_ALLOC_52T
52-tone RU allocation
Definition: radiotap-header.h:335
ns3::WifiNetDevice
Hold together all Wifi-related objects.
Definition: wifi-net-device.h:54
ns3::WifiNetDevice::SetHtConfiguration
void SetHtConfiguration(Ptr< HtConfiguration > htConfiguration)
Definition: wifi-net-device.cc:450
ns3::HeRu::RU_2x996_TONE
@ RU_2x996_TONE
Definition: he-ru.h:49
ns3::MpduInfo::mpduRefNumber
uint32_t mpduRefNumber
MPDU ref number.
Definition: phy-entity.h:62
ns3::RadiotapHeader::SetAntennaSignalPower
void SetAntennaSignalPower(double signal)
Set the RF signal power at the antenna as a decibel difference from an arbitrary, fixed reference.
Definition: radiotap-header.cc:730
ns3::RadiotapHeader::SetAmpduStatus
void SetAmpduStatus(uint32_t referenceNumber, uint16_t flags, uint8_t crc)
Set the A-MPDU status fields.
Definition: radiotap-header.cc:798
ns3::RadiotapHeader::SetVhtFields
void SetVhtFields(uint16_t known, uint8_t flags, uint8_t bandwidth, uint8_t mcs_nss[4], uint8_t coding, uint8_t group_id, uint16_t partial_aid)
Set the VHT fields.
Definition: radiotap-header.cc:815
ns3::HeRu::RuSpec::GetPrimary80MHz
bool GetPrimary80MHz(void) const
Get the primary 80 MHz flag.
Definition: he-ru.cc:181
ns3::RadiotapHeader::SetMcsFields
void SetMcsFields(uint8_t known, uint8_t flags, uint8_t mcs)
Set the MCS fields.
Definition: radiotap-header.cc:782
ns3::PcapHelper::DLT_IEEE802_11
@ DLT_IEEE802_11
Definition: trace-helper.h:55
third.wifi
wifi
Definition: third.py:96
ns3::WifiPhyHelper::DisablePreambleDetectionModel
void DisablePreambleDetectionModel()
Disable the preamble detection model.
Definition: wifi-helper.cc:215
ns3::Ptr< OutputStreamWrapper >
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
ns3::WifiPhyHelper::GetPcapDataLinkType
PcapHelper::DataLinkType GetPcapDataLinkType(void) const
Get the data link type of PCAP traces to be used.
Definition: wifi-helper.cc:592
ns3::WIFI_PHY_STANDARD_80211ax
@ WIFI_PHY_STANDARD_80211ax
HE PHY (clause 26)
Definition: wifi-standards.h:49
ns3::RadiotapHeader::MCS_FLAGS_BANDWIDTH_40
@ MCS_FLAGS_BANDWIDTH_40
40 MHz
Definition: radiotap-header.h:195
ns3::RadiotapHeader::MCS_KNOWN_GUARD_INTERVAL
@ MCS_KNOWN_GUARD_INTERVAL
Guard interval.
Definition: radiotap-header.h:181
ns3::WifiHelper::~WifiHelper
virtual ~WifiHelper()
Definition: wifi-helper.cc:709
ns3::Config::ConnectWithoutContext
void ConnectWithoutContext(std::string path, const CallbackBase &cb)
Definition: config.cc:901
ns3::NetDeviceContainer::Begin
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
Definition: net-device-container.cc:46
ns3::AC_VI
@ AC_VI
Video.
Definition: qos-utils.h:77
ns3::MpduInfo
MpduInfo structure.
Definition: phy-entity.h:60
ns3::AsciiPhyReceiveSinkWithContext
static void AsciiPhyReceiveSinkWithContext(Ptr< OutputStreamWrapper > stream, std::string context, Ptr< const Packet > p, double snr, WifiMode mode, enum WifiPreamble preamble)
ASCII Phy receive sink with context.
Definition: wave-helper.cc:88
ns3::RadiotapHeader::HE_DATA5_GI_1_6
@ HE_DATA5_GI_1_6
1.6us GI
Definition: radiotap-header.h:341
ns3::WifiMode
represent a single transmission mode
Definition: wifi-mode.h:48
ns3::PcapHelper::DLT_PRISM_HEADER
@ DLT_PRISM_HEADER
Definition: trace-helper.h:57
ns3::WIFI_PREAMBLE_HE_ER_SU
@ WIFI_PREAMBLE_HE_ER_SU
Definition: wifi-phy-common.h:70
ns3::WifiPhyHelper::m_pcapDlt
PcapHelper::DataLinkType m_pcapDlt
PCAP data link type.
Definition: wifi-helper.h:315
ns3::NodeContainer::Begin
Iterator Begin(void) const
Get an iterator which refers to the first Node in the container.
Definition: node-container.cc:77
ns3::WifiPhyHelper::m_frameCaptureModel
ObjectFactory m_frameCaptureModel
frame capture model
Definition: wifi-helper.h:242
ns3::RadiotapHeader::HE_DATA1_FORMAT_EXT_SU
@ HE_DATA1_FORMAT_EXT_SU
HE EXT SU PPDU format.
Definition: radiotap-header.h:289
ns3::WifiHelper::WifiHelper
WifiHelper()
Create a Wifi helper in an empty state: all its parameters must be set before calling ns3::WifiHelper...
Definition: wifi-helper.cc:713
ns3::RadiotapHeader::MCS_FLAGS_NONE
@ MCS_FLAGS_NONE
Default: 20 MHz, long guard interval, mixed HT format and BCC FEC type.
Definition: radiotap-header.h:194
NS_LOG_INFO
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
ns3::AsciiTraceHelper::CreateFileStream
Ptr< OutputStreamWrapper > CreateFileStream(std::string filename, std::ios::openmode filemode=std::ios::out)
Create and initialize an output stream object we'll use to write the traced bits.
Definition: trace-helper.cc:191
ns3::NetDevice::GetNode
virtual Ptr< Node > GetNode(void) const =0
ns3::RadiotapHeader::SetAntennaNoisePower
void SetAntennaNoisePower(double noise)
Set the RF noise power at the antenna as a decibel difference from an arbitrary, fixed reference.
Definition: radiotap-header.cc:756
ns3::RadiotapHeader::CHANNEL_FLAG_CCK
@ CHANNEL_FLAG_CCK
CCK channel.
Definition: radiotap-header.h:138
ns3::WifiPhyHelper::~WifiPhyHelper
virtual ~WifiPhyHelper()
Definition: wifi-helper.cc:135
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_2x996T
@ HE_DATA5_DATA_BW_RU_ALLOC_2x996T
2x996-tone RU allocation
Definition: radiotap-header.h:340
ns3::WIFI_STANDARD_80211a
@ WIFI_STANDARD_80211a
Definition: wifi-standards.h:127
ns3::Packet::RemoveHeader
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
ns3::Txop::GetWifiMacQueue
Ptr< WifiMacQueue > GetWifiMacQueue() const
Return the packet queue associated with this Txop.
Definition: txop.cc:149
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition: object-factory.h:48
ns3::HeRu::RuType
RuType
The different HE Resource Unit (RU) types.
Definition: he-ru.h:42
ns3::Object::AggregateObject
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Definition: object.cc:252
ns3::AC_BE
@ AC_BE
Best Effort.
Definition: qos-utils.h:73
ns3::RadiotapHeader::FRAME_FLAG_NONE
@ FRAME_FLAG_NONE
No flags set.
Definition: radiotap-header.h:108
ns3::RadiotapHeader::MCS_KNOWN_BANDWIDTH
@ MCS_KNOWN_BANDWIDTH
Bandwidth.
Definition: radiotap-header.h:179
ns3::PointerValue::Get
Ptr< T > Get(void) const
Definition: pointer.h:201
ns3::WifiTxVector::IsAggregation
bool IsAggregation(void) const
Checks whether the PSDU contains A-MPDU.
Definition: wifi-tx-vector.cc:207
ns3::RadiotapHeader::VHT_FLAGS_STBC
@ VHT_FLAGS_STBC
Set if all spatial streams of all users have space-time block coding.
Definition: radiotap-header.h:260
ns3::AC_BK
@ AC_BK
Background.
Definition: qos-utils.h:75
ns3::WifiHelper::SelectQueueCallback
std::function< std::size_t(Ptr< QueueItem >)> SelectQueueCallback
Callback invoked to determine the MAC queue selected for a given packet.
Definition: wifi-helper.h:406
ns3::WIFI_PREAMBLE_HE_MU
@ WIFI_PREAMBLE_HE_MU
Definition: wifi-phy-common.h:71
ns3::WifiTxVector::GetNess
uint8_t GetNess(void) const
Definition: wifi-tx-vector.cc:201
ns3::AsciiPhyTransmitSinkWithContext
static void AsciiPhyTransmitSinkWithContext(Ptr< OutputStreamWrapper > stream, std::string context, Ptr< const Packet > p, WifiMode mode, WifiPreamble preamble, uint8_t txLevel)
ASCII Phy transmit sink with context.
Definition: wave-helper.cc:46
ns3::WifiTxVector::GetPreambleType
WifiPreamble GetPreambleType(void) const
Definition: wifi-tx-vector.cc:147
ns3::HeRu::RuSpec::GetIndex
std::size_t GetIndex(void) const
Get the RU index.
Definition: he-ru.cc:174
ns3::WifiPhyHelper::DLT_IEEE802_11
@ DLT_IEEE802_11
IEEE 802.11 Wireless LAN headers on packets.
Definition: wifi-helper.h:178
ns3::RadiotapHeader::MCS_KNOWN_HT_FORMAT
@ MCS_KNOWN_HT_FORMAT
HT format.
Definition: radiotap-header.h:182
ns3::WifiTxVector::GetHeMuUserInfo
HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const
Get the HE MU user-specific transmission information for the given STA-ID.
Definition: wifi-tx-vector.cc:403
ns3::WifiHelper::m_obssPdAlgorithm
ObjectFactory m_obssPdAlgorithm
OBSS_PD algorithm.
Definition: wifi-helper.h:504
ns3::RadiotapHeader::HE_DATA2_RU_OFFSET_KNOWN
@ HE_DATA2_RU_OFFSET_KNOWN
RU allocation offset known.
Definition: radiotap-header.h:322
NS_ABORT_MSG_IF
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Definition: abort.h:108
ns3::Node::AddDevice
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Definition: node.cc:130
ns3::PcapHelper
Manage pcap files for device models.
Definition: trace-helper.h:39
ns3::AmpduSubframeHeader
Headers for A-MPDU subframes.
Definition: ampdu-subframe-header.h:33
ns3::NetDeviceContainer::End
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
Definition: net-device-container.cc:51
ns3::RadiotapHeader::HE_DATA1_DATA_MCS_KNOWN
@ HE_DATA1_DATA_MCS_KNOWN
data MCS known
Definition: radiotap-header.h:295
ns3::AsciiPhyTransmitSinkWithoutContext
static void AsciiPhyTransmitSinkWithoutContext(Ptr< OutputStreamWrapper > stream, Ptr< const Packet > p, WifiMode mode, WifiPreamble preamble, uint8_t txLevel)
ASCII Phy transmit sink without context.
Definition: wave-helper.cc:67
ns3::WifiTxVector::GetChannelWidth
uint16_t GetChannelWidth(void) const
Definition: wifi-tx-vector.cc:153
ns3::AmpduSubframeHeader::GetLength
uint16_t GetLength(void) const
Return the length field.
Definition: ampdu-subframe-header.cc:102
ns3::WifiPhyHelper::m_phy
ObjectFactory m_phy
PHY object.
Definition: wifi-helper.h:240
ns3::RadiotapHeader::HE_DATA1_BSS_COLOR_KNOWN
@ HE_DATA1_BSS_COLOR_KNOWN
BSS Color known.
Definition: radiotap-header.h:292
ns3::HeRu::RU_242_TONE
@ RU_242_TONE
Definition: he-ru.h:46
ns3::QosTxop
Handle packet fragmentation and retransmissions for QoS data frames as well as MSDU aggregation (A-MS...
Definition: qos-txop.h:75
ns3::WifiPhyHelper::Create
virtual Ptr< WifiPhy > Create(Ptr< Node > node, Ptr< NetDevice > device) const =0
ns3::HeMuUserInfo::ru
HeRu::RuSpec ru
RU specification.
Definition: wifi-tx-vector.h:35
ns3::PcapHelper::DLT_IEEE802_11_RADIO
@ DLT_IEEE802_11_RADIO
Definition: trace-helper.h:58
ns3::WifiPhyHelper::GetRadiotapHeader
static void GetRadiotapHeader(RadiotapHeader &header, Ptr< Packet > packet, uint16_t channelFreqMhz, WifiTxVector txVector, MpduInfo aMpdu, uint16_t staId)
Get the Radiotap header for a transmitted packet.
Definition: wifi-helper.cc:305
ns3::WIFI_PHY_STANDARD_80211n
@ WIFI_PHY_STANDARD_80211n
HT PHY (clause 20)
Definition: wifi-standards.h:45
ns3::WifiHelper::SetRemoteStationManager
void SetRemoteStationManager(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition: wifi-helper.cc:721
ns3::WIFI_PHY_STANDARD_80211ac
@ WIFI_PHY_STANDARD_80211ac
VHT PHY (clause 22)
Definition: wifi-standards.h:47
ns3::SelectQueueByDSField
uint8_t SelectQueueByDSField(Ptr< QueueItem > item)
Determine the TX queue for a given packet.
Definition: qos-utils.cc:252
ns3::WifiHelper::AssignStreams
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the PHY and MAC aspects ...
Definition: wifi-helper.cc:981
ns3::WifiPreamble
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-phy-common.h:63
ns3::NetDeviceContainer::Iterator
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator.
Definition: net-device-container.h:45
ns3::AsciiTraceHelper
Manage ASCII trace files for device models.
Definition: trace-helper.h:163
ns3::RadiotapHeader::MCS_KNOWN_INDEX
@ MCS_KNOWN_INDEX
MCS index known.
Definition: radiotap-header.h:180
ns3::RadiotapHeader::HE_DATA5_GI_3_2
@ HE_DATA5_GI_3_2
3.2us GI
Definition: radiotap-header.h:342
ns3::AC_VO
@ AC_VO
Voice.
Definition: qos-utils.h:79
ns3::RadiotapHeader::MCS_FLAGS_STBC_STREAMS
@ MCS_FLAGS_STBC_STREAMS
STBC enabled.
Definition: radiotap-header.h:201
ns3::WifiPhyHelper::WifiPhyHelper
WifiPhyHelper()
Definition: wifi-helper.cc:129
ns3::NodeContainer::Iterator
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Definition: node-container.h:42
ns3::RadiotapHeader::SetTsft
void SetTsft(uint64_t tsft)
Set the Time Synchronization Function Timer (TSFT) value.
Definition: radiotap-header.cc:668
ns3::WifiPhyHelper::SetPcapDataLinkType
void SetPcapDataLinkType(SupportedPcapDataLinkTypes dlt)
Set the data link type of PCAP traces to be used.
Definition: wifi-helper.cc:573
ns3::LOG_PREFIX_TIME
@ LOG_PREFIX_TIME
Prefix all trace prints with simulation time.
Definition: log.h:119
ns3::WifiTxVector::GetGuardInterval
uint16_t GetGuardInterval(void) const
Definition: wifi-tx-vector.cc:159
ns3::Config::Connect
void Connect(std::string path, const CallbackBase &cb)
Definition: config.cc:920
ns3::ObssPdAlgorithm
OBSS PD algorithm interface.
Definition: obss-pd-algorithm.h:46
ns3::WIFI_PHY_BAND_2_4GHZ
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Definition: wifi-phy-band.h:35
ns3::AsciiPhyReceiveSinkWithoutContext
static void AsciiPhyReceiveSinkWithoutContext(Ptr< OutputStreamWrapper > stream, Ptr< const Packet > p, double snr, WifiMode mode, enum WifiPreamble preamble)
ASCII Phy receive sink without context.
Definition: wave-helper.cc:109
ns3::WifiTxVector::GetNss
uint8_t GetNss(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the number of spatial streams.
Definition: wifi-tx-vector.cc:171
ns3::WifiHelper::SetStandard
virtual void SetStandard(WifiStandard standard)
Definition: wifi-helper.cc:767
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_26T
@ HE_DATA5_DATA_BW_RU_ALLOC_26T
26-tone RU allocation
Definition: radiotap-header.h:334
ns3::RadiotapHeader::HE_DATA1_FORMAT_TRIG
@ HE_DATA1_FORMAT_TRIG
HE TRIG PPDU format.
Definition: radiotap-header.h:291
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::RadiotapHeader::A_MPDU_STATUS_LAST_KNOWN
@ A_MPDU_STATUS_LAST_KNOWN
Last subframe is known (should be set for all subframes in an A-MPDU)
Definition: radiotap-header.h:222
ns3::WifiPhyHelper
create PHY objects
Definition: wifi-helper.h:48
ns3::RadiotapHeader::FRAME_FLAG_SHORT_PREAMBLE
@ FRAME_FLAG_SHORT_PREAMBLE
Frame sent/received with short preamble.
Definition: radiotap-header.h:110
ns3::WifiHelper::m_selectQueueCallback
SelectQueueCallback m_selectQueueCallback
select queue callback
Definition: wifi-helper.h:503
ns3::HeRu::RU_26_TONE
@ RU_26_TONE
Definition: he-ru.h:43
ns3::RadiotapHeader::A_MPDU_STATUS_LAST
@ A_MPDU_STATUS_LAST
This frame is the last subframe.
Definition: radiotap-header.h:223
ns3::MakeBoundCallback
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Definition: callback.h:1703
ns3::RadiotapHeader::CHANNEL_FLAG_SPECTRUM_2GHZ
@ CHANNEL_FLAG_SPECTRUM_2GHZ
2 GHz spectrum channel
Definition: radiotap-header.h:140
ns3::WifiPhyHelper::SetPreambleDetectionModel
void SetPreambleDetectionModel(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition: wifi-helper.cc:192
ns3::Packet::Copy
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
ns3::WifiNetDevice::SetRemoteStationManager
void SetRemoteStationManager(const Ptr< WifiRemoteStationManager > manager)
Definition: wifi-net-device.cc:194
ns3::ObjectFactory::Set
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Definition: object-factory.h:223
f
double f(double x, void *params)
Definition: 80211b.c:70
ns3::RadiotapHeader::VHT_FLAGS_GUARD_INTERVAL
@ VHT_FLAGS_GUARD_INTERVAL
Short guard interval.
Definition: radiotap-header.h:262
ns3::HeRu::RuSpec::GetRuType
RuType GetRuType(void) const
Get the RU type.
Definition: he-ru.cc:167
ns3::RadiotapHeader::SetChannelFrequencyAndFlags
void SetChannelFrequencyAndFlags(uint16_t frequency, uint16_t flags)
Set the transmit/receive channel frequency and flags.
Definition: radiotap-header.cc:713
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
ns3::MobilityModel
Keep track of the current position and velocity of an object.
Definition: mobility-model.h:40
ns3::NodeContainer
keep track of a set of node pointers.
Definition: node-container.h:39
ns3::WifiPhyHelper::SupportedPcapDataLinkTypes
SupportedPcapDataLinkTypes
An enumeration of the pcap data link types (DLTs) which this helper supports.
Definition: wifi-helper.h:177
ns3::NodeContainer::End
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Definition: node-container.cc:82
ns3::RadiotapHeader::VHT_FLAGS_NONE
@ VHT_FLAGS_NONE
No flags set.
Definition: radiotap-header.h:259
ns3::WifiPhyHelper::SetFrameCaptureModel
void SetFrameCaptureModel(std::string name, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
Definition: wifi-helper.cc:169
ns3::RadiotapHeader::MCS_FLAGS_GUARD_INTERVAL
@ MCS_FLAGS_GUARD_INTERVAL
Short guard interval.
Definition: radiotap-header.h:198
ns3::ObjectFactory::SetTypeId
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
Definition: object-factory.cc:40
ns3::RadiotapHeader::MCS_FLAGS_NESS_BIT_0
@ MCS_FLAGS_NESS_BIT_0
Ness - bit 0 (LSB) of Number of extension spatial streams.
Definition: radiotap-header.h:202
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::BooleanValue::Get
bool Get(void) const
Definition: boolean.cc:51
ns3::LAST_MPDU_IN_AGGREGATE
@ LAST_MPDU_IN_AGGREGATE
The MPDU is the last aggregate in an A-MPDU with multiple MPDUs.
Definition: wifi-mpdu-type.h:41
ns3::ObjectFactory::Create
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
Definition: object-factory.cc:98
ns3::WifiPhyHelper::DLT_PRISM_HEADER
@ DLT_PRISM_HEADER
Include Prism monitor mode information.
Definition: wifi-helper.h:179
ns3::WifiMacHelper
create MAC layers for a ns3::WifiNetDevice.
Definition: wifi-mac-helper.h:48
ns3::AsciiTraceHelper::GetFilenameFromDevice
std::string GetFilenameFromDevice(std::string prefix, Ptr< NetDevice > device, bool useObjectNames=true)
Let the ascii trace helper figure out a reasonable filename to use for an ascii trace file associated...
Definition: trace-helper.cc:212
ns3::wifiStandards
const std::map< WifiStandard, WifiStandardInfo > wifiStandards
map a given standard configured by the user to the corresponding WifiStandardInfo
Definition: wifi-standards.h:188
ns3::MpduInfo::type
MpduType type
type of MPDU
Definition: phy-entity.h:61
ns3::SignalNoiseDbm::signal
double signal
signal strength in dBm
Definition: phy-entity.h:54
ns3::RadiotapHeader::HE_DATA1_BW_RU_ALLOC_KNOWN
@ HE_DATA1_BW_RU_ALLOC_KNOWN
data BW/RU allocation known
Definition: radiotap-header.h:304
ns3::WifiStandard
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
Definition: wifi-standards.h:126
ns3::WifiMode::GetDataRate
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
Definition: wifi-mode.cc:100
ns3::WIFI_MOD_CLASS_VHT
@ WIFI_MOD_CLASS_VHT
VHT (Clause 22)
Definition: wifi-phy-common.h:126
ns3::WifiMacHelper::Create
virtual Ptr< WifiMac > Create(Ptr< NetDevice > device, WifiStandard standard) const
Definition: wifi-mac-helper.cc:46
ns3::PcapHelper::DataLinkType
DataLinkType
This enumeration holds the data link types that will be written to the pcap file.
Definition: trace-helper.h:50
create-module.file
file
Definition: create-module.py:634
ns3::WIFI_PREAMBLE_HE_TB
@ WIFI_PREAMBLE_HE_TB
Definition: wifi-phy-common.h:72
ns3::NetDevice::GetIfIndex
virtual uint32_t GetIfIndex(void) const =0
ns3::WifiPhyHelper::Set
void Set(std::string name, const AttributeValue &v)
Definition: wifi-helper.cc:140
ns3::RadiotapHeader::CHANNEL_FLAG_OFDM
@ CHANNEL_FLAG_OFDM
OFDM channel.
Definition: radiotap-header.h:139
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_484T
@ HE_DATA5_DATA_BW_RU_ALLOC_484T
484-tone RU allocation
Definition: radiotap-header.h:338
ns3::HeRu::RU_996_TONE
@ RU_996_TONE
Definition: he-ru.h:48
ns3::WIFI_PREAMBLE_SHORT
@ WIFI_PREAMBLE_SHORT
Definition: wifi-phy-common.h:65
ns3::RadiotapHeader::FRAME_FLAG_FCS_INCLUDED
@ FRAME_FLAG_FCS_INCLUDED
Frame includes FCS.
Definition: radiotap-header.h:113
ns3::Time::GetSeconds
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:380
ns3::WifiTxVector::GetMode
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode.
Definition: wifi-tx-vector.cc:111
ns3::RadiotapHeader::HE_DATA2_GI_KNOWN
@ HE_DATA2_GI_KNOWN
GI known.
Definition: radiotap-header.h:314
ns3::WifiNetDevice::SetPhy
void SetPhy(const Ptr< WifiPhy > phy)
Definition: wifi-net-device.cc:187
third.phy
phy
Definition: third.py:93
ns3::RadiotapHeader::A_MPDU_STATUS_NONE
@ A_MPDU_STATUS_NONE
No flags set.
Definition: radiotap-header.h:219
ns3::RadiotapHeader::MCS_KNOWN_NESS_BIT_1
@ MCS_KNOWN_NESS_BIT_1
Ness data - bit 1 (MSB) of Number of extension spatial streams.
Definition: radiotap-header.h:186
ns3::RadiotapHeader::SetFrameFlags
void SetFrameFlags(uint8_t flags)
Set the frame flags of the transmitted or received frame.
Definition: radiotap-header.cc:683
ns3::AmpduSubframeHeader::GetEof
bool GetEof(void) const
Return the EOF field.
Definition: ampdu-subframe-header.cc:108
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_242T
@ HE_DATA5_DATA_BW_RU_ALLOC_242T
242-tone RU allocation
Definition: radiotap-header.h:337
ns3::RadiotapHeader::HE_DATA5_DATA_BW_RU_ALLOC_40MHZ
@ HE_DATA5_DATA_BW_RU_ALLOC_40MHZ
40 MHz data Bandwidth
Definition: radiotap-header.h:331
ns3::WifiMode::GetMcsValue
uint8_t GetMcsValue(void) const
Definition: wifi-mode.cc:137
ns3::WifiHelper::Install
virtual NetDeviceContainer Install(const WifiPhyHelper &phy, const WifiMacHelper &mac, NodeContainer::Iterator first, NodeContainer::Iterator last) const
Definition: wifi-helper.cc:779
NS_ABORT_MSG
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
ns3::RadiotapHeader::MCS_KNOWN_FEC_TYPE
@ MCS_KNOWN_FEC_TYPE
FEC type.
Definition: radiotap-header.h:183
ns3::HeRu::RU_52_TONE
@ RU_52_TONE
Definition: he-ru.h:44
ns3::Txop
Handle packet fragmentation and retransmissions for data and management frames.
Definition: txop.h:66