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