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 (GetTxVector ().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
uint16_t ReadU16(void)
Definition: buffer.h:1029
Protocol header serialization and deserialization.
Definition: header.h:42
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of HE-SIG-A1 (in MHz).
Definition: he-ppdu.cc:388
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Definition: he-ppdu.cc:160
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
HeSigHeader m_heSig
the HE-SIG PHY header
Definition: he-ppdu.h:258
uint32_t ReadU32(void)
Definition: buffer.cc:972
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetBssColor(uint8_t bssColor)
Fill the BSS Color field of HE-SIG-A1.
Definition: he-ppdu.cc:375
Definition: second.py:1
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
Ptr< const WifiPsdu > GetPsdu(void) const
Get the payload of the PPDU.
Definition: wifi-ppdu.cc:79
void SetBssColor(uint8_t color)
Set the BSS color.
uint16_t GetLength(void) const
Return the LENGTH field of L-SIG (in bytes).
Definition: ofdm-ppdu.cc:225
void SetNStreams(uint8_t nStreams)
Fill the number of streams field of HE-SIG-A1.
Definition: he-ppdu.cc:469
def start()
Definition: core.py:1855
void SetGuardIntervalAndLtfSize(uint16_t gi, uint8_t ltf)
Fill the GI + LTF size field of HE-SIG-A1.
Definition: he-ppdu.cc:430
LSigHeader m_lSig
the L-SIG PHY header
Definition: ofdm-ppdu.h:128
uint32_t Deserialize(Buffer::Iterator start) override
Definition: he-ppdu.cc:511
WifiTxVector GetTxVector(void) const
Get the TXVECTOR used to send the PPDU.
Definition: wifi-ppdu.cc:63
#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
uint64_t m_uid
the unique ID of this PPDU
Definition: wifi-ppdu.h:182
TxPsdFlag m_txPsdFlag
the transmit power spectral density flag
Definition: he-ppdu.h:259
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:281
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
uint16_t GetGuardInterval(void) const
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.
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
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
static WifiMode GetHeMcs(uint8_t index)
Return the HE MCS corresponding to the provided index.
Definition: he-phy.cc:951
uint8_t GetBssColor(void) const
Return the BSS Color field in the HE-SIG-A1.
Definition: he-ppdu.cc:382
void SetTxPsdFlag(TxPsdFlag flag)
Definition: he-ppdu.cc:274
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Definition: ofdm-ppdu.h:126
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the HE PHY headers.
Definition: he-ppdu.cc:84
iterator in a Buffer instance
Definition: buffer.h:98
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
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...
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:783
WifiPreamble GetPreambleType(void) const
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:137
static uint16_t GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
Definition: he-ru.cc:487
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
Time GetTxDuration(void) const override
Get the total transmission duration of the PPDU.
Definition: he-ppdu.cc:140
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1313
void SetGuardInterval(uint16_t guardInterval)
Sets the guard interval duration (in nanoseconds)
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSD for HE TB PPDU non-OFDMA...
Definition: he-ppdu.h:158
WifiPreamble m_preamble
the PHY preamble
Definition: wifi-ppdu.h:179
WifiPpduType GetType(void) const override
Return the PPDU type (.
Definition: he-ppdu.cc:166
uint8_t GetNStreams(void) const
Return the number of streams.
Definition: he-ppdu.cc:476
TypeId GetInstanceTypeId(void) const override
Get the most derived TypeId for this Object.
Definition: he-ppdu.cc:326
uint32_t GetSerializedSize(void) const override
Definition: he-ppdu.cc:343
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
void SetNss(uint8_t nss)
Sets the number of Nss.
virtual ~HePpdu()
Destructor for HePpdu.
Definition: he-ppdu.cc:79
OFDM PPDU (11a)OfdmPpdu stores a preamble, PHY headers and a PSDU of a PPDU with non-HT header...
Definition: ofdm-ppdu.h:47
uint16_t GetGuardInterval(void) const
Return the guard interval (in nanoseconds).
Definition: he-ppdu.cc:451
bool IsMu(void) const
Return true if the PPDU is a MU PPDU.
Definition: he-ppdu.cc:180
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsUlMu(void) const
Return true if the PPDU is an UL MU PPDU.
Definition: he-ppdu.cc:192
int64_t GetNanoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:392
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
void SetPreambleType(WifiPreamble preamble)
Sets the preamble type.
RuType GetRuType(void) const
Get the RU type.
Definition: he-ru.cc:167
WifiPpduType
The type of PPDU (SU, DL MU, or UL MU)
The 2.4 GHz band.
Definition: wifi-phy-band.h:35
non-HE TB PPDU transmissions
Definition: he-ppdu.h:160
uint8_t GetMcs(void) const
Return the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:369
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
#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
uint16_t GetChannelWidth(void) const
Return the channel width (in MHz).
Definition: he-ppdu.cc:409
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:32
WifiConstPsduMap m_psdus
the PSDUs contained in this PPDU
Definition: wifi-ppdu.h:181
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Definition: he-ppdu.cc:122
HE-SIG PHY header (HE-SIG-A1/A2/B)
Definition: he-ppdu.h:51
uint8_t GetBssColor(void) const
Get the BSS color.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
static Time CalculatePhyPreambleAndHeaderDuration(const WifiTxVector &txVector)
Definition: wifi-phy.cc:1604
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
virtual uint16_t GetTransmissionChannelWidth(void) const
Get the channel width over which the PPDU will effectively be transmitted.
Definition: wifi-ppdu.cc:104
uint8_t ReadU8(void)
Definition: buffer.h:1021
uint16_t GetTransmissionChannelWidth(void) const override
Get the channel width over which the PPDU will effectively be transmitted.
Definition: he-ppdu.cc:235
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1305
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition: ofdm-ppdu.cc:218
static TypeId GetTypeId(void)
Get the type ID.
Definition: he-ppdu.cc:315
void Serialize(Buffer::Iterator start) const override
Definition: he-ppdu.cc:482
void SetMuFlag(bool mu)
Set the Multi-User (MU) flag.
Definition: he-ppdu.cc:356
OFDMA portion of HE TB PPDU, which should only be sent on RU.
Definition: he-ppdu.h:162
const HeMuUserInfoMap & GetHeMuUserInfoMap(void) const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID...
Declaration of ns3::HePhy class and ns3::HeSigAParameters struct.
uint8_t GetMcsValue(void) const
Definition: wifi-mode.cc:137
a unique identifier for an interface.
Definition: type-id.h:58
TxPsdFlag GetTxPsdFlag(void) const
Definition: he-ppdu.cc:268
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
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
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
#define SU_STA_ID
Definition: wifi-mode.h:32
std::string PrintPayload(void) const override
Print the payload of the PPDU.
Definition: he-ppdu.cc:282
void SetMcs(uint8_t mcs)
Fill the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:362
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition: ofdm-ppdu.h:127
bool IsDlMu(void) const
Return true if the PPDU is a DL MU PPDU.
Definition: he-ppdu.cc:186
preamble of HE TB PPDU, which should only be sent on minimum subset of 20 MHz channels containing RU ...
Definition: he-ppdu.h:161
void Print(std::ostream &os) const override
Definition: he-ppdu.cc:332
Declaration of ns3::HePpdu class.