A Discrete-Event Network Simulator
API
he-ppdu.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2020 Orange Labs
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: Rediet <getachew.redieteab@orange.com>
19  * Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
20  * S├ębastien Deronne <sebastien.deronne@gmail.com> (HeSigHeader)
21  */
22 
23 #include "ns3/wifi-phy.h"
24 #include "ns3/wifi-psdu.h"
25 #include "ns3/wifi-utils.h"
26 #include "he-phy.h"
27 #include "he-ppdu.h"
28 #include "ns3/log.h"
29 
30 namespace ns3 {
31 
32 NS_LOG_COMPONENT_DEFINE ("HePpdu");
33 
34 std::ostream& operator<< (std::ostream& os, const HePpdu::TxPsdFlag &flag)
35 {
36  switch (flag)
37  {
39  return (os << "PSD_NON_HE_TB");
41  return (os << "PSD_HE_TB_NON_OFDMA_PORTION");
43  return (os << "PSD_HE_TB_OFDMA_PORTION");
44  default:
45  NS_FATAL_ERROR ("Invalid PSD flag");
46  return (os << "INVALID");
47  }
48 }
49 
50 HePpdu::HePpdu (const WifiConstPsduMap & psdus, const WifiTxVector& txVector, Time ppduDuration,
51  WifiPhyBand band, uint64_t uid, TxPsdFlag flag)
52  : OfdmPpdu (psdus.begin ()->second, txVector, band, uid, false) //don't instantiate LSigHeader of OfdmPpdu
53 {
54  NS_LOG_FUNCTION (this << psdus << txVector << ppduDuration << band << uid << flag);
55 
56  //overwrite with map (since only first element used by OfdmPpdu)
57  m_psdus.begin ()->second = 0;
58  m_psdus.clear ();
59  m_psdus = psdus;
60  if (IsMu ())
61  {
62  m_muUserInfos = txVector.GetHeMuUserInfoMap ();
63  }
64 
65  SetPhyHeaders (txVector, ppduDuration);
66  SetTxPsdFlag (flag);
67 }
68 
69 HePpdu::HePpdu (Ptr<const WifiPsdu> psdu, const WifiTxVector& txVector, Time ppduDuration,
70  WifiPhyBand band, uint64_t uid)
71  : OfdmPpdu (psdu, txVector, band, uid, false) //don't instantiate LSigHeader of OfdmPpdu
72 {
73  NS_LOG_FUNCTION (this << psdu << txVector << ppduDuration << band << uid);
74  NS_ASSERT (!IsMu ());
75  SetPhyHeaders (txVector, ppduDuration);
77 }
78 
80 {
81 }
82 
83 void
84 HePpdu::SetPhyHeaders (const WifiTxVector& txVector, Time ppduDuration)
85 {
86  NS_LOG_FUNCTION (this << txVector << ppduDuration);
87  uint8_t sigExtension = 0;
89  {
90  sigExtension = 6;
91  }
92  uint8_t m = 0;
94  {
95  m = 2;
96  }
97  else if (m_preamble == WIFI_PREAMBLE_HE_MU)
98  {
99  m = 1;
100  }
101  else
102  {
103  NS_ASSERT_MSG (false, "Unsupported preamble type");
104  }
105  uint16_t length = ((ceil ((static_cast<double> (ppduDuration.GetNanoSeconds () - (20 * 1000) - (sigExtension * 1000)) / 1000) / 4.0) * 3) - 3 - m);
106  m_lSig.SetLength (length);
107  if (IsDlMu ())
108  {
109  m_heSig.SetMuFlag (true);
110  }
111  else if (!IsUlMu ())
112  {
113  m_heSig.SetMcs (txVector.GetMode ().GetMcsValue ());
114  m_heSig.SetNStreams (txVector.GetNss ());
115  }
116  m_heSig.SetBssColor (txVector.GetBssColor ());
118  m_heSig.SetGuardIntervalAndLtfSize (txVector.GetGuardInterval (), 2/*NLTF currently unused*/);
119 }
120 
123 {
124  WifiTxVector txVector;
125  txVector.SetPreambleType (m_preamble);
126  txVector.SetMode (HePhy::GetHeMcs (m_heSig.GetMcs ()));
128  txVector.SetNss (m_heSig.GetNStreams ());
130  txVector.SetBssColor (m_heSig.GetBssColor ());
131  txVector.SetAggregation (m_psdus.size () > 1 || m_psdus.begin ()->second->IsAggregate ());
132  for (auto const& muUserInfo : m_muUserInfos)
133  {
134  txVector.SetHeMuUserInfo (muUserInfo.first, muUserInfo.second);
135  }
136  return txVector;
137 }
138 
139 Time
141 {
142  Time ppduDuration = Seconds (0);
143  const WifiTxVector& txVector = GetTxVector ();
144  Time tSymbol = NanoSeconds (12800 + txVector.GetGuardInterval ());
145  Time preambleDuration = WifiPhy::CalculatePhyPreambleAndHeaderDuration (txVector);
146  uint8_t sigExtension = 0;
148  {
149  sigExtension = 6;
150  }
151  uint8_t m = IsDlMu () ? 1 : 2;
152  //Equation 27-11 of IEEE P802.11ax/D4.0
153  Time calculatedDuration = MicroSeconds (((ceil (static_cast<double> (m_lSig.GetLength () + 3 + m) / 3)) * 4) + 20 + sigExtension);
154  uint32_t nSymbols = floor (static_cast<double> ((calculatedDuration - preambleDuration).GetNanoSeconds () - (sigExtension * 1000)) / tSymbol.GetNanoSeconds ());
155  ppduDuration = preambleDuration + (nSymbols * tSymbol) + MicroSeconds (sigExtension);
156  return ppduDuration;
157 }
158 
160 HePpdu::Copy (void) const
161 {
162  return Create<HePpdu> (m_psdus, GetTxVector (), GetTxDuration (), m_band, m_uid, m_txPsdFlag);
163 }
164 
166 HePpdu::GetType (void) const
167 {
168  switch (m_preamble)
169  {
170  case WIFI_PREAMBLE_HE_MU:
171  return WIFI_PPDU_TYPE_DL_MU;
172  case WIFI_PREAMBLE_HE_TB:
173  return WIFI_PPDU_TYPE_UL_MU;
174  default:
175  return WIFI_PPDU_TYPE_SU;
176  }
177 }
178 
179 bool
180 HePpdu::IsMu (void) const
181 {
182  return (IsDlMu () || IsUlMu ());
183 }
184 
185 bool
186 HePpdu::IsDlMu (void) const
187 {
188  return (m_preamble == WIFI_PREAMBLE_HE_MU);
189 }
190 
191 bool
192 HePpdu::IsUlMu (void) const
193 {
194  return (m_preamble == WIFI_PREAMBLE_HE_TB);
195 }
196 
198 HePpdu::GetPsdu (uint8_t bssColor, uint16_t staId /* = SU_STA_ID */) const
199 {
200  if (!IsMu ())
201  {
202  NS_ASSERT (m_psdus.size () == 1);
203  return m_psdus.at (SU_STA_ID);
204  }
205  else if (IsUlMu ())
206  {
207  NS_ASSERT (m_psdus.size () == 1);
208  if (bssColor == 0 || m_heSig.GetBssColor () == 0 || (bssColor == m_heSig.GetBssColor ()))
209  {
210  return m_psdus.begin ()->second;
211  }
212  }
213  else
214  {
215  if (bssColor == 0 || m_heSig.GetBssColor () == 0 || (bssColor == m_heSig.GetBssColor ()))
216  {
217  auto it = m_psdus.find (staId);
218  if (it != m_psdus.end ())
219  {
220  return it->second;
221  }
222  }
223  }
224  return nullptr;
225 }
226 
227 uint16_t
228 HePpdu::GetStaId (void) const
229 {
230  NS_ASSERT (IsUlMu ());
231  return m_psdus.begin ()->first;
232 }
233 
234 uint16_t
236 {
237  WifiTxVector txVector = GetTxVector ();
238  if (txVector.GetPreambleType () == WIFI_PREAMBLE_HE_TB && GetStaId () != SU_STA_ID)
239  {
240  TxPsdFlag flag = GetTxPsdFlag ();
241  NS_ASSERT (flag > PSD_NON_HE_TB);
242  uint16_t ruWidth = HeRu::GetBandwidth (txVector.GetRu (GetStaId ()).GetRuType ());
243  uint16_t channelWidth = (flag == PSD_HE_TB_NON_OFDMA_PORTION && ruWidth < 20) ? 20 : ruWidth;
244  NS_LOG_INFO ("Use channelWidth=" << channelWidth << " MHz for HE TB from " << GetStaId ()
245  << " for " << flag);
246  return channelWidth;
247  }
248  else
249  {
251  }
252 }
253 
254 bool
255 HePpdu::CanBeReceived (uint16_t txCenterFreq, uint16_t p20MinFreq, uint16_t p20MaxFreq) const
256 {
257  NS_LOG_FUNCTION (this << txCenterFreq << p20MinFreq << p20MaxFreq);
258 
259  if (IsUlMu ())
260  {
261  // APs are able to receive TB PPDUs sent on a band other than the primary20 channel
262  return true;
263  }
264  return OfdmPpdu::CanBeReceived (txCenterFreq, p20MinFreq, p20MaxFreq);
265 }
266 
269 {
270  return m_txPsdFlag;
271 }
272 
273 void
275 {
276  NS_LOG_FUNCTION (this << flag);
277  NS_ASSERT ((IsUlMu () && flag > PSD_NON_HE_TB) || (!IsUlMu () && flag == PSD_NON_HE_TB));
278  m_txPsdFlag = flag;
279 }
280 
281 std::string
283 {
284  std::ostringstream ss;
285  if (IsMu ())
286  {
287  ss << m_psdus;
288  ss << ", " << m_txPsdFlag;
289  }
290  else
291  {
292  ss << "PSDU=" << m_psdus.at (SU_STA_ID) << " ";
293  }
294  return ss.str ();
295 }
296 
298  : m_format (1),
299  m_bssColor (0),
300  m_ul_dl (0),
301  m_mcs (0),
302  m_spatialReuse (0),
303  m_bandwidth (0),
304  m_gi_ltf_size (0),
305  m_nsts (0),
306  m_mu (false)
307 {
308 }
309 
311 {
312 }
313 
314 TypeId
316 {
317  static TypeId tid = TypeId ("ns3::HeSigHeader")
318  .SetParent<Header> ()
319  .SetGroupName ("Wifi")
320  .AddConstructor<HeSigHeader> ()
321  ;
322  return tid;
323 }
324 
325 TypeId
327 {
328  return GetTypeId ();
329 }
330 
331 void
332 HePpdu::HeSigHeader::Print (std::ostream &os) const
333 {
334  os << "MCS=" << +m_mcs
335  << " CHANNEL_WIDTH=" << GetChannelWidth ()
336  << " GI=" << GetGuardInterval ()
337  << " NSTS=" << +m_nsts
338  << " BSSColor=" << +m_bssColor
339  << " MU=" << +m_mu;
340 }
341 
342 uint32_t
344 {
345  uint32_t size = 0;
346  size += 4; //HE-SIG-A1
347  size += 4; //HE-SIG-A2
348  if (m_mu)
349  {
350  size += 1; //HE-SIG-B
351  }
352  return size;
353 }
354 
355 void
357 {
358  m_mu = mu;
359 }
360 
361 void
363 {
364  NS_ASSERT (mcs <= 11);
365  m_mcs = mcs;
366 }
367 
368 uint8_t
370 {
371  return m_mcs;
372 }
373 
374 void
376 {
377  NS_ASSERT (bssColor < 64);
378  m_bssColor = bssColor;
379 }
380 
381 uint8_t
383 {
384  return m_bssColor;
385 }
386 
387 void
389 {
390  if (channelWidth == 160)
391  {
392  m_bandwidth = 3;
393  }
394  else if (channelWidth == 80)
395  {
396  m_bandwidth = 2;
397  }
398  else if (channelWidth == 40)
399  {
400  m_bandwidth = 1;
401  }
402  else
403  {
404  m_bandwidth = 0;
405  }
406 }
407 
408 uint16_t
410 {
411  if (m_bandwidth == 3)
412  {
413  return 160;
414  }
415  else if (m_bandwidth == 2)
416  {
417  return 80;
418  }
419  else if (m_bandwidth == 1)
420  {
421  return 40;
422  }
423  else
424  {
425  return 20;
426  }
427 }
428 
429 void
431 {
432  if (gi == 800 && ltf == 1)
433  {
434  m_gi_ltf_size = 0;
435  }
436  else if (gi == 800 && ltf == 2)
437  {
438  m_gi_ltf_size = 1;
439  }
440  else if (gi == 1600 && ltf == 2)
441  {
442  m_gi_ltf_size = 2;
443  }
444  else
445  {
446  m_gi_ltf_size = 3;
447  }
448 }
449 
450 uint16_t
452 {
453  if (m_gi_ltf_size == 3)
454  {
455  //we currently do not consider DCM nor STBC fields
456  return 3200;
457  }
458  else if (m_gi_ltf_size == 2)
459  {
460  return 1600;
461  }
462  else
463  {
464  return 800;
465  }
466 }
467 
468 void
470 {
471  NS_ASSERT (nStreams <= 8);
472  m_nsts = (nStreams - 1);
473 }
474 
475 uint8_t
477 {
478  return (m_nsts + 1);
479 }
480 
481 void
483 {
484  //HE-SIG-A1
485  uint8_t byte = m_format & 0x01;
486  byte |= ((m_ul_dl & 0x01) << 2);
487  byte |= ((m_mcs & 0x0f) << 3);
488  start.WriteU8 (byte);
489  uint16_t bytes = (m_bssColor & 0x3f);
490  bytes |= (0x01 << 6); //Reserved set to 1
491  bytes |= ((m_spatialReuse & 0x0f) << 7);
492  bytes |= ((m_bandwidth & 0x03) << 11);
493  bytes |= ((m_gi_ltf_size & 0x03) << 13);
494  bytes |= ((m_nsts & 0x01) << 15);
495  start.WriteU16 (bytes);
496  start.WriteU8 ((m_nsts >> 1) & 0x03);
497 
498  //HE-SIG-A2
499  uint32_t sigA2 = 0;
500  sigA2 |= (0x01 << 14); //Set Reserved bit #14 to 1
501  start.WriteU32 (sigA2);
502 
503  if (m_mu)
504  {
505  //HE-SIG-B
506  start.WriteU8 (0);
507  }
508 }
509 
510 uint32_t
512 {
514 
515  //HE-SIG-A1
516  uint8_t byte = i.ReadU8 ();
517  m_format = (byte & 0x01);
518  m_ul_dl = ((byte >> 2) & 0x01);
519  m_mcs = ((byte >> 3) & 0x0f);
520  uint16_t bytes = i.ReadU16 ();
521  m_bssColor = (bytes & 0x3f);
522  m_spatialReuse = ((bytes >> 7) & 0x0f);
523  m_bandwidth = ((bytes >> 11) & 0x03);
524  m_gi_ltf_size = ((bytes >> 13) & 0x03);
525  m_nsts = ((bytes >> 15) & 0x01);
526  byte = i.ReadU8 ();
527  m_nsts |= (byte & 0x03) << 1;
528 
529  //HE-SIG-A2
530  i.ReadU32 ();
531 
532  if (m_mu)
533  {
534  //HE-SIG-B
535  i.ReadU8 ();
536  }
537 
538  return i.GetDistanceFrom (start);
539 }
540 
541 } //namespace ns3
ns3::HePpdu::GetTxDuration
Time GetTxDuration(void) const override
Get the total transmission duration of the PPDU.
Definition: he-ppdu.cc:140
ns3::OfdmPpdu
OFDM PPDU (11a)
Definition: ofdm-ppdu.h:48
ns3::HePpdu::HeSigHeader
HE-SIG PHY header (HE-SIG-A1/A2/B)
Definition: he-ppdu.h:52
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::HePpdu::m_heSig
HeSigHeader m_heSig
the HE-SIG PHY header
Definition: he-ppdu.h:258
ns3::WifiTxVector::GetBssColor
uint8_t GetBssColor(void) const
Get the BSS color.
Definition: wifi-tx-vector.cc:316
ns3::HePpdu::HePpdu
HePpdu(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, Time ppduDuration, WifiPhyBand band, uint64_t uid)
Create an SU HE PPDU, storing a PSDU.
Definition: he-ppdu.cc:69
NS_ASSERT
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:67
ns3::HePpdu::TxPsdFlag
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSD for HE TB PPDU non-OFDMA...
Definition: he-ppdu.h:159
ns3::WifiTxVector::GetRu
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
Definition: wifi-tx-vector.cc:388
ns3::HePpdu::GetTxPsdFlag
TxPsdFlag GetTxPsdFlag(void) const
Definition: he-ppdu.cc:268
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Buffer::Iterator::GetDistanceFrom
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:788
ns3::WifiPpdu::GetTxVector
WifiTxVector GetTxVector(void) const
Get the TXVECTOR used to send the PPDU.
Definition: wifi-ppdu.cc:63
ns3::HePpdu::HeSigHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Definition: he-ppdu.cc:482
ns3::WifiPpdu::CanBeReceived
virtual bool CanBeReceived(uint16_t txCenterFreq, uint16_t p20MinFreq, uint16_t p20MaxFreq) const
Check whether the given PPDU can be received on the specified primary channel.
Definition: wifi-ppdu.cc:110
ns3::Buffer::Iterator::ReadU8
uint8_t ReadU8(void)
Definition: buffer.h:1021
ns3::MicroSeconds
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
ns3::WifiTxVector::SetGuardInterval
void SetGuardInterval(uint16_t guardInterval)
Sets the guard interval duration (in nanoseconds)
Definition: wifi-tx-vector.cc:260
ns3::HePpdu::HeSigHeader::SetBssColor
void SetBssColor(uint8_t bssColor)
Fill the BSS Color field of HE-SIG-A1.
Definition: he-ppdu.cc:375
ns3::WifiPhy::CalculatePhyPreambleAndHeaderDuration
static Time CalculatePhyPreambleAndHeaderDuration(const WifiTxVector &txVector)
Definition: wifi-phy.cc:1604
ns3::HePpdu::HeSigHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: he-ppdu.cc:315
ns3::WifiTxVector::SetNss
void SetNss(uint8_t nss)
Sets the number of Nss.
Definition: wifi-tx-vector.cc:272
ns3::WifiTxVector::SetAggregation
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
Definition: wifi-tx-vector.cc:292
ns3::OfdmPpdu::m_channelWidth
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition: ofdm-ppdu.h:127
ns3::WifiTxVector::SetMode
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
Definition: wifi-tx-vector.cc:226
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::WifiConstPsduMap
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Definition: he-frame-exchange-manager.h:43
ns3::WIFI_PREAMBLE_HE_SU
@ WIFI_PREAMBLE_HE_SU
Definition: wifi-phy-common.h:74
he-phy.h
Declaration of ns3::HePhy class and ns3::HeSigAParameters struct.
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
ns3::HePpdu::IsUlMu
bool IsUlMu(void) const
Return true if the PPDU is an UL MU PPDU.
Definition: he-ppdu.cc:192
ns3::HeRu::GetBandwidth
static uint16_t GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
Definition: he-ru.cc:487
ns3::HePpdu::PSD_NON_HE_TB
@ PSD_NON_HE_TB
non-HE TB PPDU transmissions
Definition: he-ppdu.h:160
ns3::HePpdu::HeSigHeader::SetChannelWidth
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of HE-SIG-A1 (in MHz).
Definition: he-ppdu.cc:388
ns3::Ptr< const WifiPsdu >
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
visualizer.core.start
def start()
Definition: core.py:1855
ns3::HePpdu::HeSigHeader::Print
void Print(std::ostream &os) const override
Definition: he-ppdu.cc:332
ns3::HePpdu::HeSigHeader::HeSigHeader
HeSigHeader()
Definition: he-ppdu.cc:297
ns3::OfdmPpdu::LSigHeader::GetLength
uint16_t GetLength(void) const
Return the LENGTH field of L-SIG (in bytes).
Definition: ofdm-ppdu.cc:225
ns3::NanoSeconds
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1313
ns3::OfdmPpdu::m_lSig
LSigHeader m_lSig
the L-SIG PHY header
Definition: ofdm-ppdu.h:128
ns3::HePpdu::~HePpdu
virtual ~HePpdu()
Destructor for HePpdu.
Definition: he-ppdu.cc:79
NS_LOG_INFO
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
ns3::HePpdu::GetTransmissionChannelWidth
uint16_t GetTransmissionChannelWidth(void) const override
Get the channel width over which the PPDU will effectively be transmitted.
Definition: he-ppdu.cc:235
ns3::HePpdu::CanBeReceived
bool CanBeReceived(uint16_t txCenterFreq, uint16_t p20MinFreq, uint16_t p20MaxFreq) const override
Check whether the given PPDU can be received on the specified primary channel.
Definition: he-ppdu.cc:255
he-ppdu.h
Declaration of ns3::HePpdu class.
ns3::WifiTxVector::GetHeMuUserInfoMap
const HeMuUserInfoMap & GetHeMuUserInfoMap(void) const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
Definition: wifi-tx-vector.cc:421
ns3::HePpdu::m_muUserInfos
WifiTxVector::HeMuUserInfoMap m_muUserInfos
the HE MU specific per-user information (to be removed once HE-SIG-B headers are implemented)
Definition: he-ppdu.h:245
SU_STA_ID
#define SU_STA_ID
Definition: wifi-mode.h:32
ns3::HePpdu::m_txPsdFlag
TxPsdFlag m_txPsdFlag
the transmit power spectral density flag
Definition: he-ppdu.h:259
ns3::WIFI_PREAMBLE_HE_MU
@ WIFI_PREAMBLE_HE_MU
Definition: wifi-phy-common.h:76
ns3::WifiTxVector::GetPreambleType
WifiPreamble GetPreambleType(void) const
Definition: wifi-tx-vector.cc:148
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:104
ns3::Header
Protocol header serialization and deserialization.
Definition: header.h:43
ns3::WifiTxVector::SetChannelWidth
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
Definition: wifi-tx-vector.cc:254
ns3::Time::GetNanoSeconds
int64_t GetNanoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:392
ns3::HePpdu::HeSigHeader::GetMcs
uint8_t GetMcs(void) const
Return the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:369
NS_ASSERT_MSG
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:88
second
Definition: second.py:1
ns3::OfdmPpdu::LSigHeader::SetLength
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition: ofdm-ppdu.cc:218
ns3::HePpdu::PSD_HE_TB_NON_OFDMA_PORTION
@ PSD_HE_TB_NON_OFDMA_PORTION
preamble of HE TB PPDU, which should only be sent on minimum subset of 20 MHz channels containing RU
Definition: he-ppdu.h:161
ns3::HePpdu::HeSigHeader::GetInstanceTypeId
TypeId GetInstanceTypeId(void) const override
Get the most derived TypeId for this Object.
Definition: he-ppdu.cc:326
ns3::Buffer::Iterator::ReadU16
uint16_t ReadU16(void)
Definition: buffer.h:1029
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::Buffer::Iterator::ReadU32
uint32_t ReadU32(void)
Definition: buffer.cc:973
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition: buffer.h:99
ns3::WIFI_PPDU_TYPE_UL_MU
@ WIFI_PPDU_TYPE_UL_MU
Definition: wifi-phy-common.h:232
ns3::HePpdu::HeSigHeader::GetChannelWidth
uint16_t GetChannelWidth(void) const
Return the channel width (in MHz).
Definition: he-ppdu.cc:409
ns3::WifiTxVector::GetGuardInterval
uint16_t GetGuardInterval(void) const
Definition: wifi-tx-vector.cc:160
ns3::OfdmPpdu::m_band
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Definition: ofdm-ppdu.h:126
ns3::HePpdu::PSD_HE_TB_OFDMA_PORTION
@ PSD_HE_TB_OFDMA_PORTION
OFDMA portion of HE TB PPDU, which should only be sent on RU.
Definition: he-ppdu.h:162
ns3::HePpdu::Copy
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Definition: he-ppdu.cc:160
ns3::WIFI_PHY_BAND_2_4GHZ
@ WIFI_PHY_BAND_2_4GHZ
The 2.4 GHz band.
Definition: wifi-phy-band.h:35
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:172
ns3::HePpdu::PrintPayload
std::string PrintPayload(void) const override
Print the payload of the PPDU.
Definition: he-ppdu.cc:282
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::WifiTxVector::SetHeMuUserInfo
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
Definition: wifi-tx-vector.cc:411
ns3::HePpdu::SetPhyHeaders
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the HE PHY headers.
Definition: he-ppdu.cc:84
ns3::HePpdu::HeSigHeader::GetNStreams
uint8_t GetNStreams(void) const
Return the number of streams.
Definition: he-ppdu.cc:476
ns3::WifiPpduType
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
Definition: wifi-phy-common.h:229
ns3::WIFI_PPDU_TYPE_DL_MU
@ WIFI_PPDU_TYPE_DL_MU
Definition: wifi-phy-common.h:231
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::HePpdu::HeSigHeader::SetGuardIntervalAndLtfSize
void SetGuardIntervalAndLtfSize(uint16_t gi, uint8_t ltf)
Fill the GI + LTF size field of HE-SIG-A1.
Definition: he-ppdu.cc:430
ns3::HePpdu::GetStaId
uint16_t GetStaId(void) const override
Get the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise.
Definition: he-ppdu.cc:228
ns3::HePpdu::HeSigHeader::~HeSigHeader
virtual ~HeSigHeader()
Definition: he-ppdu.cc:310
ns3::HePpdu::GetType
WifiPpduType GetType(void) const override
Return the PPDU type (.
Definition: he-ppdu.cc:166
ns3::HePpdu::HeSigHeader::SetNStreams
void SetNStreams(uint8_t nStreams)
Fill the number of streams field of HE-SIG-A1.
Definition: he-ppdu.cc:469
ns3::HePpdu::SetTxPsdFlag
void SetTxPsdFlag(TxPsdFlag flag)
Definition: he-ppdu.cc:274
ns3::WifiPhyBand
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
ns3::WifiPpdu::m_uid
uint64_t m_uid
the unique ID of this PPDU
Definition: wifi-ppdu.h:182
ns3::HePpdu::HeSigHeader::GetGuardInterval
uint16_t GetGuardInterval(void) const
Return the guard interval (in nanoseconds).
Definition: he-ppdu.cc:451
ns3::WifiTxVector::SetBssColor
void SetBssColor(uint8_t color)
Set the BSS color.
Definition: wifi-tx-vector.cc:310
ns3::WifiPpdu::GetTransmissionChannelWidth
virtual uint16_t GetTransmissionChannelWidth(void) const
Get the channel width over which the PPDU will effectively be transmitted.
Definition: wifi-ppdu.cc:104
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:137
ns3::WifiPpdu::GetPsdu
Ptr< const WifiPsdu > GetPsdu(void) const
Get the payload of the PPDU.
Definition: wifi-ppdu.cc:79
ns3::WifiPpdu::m_preamble
WifiPreamble m_preamble
the PHY preamble
Definition: wifi-ppdu.h:179
ns3::WifiPpdu::m_psdus
WifiConstPsduMap m_psdus
the PSDUs contained in this PPDU
Definition: wifi-ppdu.h:181
ns3::HePpdu::IsDlMu
bool IsDlMu(void) const
Return true if the PPDU is a DL MU PPDU.
Definition: he-ppdu.cc:186
ns3::HePpdu::DoGetTxVector
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Definition: he-ppdu.cc:122
ns3::WIFI_PREAMBLE_HE_TB
@ WIFI_PREAMBLE_HE_TB
Definition: wifi-phy-common.h:77
ns3::HePpdu::IsMu
bool IsMu(void) const
Return true if the PPDU is a MU PPDU.
Definition: he-ppdu.cc:180
ns3::WifiTxVector::SetPreambleType
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
Definition: wifi-tx-vector.cc:248
ns3::WIFI_PPDU_TYPE_SU
@ WIFI_PPDU_TYPE_SU
Definition: wifi-phy-common.h:230
ns3::HePpdu::HeSigHeader::GetSerializedSize
uint32_t GetSerializedSize(void) const override
Definition: he-ppdu.cc:343
ns3::HePpdu::HeSigHeader::SetMuFlag
void SetMuFlag(bool mu)
Set the Multi-User (MU) flag.
Definition: he-ppdu.cc:356
ns3::HePpdu::HeSigHeader::GetBssColor
uint8_t GetBssColor(void) const
Return the BSS Color field in the HE-SIG-A1.
Definition: he-ppdu.cc:382
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:112
ns3::HePpdu::HeSigHeader::SetMcs
void SetMcs(uint8_t mcs)
Fill the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:362
ns3::HePhy::GetHeMcs
static WifiMode GetHeMcs(uint8_t index)
Return the HE MCS corresponding to the provided index.
Definition: he-phy.cc:979
ns3::WifiMode::GetMcsValue
uint8_t GetMcsValue(void) const
Definition: wifi-mode.cc:137