A Discrete-Event Network Simulator
API
he-ppdu.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Orange Labs
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Rediet <getachew.redieteab@orange.com>
18 * Muhammad Iqbal Rochman <muhiqbalcr@uchicago.edu>
19 * Sébastien Deronne <sebastien.deronne@gmail.com> (HeSigHeader)
20 */
21
22#include "he-ppdu.h"
23
24#include "he-phy.h"
25
26#include "ns3/log.h"
27#include "ns3/wifi-phy.h"
28#include "ns3/wifi-psdu.h"
29#include "ns3/wifi-utils.h"
30
31namespace ns3
32{
33
35
36std::ostream&
37operator<<(std::ostream& os, const HePpdu::TxPsdFlag& flag)
38{
39 switch (flag)
40 {
42 return (os << "PSD_NON_HE_PORTION");
44 return (os << "PSD_HE_PORTION");
45 default:
46 NS_FATAL_ERROR("Invalid PSD flag");
47 return (os << "INVALID");
48 }
49}
50
52 const WifiTxVector& txVector,
53 uint16_t txCenterFreq,
54 Time ppduDuration,
55 WifiPhyBand band,
56 uint64_t uid,
57 TxPsdFlag flag,
58 uint8_t p20Index)
59 : OfdmPpdu(psdus.begin()->second,
60 txVector,
61 txCenterFreq,
62 band,
63 uid,
64 false) // don't instantiate LSigHeader of OfdmPpdu
65{
66 NS_LOG_FUNCTION(this << psdus << txVector << txCenterFreq << ppduDuration << band << uid
67 << flag);
68
69 // overwrite with map (since only first element used by OfdmPpdu)
70 m_psdus.begin()->second = nullptr;
71 m_psdus.clear();
72 m_psdus = psdus;
73 if (txVector.IsMu())
74 {
75 for (auto heMuUserInfo : txVector.GetHeMuUserInfoMap())
76 {
77 // Set RU PHY index
78 heMuUserInfo.second.ru.SetPhyIndex(txVector.GetChannelWidth(), p20Index);
79 auto [it, ret] = m_muUserInfos.emplace(heMuUserInfo);
80 NS_ABORT_MSG_IF(!ret, "STA-ID " << heMuUserInfo.first << " already present");
81 }
84 }
85 SetPhyHeaders(txVector, ppduDuration);
86 SetTxPsdFlag(flag);
87}
88
90 const WifiTxVector& txVector,
91 uint16_t txCenterFreq,
92 Time ppduDuration,
93 WifiPhyBand band,
94 uint64_t uid)
95 : OfdmPpdu(psdu,
96 txVector,
97 txCenterFreq,
98 band,
99 uid,
100 false) // don't instantiate LSigHeader of OfdmPpdu
101{
102 NS_LOG_FUNCTION(this << psdu << txVector << txCenterFreq << ppduDuration << band << uid);
103 NS_ASSERT(!IsMu());
104 SetPhyHeaders(txVector, ppduDuration);
106}
107
109{
110}
111
112void
113HePpdu::SetPhyHeaders(const WifiTxVector& txVector, Time ppduDuration)
114{
115 NS_LOG_FUNCTION(this << txVector << ppduDuration);
116 uint8_t sigExtension = 0;
118 {
119 sigExtension = 6;
120 }
121 uint8_t m = IsDlMu() ? 1 : 2;
122 uint16_t length = ((ceil((static_cast<double>(ppduDuration.GetNanoSeconds() - (20 * 1000) -
123 (sigExtension * 1000)) /
124 1000) /
125 4.0) *
126 3) -
127 3 - m);
128 m_lSig.SetLength(length);
129 if (txVector.IsDlMu())
130 {
131 m_heSig.SetMuFlag(true);
133 }
134 else if (!txVector.IsUlMu())
135 {
136 m_heSig.SetMcs(txVector.GetMode().GetMcsValue());
137 m_heSig.SetNStreams(txVector.GetNss());
138 }
139 m_heSig.SetBssColor(txVector.GetBssColor());
141 m_heSig.SetGuardIntervalAndLtfSize(txVector.GetGuardInterval(), 2 /*NLTF currently unused*/);
142}
143
146{
147 WifiTxVector txVector;
148 txVector.SetPreambleType(m_preamble);
151 txVector.SetNss(m_heSig.GetNStreams());
153 txVector.SetBssColor(m_heSig.GetBssColor());
154 txVector.SetLength(m_lSig.GetLength());
155 txVector.SetAggregation(m_psdus.size() > 1 || m_psdus.begin()->second->IsAggregate());
156 for (const auto& muUserInfo : m_muUserInfos)
157 {
158 txVector.SetHeMuUserInfo(muUserInfo.first, muUserInfo.second);
159 }
160 if (txVector.IsDlMu())
161 {
164 }
165 return txVector;
166}
167
168Time
170{
171 Time ppduDuration = Seconds(0);
172 const WifiTxVector& txVector = GetTxVector();
173 Time tSymbol = NanoSeconds(12800 + txVector.GetGuardInterval());
174 Time preambleDuration = WifiPhy::CalculatePhyPreambleAndHeaderDuration(txVector);
175 uint8_t sigExtension = 0;
177 {
178 sigExtension = 6;
179 }
180 uint8_t m = IsDlMu() ? 1 : 2;
181 // Equation 27-11 of IEEE P802.11ax/D4.0
182 Time calculatedDuration = MicroSeconds(
183 ((ceil(static_cast<double>(m_lSig.GetLength() + 3 + m) / 3)) * 4) + 20 + sigExtension);
184 NS_ASSERT(calculatedDuration > preambleDuration);
185 uint32_t nSymbols =
186 floor(static_cast<double>((calculatedDuration - preambleDuration).GetNanoSeconds() -
187 (sigExtension * 1000)) /
188 tSymbol.GetNanoSeconds());
189 ppduDuration = preambleDuration + (nSymbols * tSymbol) + MicroSeconds(sigExtension);
190 return ppduDuration;
191}
192
195{
196 return ns3::Copy(Ptr(this));
197}
198
201{
202 switch (m_preamble)
203 {
208 default:
209 return WIFI_PPDU_TYPE_SU;
210 }
211}
212
213bool
215{
216 return (IsDlMu() || IsUlMu());
217}
218
219bool
221{
223}
224
225bool
227{
229}
230
232HePpdu::GetPsdu(uint8_t bssColor, uint16_t staId /* = SU_STA_ID */) const
233{
234 if (!IsMu())
235 {
236 NS_ASSERT(m_psdus.size() == 1);
237 return m_psdus.at(SU_STA_ID);
238 }
239 else if (IsUlMu())
240 {
241 NS_ASSERT(m_psdus.size() == 1);
242 if (bssColor == 0 || m_heSig.GetBssColor() == 0 || (bssColor == m_heSig.GetBssColor()))
243 {
244 return m_psdus.begin()->second;
245 }
246 }
247 else
248 {
249 if (bssColor == 0 || m_heSig.GetBssColor() == 0 || (bssColor == m_heSig.GetBssColor()))
250 {
251 auto it = m_psdus.find(staId);
252 if (it != m_psdus.end())
253 {
254 return it->second;
255 }
256 }
257 }
258 return nullptr;
259}
260
261uint16_t
263{
264 NS_ASSERT(IsUlMu());
265 return m_psdus.begin()->first;
266}
267
268uint16_t
270{
271 WifiTxVector txVector = GetTxVector();
272 if (txVector.GetPreambleType() == WIFI_PREAMBLE_HE_TB && GetStaId() != SU_STA_ID)
273 {
274 TxPsdFlag flag = GetTxPsdFlag();
275 uint16_t ruWidth = HeRu::GetBandwidth(txVector.GetRu(GetStaId()).GetRuType());
276 uint16_t channelWidth = (flag == PSD_NON_HE_PORTION && ruWidth < 20) ? 20 : ruWidth;
277 NS_LOG_INFO("Use channelWidth=" << channelWidth << " MHz for HE TB from " << GetStaId()
278 << " for " << flag);
279 return channelWidth;
280 }
281 else
282 {
284 }
285}
286
287bool
288HePpdu::CanBeReceived(uint16_t p20MinFreq, uint16_t p20MaxFreq) const
289{
290 NS_LOG_FUNCTION(this << p20MinFreq << p20MaxFreq);
291 if (IsUlMu())
292 {
293 // APs are able to receive TB PPDUs sent on a band other than the primary20 channel
294 return true;
295 }
296 return OfdmPpdu::CanBeReceived(p20MinFreq, p20MaxFreq);
297}
298
301{
302 return m_txPsdFlag;
303}
304
305void
307{
308 NS_LOG_FUNCTION(this << flag);
309 m_txPsdFlag = flag;
310}
311
312bool
313HePpdu::IsAllocated(uint16_t staId) const
314{
315 return (m_muUserInfos.find(staId) != m_muUserInfos.cend());
316}
317
318bool
319HePpdu::IsStaInContentChannel(uint16_t staId, std::size_t channelId) const
320{
321 NS_ASSERT_MSG(channelId < m_contentChannelAlloc.size(),
322 "Invalid content channel ID " << channelId);
323 const auto& channelAlloc = m_contentChannelAlloc.at(channelId);
324 return (std::find(channelAlloc.cbegin(), channelAlloc.cend(), staId) != channelAlloc.cend());
325}
326
327std::string
329{
330 std::ostringstream ss;
331 if (IsMu())
332 {
333 ss << m_psdus;
334 ss << ", " << m_txPsdFlag;
335 }
336 else
337 {
338 ss << "PSDU=" << m_psdus.at(SU_STA_ID) << " ";
339 }
340 return ss.str();
341}
342
344 : m_format(1),
345 m_bssColor(0),
346 m_ul_dl(0),
347 m_mcs(0),
348 m_spatialReuse(0),
349 m_bandwidth(0),
350 m_gi_ltf_size(0),
351 m_nsts(0),
352 m_mu(false)
353{
354}
355
357{
358}
359
360TypeId
362{
363 static TypeId tid = TypeId("ns3::HeSigHeader")
364 .SetParent<Header>()
365 .SetGroupName("Wifi")
366 .AddConstructor<HeSigHeader>();
367 return tid;
368}
369
370TypeId
372{
373 return GetTypeId();
374}
375
376void
377HePpdu::HeSigHeader::Print(std::ostream& os) const
378{
379 os << "MCS=" << +m_mcs << " CHANNEL_WIDTH=" << GetChannelWidth() << " GI=" << GetGuardInterval()
380 << " NSTS=" << +m_nsts << " BSSColor=" << +m_bssColor << " MU=" << +m_mu;
381}
382
385{
386 uint32_t size = 0;
387 size += 4; // HE-SIG-A1
388 size += 4; // HE-SIG-A2
389 if (m_mu)
390 {
391 size += 1; // HE-SIG-B
392 }
393 return size;
394}
395
396void
398{
399 m_mu = mu;
400}
401
402void
404{
405 NS_ASSERT(mcs <= 11);
406 m_mcs = mcs;
407}
408
409uint8_t
411{
412 return m_mcs;
413}
414
415void
417{
418 NS_ASSERT(bssColor < 64);
419 m_bssColor = bssColor;
420}
421
422uint8_t
424{
425 return m_bssColor;
426}
427
428void
430{
431 if (channelWidth == 160)
432 {
433 m_bandwidth = 3;
434 }
435 else if (channelWidth == 80)
436 {
437 m_bandwidth = 2;
438 }
439 else if (channelWidth == 40)
440 {
441 m_bandwidth = 1;
442 }
443 else
444 {
445 m_bandwidth = 0;
446 }
447}
448
449uint16_t
451{
452 if (m_bandwidth == 3)
453 {
454 return 160;
455 }
456 else if (m_bandwidth == 2)
457 {
458 return 80;
459 }
460 else if (m_bandwidth == 1)
461 {
462 return 40;
463 }
464 else
465 {
466 return 20;
467 }
468}
469
470void
472{
473 if (gi == 800 && ltf == 1)
474 {
475 m_gi_ltf_size = 0;
476 }
477 else if (gi == 800 && ltf == 2)
478 {
479 m_gi_ltf_size = 1;
480 }
481 else if (gi == 1600 && ltf == 2)
482 {
483 m_gi_ltf_size = 2;
484 }
485 else
486 {
487 m_gi_ltf_size = 3;
488 }
489}
490
491uint16_t
493{
494 if (m_gi_ltf_size == 3)
495 {
496 // we currently do not consider DCM nor STBC fields
497 return 3200;
498 }
499 else if (m_gi_ltf_size == 2)
500 {
501 return 1600;
502 }
503 else
504 {
505 return 800;
506 }
507}
508
509void
511{
512 NS_ASSERT(nStreams <= 8);
513 m_nsts = (nStreams - 1);
514}
515
516uint8_t
518{
519 return (m_nsts + 1);
520}
521
522void
524{
525 // HE-SIG-A1
526 uint8_t byte = m_format & 0x01;
527 byte |= ((m_ul_dl & 0x01) << 2);
528 byte |= ((m_mcs & 0x0f) << 3);
529 start.WriteU8(byte);
530 uint16_t bytes = (m_bssColor & 0x3f);
531 bytes |= (0x01 << 6); // Reserved set to 1
532 bytes |= ((m_spatialReuse & 0x0f) << 7);
533 bytes |= ((m_bandwidth & 0x03) << 11);
534 bytes |= ((m_gi_ltf_size & 0x03) << 13);
535 bytes |= ((m_nsts & 0x01) << 15);
536 start.WriteU16(bytes);
537 start.WriteU8((m_nsts >> 1) & 0x03);
538
539 // HE-SIG-A2
540 uint32_t sigA2 = 0;
541 sigA2 |= (0x01 << 14); // Set Reserved bit #14 to 1
542 start.WriteU32(sigA2);
543
544 if (m_mu)
545 {
546 // HE-SIG-B
547 start.WriteU8(0);
548 }
549}
550
553{
555
556 // HE-SIG-A1
557 uint8_t byte = i.ReadU8();
558 m_format = (byte & 0x01);
559 m_ul_dl = ((byte >> 2) & 0x01);
560 m_mcs = ((byte >> 3) & 0x0f);
561 uint16_t bytes = i.ReadU16();
562 m_bssColor = (bytes & 0x3f);
563 m_spatialReuse = ((bytes >> 7) & 0x0f);
564 m_bandwidth = ((bytes >> 11) & 0x03);
565 m_gi_ltf_size = ((bytes >> 13) & 0x03);
566 m_nsts = ((bytes >> 15) & 0x01);
567 byte = i.ReadU8();
568 m_nsts |= (byte & 0x03) << 1;
569
570 // HE-SIG-A2
571 i.ReadU32();
572
573 if (m_mu)
574 {
575 // HE-SIG-B
576 i.ReadU8();
577 }
578
579 return i.GetDistanceFrom(start);
580}
581
582} // namespace ns3
iterator in a Buffer instance
Definition: buffer.h:100
uint8_t ReadU8()
Definition: buffer.h:1027
uint32_t ReadU32()
Definition: buffer.cc:969
uint32_t GetDistanceFrom(const Iterator &o) const
Definition: buffer.cc:783
uint16_t ReadU16()
Definition: buffer.h:1035
static WifiMode GetHeMcs(uint8_t index)
Return the HE MCS corresponding to the provided index.
Definition: he-phy.cc:1444
HE-SIG PHY header (HE-SIG-A1/A2/B)
Definition: he-ppdu.h:51
static TypeId GetTypeId()
Get the type ID.
Definition: he-ppdu.cc:361
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of HE-SIG-A1 (in MHz).
Definition: he-ppdu.cc:429
uint16_t GetGuardInterval() const
Return the guard interval (in nanoseconds).
Definition: he-ppdu.cc:492
void SetBssColor(uint8_t bssColor)
Fill the BSS Color field of HE-SIG-A1.
Definition: he-ppdu.cc:416
uint8_t GetBssColor() const
Return the BSS Color field in the HE-SIG-A1.
Definition: he-ppdu.cc:423
uint32_t Deserialize(Buffer::Iterator start) override
Definition: he-ppdu.cc:552
uint8_t GetMcs() const
Return the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:410
uint32_t GetSerializedSize() const override
Definition: he-ppdu.cc:384
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: he-ppdu.cc:371
~HeSigHeader() override
Definition: he-ppdu.cc:356
void SetMuFlag(bool mu)
Set the Multi-User (MU) flag.
Definition: he-ppdu.cc:397
uint16_t GetChannelWidth() const
Return the channel width (in MHz).
Definition: he-ppdu.cc:450
void Print(std::ostream &os) const override
Definition: he-ppdu.cc:377
void Serialize(Buffer::Iterator start) const override
Definition: he-ppdu.cc:523
void SetGuardIntervalAndLtfSize(uint16_t gi, uint8_t ltf)
Fill the GI + LTF size field of HE-SIG-A1.
Definition: he-ppdu.cc:471
void SetMcs(uint8_t mcs)
Fill the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:403
uint8_t GetNStreams() const
Return the number of streams.
Definition: he-ppdu.cc:517
void SetNStreams(uint8_t nStreams)
Fill the number of streams field of HE-SIG-A1.
Definition: he-ppdu.cc:510
HeSigHeader m_heSig
the HE-SIG PHY header
Definition: he-ppdu.h:278
WifiTxVector DoGetTxVector() const override
Get the TXVECTOR used to send the PPDU.
Definition: he-ppdu.cc:145
void SetTxPsdFlag(TxPsdFlag flag)
Definition: he-ppdu.cc:306
Ptr< WifiPpdu > Copy() const override
Copy this instance.
Definition: he-ppdu.cc:194
TxPsdFlag
The transmit power spectral density flag, namely used to correctly build PSDs for pre-HE and HE porti...
Definition: he-ppdu.h:157
@ PSD_HE_PORTION
HE portion of an HE PPDU.
Definition: he-ppdu.h:159
@ PSD_NON_HE_PORTION
Non-HE portion of an HE PPDU.
Definition: he-ppdu.h:158
virtual bool IsDlMu() const
Return true if the PPDU is a DL MU PPDU.
Definition: he-ppdu.cc:220
Time GetTxDuration() const override
Get the total transmission duration of the PPDU.
Definition: he-ppdu.cc:169
virtual bool IsUlMu() const
Return true if the PPDU is an UL MU PPDU.
Definition: he-ppdu.cc:226
ContentChannelAllocation m_contentChannelAlloc
HE SIG-B Content Channel allocation (to be removed once HE-SIG-B headers are implemented)
Definition: he-ppdu.h:284
WifiTxVector::HeMuUserInfoMap m_muUserInfos
HE MU specific per-user information (to be removed once HE-SIG-B headers are implemented)
Definition: he-ppdu.h:281
virtual void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the HE PHY headers.
Definition: he-ppdu.cc:113
bool IsAllocated(uint16_t staId) const
Check if STA ID is allocated.
Definition: he-ppdu.cc:313
std::string PrintPayload() const override
Print the payload of the PPDU.
Definition: he-ppdu.cc:328
uint16_t GetStaId() const override
Get the ID of the STA that transmitted the PPDU for UL MU, SU_STA_ID otherwise.
Definition: he-ppdu.cc:262
WifiPpduType GetType() const override
Return the PPDU type (.
Definition: he-ppdu.cc:200
TxPsdFlag GetTxPsdFlag() const
Definition: he-ppdu.cc:300
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:89
virtual bool IsMu() const
Return true if the PPDU is a MU PPDU.
Definition: he-ppdu.cc:214
RuAllocation m_ruAllocation
RU_ALLOCATION in SIG-B common field (to be removed once HE-SIG-B headers are implemented)
Definition: he-ppdu.h:286
~HePpdu() override
Destructor for HePpdu.
Definition: he-ppdu.cc:108
bool IsStaInContentChannel(uint16_t staId, size_t channelId) const
Check if STA ID is in HE SIG-B Content Channel ID.
Definition: he-ppdu.cc:319
TxPsdFlag m_txPsdFlag
the transmit power spectral density flag
Definition: he-ppdu.h:279
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:288
uint16_t GetTransmissionChannelWidth() const override
Get the channel width over which the PPDU will effectively be transmitted.
Definition: he-ppdu.cc:269
static uint16_t GetBandwidth(RuType ruType)
Get the approximate bandwidth occupied by a RU.
Definition: he-ru.cc:760
Protocol header serialization and deserialization.
Definition: header.h:44
uint16_t GetLength() const
Return the LENGTH field of L-SIG (in bytes).
Definition: ofdm-ppdu.cc:228
void SetLength(uint16_t length)
Fill the LENGTH field of L-SIG (in bytes).
Definition: ofdm-ppdu.cc:221
OFDM PPDU (11a)
Definition: ofdm-ppdu.h:48
WifiPhyBand m_band
the WifiPhyBand used to transmit that PPDU
Definition: ofdm-ppdu.h:130
LSigHeader m_lSig
the L-SIG PHY header
Definition: ofdm-ppdu.h:132
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition: ofdm-ppdu.h:131
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
int64_t GetNanoSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:417
a unique identifier for an interface.
Definition: type-id.h:60
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:935
static WifiMode GetVhtMcs(uint8_t index)
Return the VHT MCS corresponding to the provided index.
Definition: vht-phy.cc:344
uint8_t GetMcsValue() const
Definition: wifi-mode.cc:163
static Time CalculatePhyPreambleAndHeaderDuration(const WifiTxVector &txVector)
Definition: wifi-phy.cc:1415
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:165
WifiPreamble m_preamble
the PHY preamble
Definition: wifi-ppdu.h:193
Ptr< const WifiPsdu > GetPsdu() const
Get the payload of the PPDU.
Definition: wifi-ppdu.cc:91
virtual uint16_t GetTransmissionChannelWidth() const
Get the channel width over which the PPDU will effectively be transmitted.
Definition: wifi-ppdu.cc:116
WifiConstPsduMap m_psdus
the PSDUs contained in this PPDU
Definition: wifi-ppdu.h:195
WifiTxVector GetTxVector() const
Get the TXVECTOR used to send the PPDU.
Definition: wifi-ppdu.cc:74
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
const RuAllocation & GetRuAllocation() const
Get RU Allocation of SIG-B.
uint16_t GetGuardInterval() const
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
uint8_t GetBssColor() const
Get the BSS color.
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.
WifiPreamble GetPreambleType() const
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
HeRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
bool IsDlMu() const
Return true if this TX vector is used for a downlink multi-user transmission.
void SetRuAllocation(const RuAllocation &ruAlloc)
Set RU Allocation of SIG-B common field.
const HeMuUserInfoMap & GetHeMuUserInfoMap() const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
ContentChannelAllocation GetContentChannelAllocation() const
Get the HE SIG-B content channel STA ID allocation IEEE 802.11ax-2021 27.3.11.8.2 HE-SIG-B content ch...
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.
bool IsUlMu() const
Return true if this TX vector is used for an uplink multi-user transmission.
void SetSigBMode(const WifiMode &mode)
Set the MCS used for SIG-B.
bool IsMu() 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() const
void SetMode(WifiMode mode)
Sets the selected payload transmission mode.
WifiMode GetSigBMode() const
Get MCS used for SIG-B.
void SetNss(uint8_t nss)
Sets the number of Nss.
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:66
#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:86
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:160
#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:202
#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:275
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1362
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1374
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1338
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:129
Ptr< T > Copy(Ptr< T > object)
Return a deep copy of a Ptr.
Definition: ptr.h:649
Definition: second.py:1
def start()
Definition: core.py:1861
#define SU_STA_ID
Definition: wifi-mode.h:34