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, Time ppduDuration,
51 WifiPhyBand band, uint64_t uid, TxPsdFlag flag, uint8_t p20Index)
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 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
71 SetPhyHeaders (txVector, ppduDuration);
72 SetTxPsdFlag (flag);
73}
74
75HePpdu::HePpdu (Ptr<const WifiPsdu> psdu, const WifiTxVector& txVector, Time ppduDuration,
76 WifiPhyBand band, uint64_t uid)
77 : OfdmPpdu (psdu, txVector, band, uid, false) //don't instantiate LSigHeader of OfdmPpdu
78{
79 NS_LOG_FUNCTION (this << psdu << txVector << ppduDuration << band << uid);
80 NS_ASSERT (!IsMu ());
81 SetPhyHeaders (txVector, ppduDuration);
83}
84
86{
87}
88
89void
90HePpdu::SetPhyHeaders (const WifiTxVector& txVector, Time ppduDuration)
91{
92 NS_LOG_FUNCTION (this << txVector << ppduDuration);
93 uint8_t sigExtension = 0;
95 {
96 sigExtension = 6;
97 }
98 uint8_t m = 0;
100 {
101 m = 2;
102 }
104 {
105 m = 1;
106 }
107 else
108 {
109 NS_ASSERT_MSG (false, "Unsupported preamble type");
110 }
111 uint16_t length = ((ceil ((static_cast<double> (ppduDuration.GetNanoSeconds () - (20 * 1000) - (sigExtension * 1000)) / 1000) / 4.0) * 3) - 3 - m);
112 m_lSig.SetLength (length);
113 if (IsDlMu ())
114 {
115 m_heSig.SetMuFlag (true);
116 }
117 else if (!IsUlMu ())
118 {
119 m_heSig.SetMcs (txVector.GetMode ().GetMcsValue ());
120 m_heSig.SetNStreams (txVector.GetNss ());
121 }
122 m_heSig.SetBssColor (txVector.GetBssColor ());
124 m_heSig.SetGuardIntervalAndLtfSize (txVector.GetGuardInterval (), 2/*NLTF currently unused*/);
125}
126
129{
130 WifiTxVector txVector;
131 txVector.SetPreambleType (m_preamble);
132 txVector.SetMode (HePhy::GetHeMcs (m_heSig.GetMcs ()));
134 txVector.SetNss (m_heSig.GetNStreams ());
136 txVector.SetBssColor (m_heSig.GetBssColor ());
137 txVector.SetLength (m_lSig.GetLength ());
138 txVector.SetAggregation (m_psdus.size () > 1 || m_psdus.begin ()->second->IsAggregate ());
139 for (auto const& muUserInfo : m_muUserInfos)
140 {
141 txVector.SetHeMuUserInfo (muUserInfo.first, muUserInfo.second);
142 }
143 return txVector;
144}
145
146Time
148{
149 Time ppduDuration = Seconds (0);
150 const WifiTxVector& txVector = GetTxVector ();
151 Time tSymbol = NanoSeconds (12800 + txVector.GetGuardInterval ());
152 Time preambleDuration = WifiPhy::CalculatePhyPreambleAndHeaderDuration (txVector);
153 uint8_t sigExtension = 0;
155 {
156 sigExtension = 6;
157 }
158 uint8_t m = IsDlMu () ? 1 : 2;
159 //Equation 27-11 of IEEE P802.11ax/D4.0
160 Time calculatedDuration = MicroSeconds (((ceil (static_cast<double> (m_lSig.GetLength () + 3 + m) / 3)) * 4) + 20 + sigExtension);
161 uint32_t nSymbols = floor (static_cast<double> ((calculatedDuration - preambleDuration).GetNanoSeconds () - (sigExtension * 1000)) / tSymbol.GetNanoSeconds ());
162 ppduDuration = preambleDuration + (nSymbols * tSymbol) + MicroSeconds (sigExtension);
163 return ppduDuration;
164}
165
167HePpdu::Copy (void) const
168{
169 return ns3::Copy (Ptr (this));
170}
171
173HePpdu::GetType (void) const
174{
175 switch (m_preamble)
176 {
181 default:
182 return WIFI_PPDU_TYPE_SU;
183 }
184}
185
186bool
187HePpdu::IsMu (void) const
188{
189 return (IsDlMu () || IsUlMu ());
190}
191
192bool
193HePpdu::IsDlMu (void) const
194{
196}
197
198bool
199HePpdu::IsUlMu (void) const
200{
202}
203
205HePpdu::GetPsdu (uint8_t bssColor, uint16_t staId /* = SU_STA_ID */) const
206{
207 if (!IsMu ())
208 {
209 NS_ASSERT (m_psdus.size () == 1);
210 return m_psdus.at (SU_STA_ID);
211 }
212 else if (IsUlMu ())
213 {
214 NS_ASSERT (m_psdus.size () == 1);
215 if (bssColor == 0 || m_heSig.GetBssColor () == 0 || (bssColor == m_heSig.GetBssColor ()))
216 {
217 return m_psdus.begin ()->second;
218 }
219 }
220 else
221 {
222 if (bssColor == 0 || m_heSig.GetBssColor () == 0 || (bssColor == m_heSig.GetBssColor ()))
223 {
224 auto it = m_psdus.find (staId);
225 if (it != m_psdus.end ())
226 {
227 return it->second;
228 }
229 }
230 }
231 return nullptr;
232}
233
234uint16_t
236{
237 NS_ASSERT (IsUlMu ());
238 return m_psdus.begin ()->first;
239}
240
241uint16_t
243{
244 WifiTxVector txVector = GetTxVector ();
245 if (txVector.GetPreambleType () == WIFI_PREAMBLE_HE_TB && GetStaId () != SU_STA_ID)
246 {
247 TxPsdFlag flag = GetTxPsdFlag ();
248 NS_ASSERT (flag > PSD_NON_HE_TB);
249 uint16_t ruWidth = HeRu::GetBandwidth (txVector.GetRu (GetStaId ()).GetRuType ());
250 uint16_t channelWidth = (flag == PSD_HE_TB_NON_OFDMA_PORTION && ruWidth < 20) ? 20 : ruWidth;
251 NS_LOG_INFO ("Use channelWidth=" << channelWidth << " MHz for HE TB from " << GetStaId ()
252 << " for " << flag);
253 return channelWidth;
254 }
255 else
256 {
258 }
259}
260
261bool
262HePpdu::CanBeReceived (uint16_t txCenterFreq, uint16_t p20MinFreq, uint16_t p20MaxFreq) const
263{
264 NS_LOG_FUNCTION (this << txCenterFreq << p20MinFreq << p20MaxFreq);
265
266 if (IsUlMu ())
267 {
268 // APs are able to receive TB PPDUs sent on a band other than the primary20 channel
269 return true;
270 }
271 return OfdmPpdu::CanBeReceived (txCenterFreq, p20MinFreq, p20MaxFreq);
272}
273
276{
277 return m_txPsdFlag;
278}
279
280void
282{
283 NS_LOG_FUNCTION (this << flag);
284 NS_ASSERT ((IsUlMu () && flag > PSD_NON_HE_TB) || (!IsUlMu () && flag == PSD_NON_HE_TB));
285 m_txPsdFlag = flag;
286}
287
288std::string
290{
291 std::ostringstream ss;
292 if (IsMu ())
293 {
294 ss << m_psdus;
295 ss << ", " << m_txPsdFlag;
296 }
297 else
298 {
299 ss << "PSDU=" << m_psdus.at (SU_STA_ID) << " ";
300 }
301 return ss.str ();
302}
303
305 : m_format (1),
306 m_bssColor (0),
307 m_ul_dl (0),
308 m_mcs (0),
309 m_spatialReuse (0),
310 m_bandwidth (0),
311 m_gi_ltf_size (0),
312 m_nsts (0),
313 m_mu (false)
314{
315}
316
318{
319}
320
321TypeId
323{
324 static TypeId tid = TypeId ("ns3::HeSigHeader")
325 .SetParent<Header> ()
326 .SetGroupName ("Wifi")
327 .AddConstructor<HeSigHeader> ()
328 ;
329 return tid;
330}
331
332TypeId
334{
335 return GetTypeId ();
336}
337
338void
339HePpdu::HeSigHeader::Print (std::ostream &os) const
340{
341 os << "MCS=" << +m_mcs
342 << " CHANNEL_WIDTH=" << GetChannelWidth ()
343 << " GI=" << GetGuardInterval ()
344 << " NSTS=" << +m_nsts
345 << " BSSColor=" << +m_bssColor
346 << " MU=" << +m_mu;
347}
348
351{
352 uint32_t size = 0;
353 size += 4; //HE-SIG-A1
354 size += 4; //HE-SIG-A2
355 if (m_mu)
356 {
357 size += 1; //HE-SIG-B
358 }
359 return size;
360}
361
362void
364{
365 m_mu = mu;
366}
367
368void
370{
371 NS_ASSERT (mcs <= 11);
372 m_mcs = mcs;
373}
374
375uint8_t
377{
378 return m_mcs;
379}
380
381void
383{
384 NS_ASSERT (bssColor < 64);
385 m_bssColor = bssColor;
386}
387
388uint8_t
390{
391 return m_bssColor;
392}
393
394void
396{
397 if (channelWidth == 160)
398 {
399 m_bandwidth = 3;
400 }
401 else if (channelWidth == 80)
402 {
403 m_bandwidth = 2;
404 }
405 else if (channelWidth == 40)
406 {
407 m_bandwidth = 1;
408 }
409 else
410 {
411 m_bandwidth = 0;
412 }
413}
414
415uint16_t
417{
418 if (m_bandwidth == 3)
419 {
420 return 160;
421 }
422 else if (m_bandwidth == 2)
423 {
424 return 80;
425 }
426 else if (m_bandwidth == 1)
427 {
428 return 40;
429 }
430 else
431 {
432 return 20;
433 }
434}
435
436void
438{
439 if (gi == 800 && ltf == 1)
440 {
441 m_gi_ltf_size = 0;
442 }
443 else if (gi == 800 && ltf == 2)
444 {
445 m_gi_ltf_size = 1;
446 }
447 else if (gi == 1600 && ltf == 2)
448 {
449 m_gi_ltf_size = 2;
450 }
451 else
452 {
453 m_gi_ltf_size = 3;
454 }
455}
456
457uint16_t
459{
460 if (m_gi_ltf_size == 3)
461 {
462 //we currently do not consider DCM nor STBC fields
463 return 3200;
464 }
465 else if (m_gi_ltf_size == 2)
466 {
467 return 1600;
468 }
469 else
470 {
471 return 800;
472 }
473}
474
475void
477{
478 NS_ASSERT (nStreams <= 8);
479 m_nsts = (nStreams - 1);
480}
481
482uint8_t
484{
485 return (m_nsts + 1);
486}
487
488void
490{
491 //HE-SIG-A1
492 uint8_t byte = m_format & 0x01;
493 byte |= ((m_ul_dl & 0x01) << 2);
494 byte |= ((m_mcs & 0x0f) << 3);
495 start.WriteU8 (byte);
496 uint16_t bytes = (m_bssColor & 0x3f);
497 bytes |= (0x01 << 6); //Reserved set to 1
498 bytes |= ((m_spatialReuse & 0x0f) << 7);
499 bytes |= ((m_bandwidth & 0x03) << 11);
500 bytes |= ((m_gi_ltf_size & 0x03) << 13);
501 bytes |= ((m_nsts & 0x01) << 15);
502 start.WriteU16 (bytes);
503 start.WriteU8 ((m_nsts >> 1) & 0x03);
504
505 //HE-SIG-A2
506 uint32_t sigA2 = 0;
507 sigA2 |= (0x01 << 14); //Set Reserved bit #14 to 1
508 start.WriteU32 (sigA2);
509
510 if (m_mu)
511 {
512 //HE-SIG-B
513 start.WriteU8 (0);
514 }
515}
516
519{
521
522 //HE-SIG-A1
523 uint8_t byte = i.ReadU8 ();
524 m_format = (byte & 0x01);
525 m_ul_dl = ((byte >> 2) & 0x01);
526 m_mcs = ((byte >> 3) & 0x0f);
527 uint16_t bytes = i.ReadU16 ();
528 m_bssColor = (bytes & 0x3f);
529 m_spatialReuse = ((bytes >> 7) & 0x0f);
530 m_bandwidth = ((bytes >> 11) & 0x03);
531 m_gi_ltf_size = ((bytes >> 13) & 0x03);
532 m_nsts = ((bytes >> 15) & 0x01);
533 byte = i.ReadU8 ();
534 m_nsts |= (byte & 0x03) << 1;
535
536 //HE-SIG-A2
537 i.ReadU32 ();
538
539 if (m_mu)
540 {
541 //HE-SIG-B
542 i.ReadU8 ();
543 }
544
545 return i.GetDistanceFrom (start);
546}
547
548} //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:1014
HE-SIG PHY header (HE-SIG-A1/A2/B)
Definition: he-ppdu.h:52
uint32_t GetSerializedSize(void) const override
Definition: he-ppdu.cc:350
uint16_t GetGuardInterval(void) const
Return the guard interval (in nanoseconds).
Definition: he-ppdu.cc:458
void SetChannelWidth(uint16_t channelWidth)
Fill the channel width field of HE-SIG-A1 (in MHz).
Definition: he-ppdu.cc:395
void SetBssColor(uint8_t bssColor)
Fill the BSS Color field of HE-SIG-A1.
Definition: he-ppdu.cc:382
static TypeId GetTypeId(void)
Get the type ID.
Definition: he-ppdu.cc:322
uint32_t Deserialize(Buffer::Iterator start) override
Definition: he-ppdu.cc:518
TypeId GetInstanceTypeId(void) const override
Get the most derived TypeId for this Object.
Definition: he-ppdu.cc:333
uint8_t GetMcs(void) const
Return the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:376
uint8_t GetNStreams(void) const
Return the number of streams.
Definition: he-ppdu.cc:483
void SetMuFlag(bool mu)
Set the Multi-User (MU) flag.
Definition: he-ppdu.cc:363
void Print(std::ostream &os) const override
Definition: he-ppdu.cc:339
void Serialize(Buffer::Iterator start) const override
Definition: he-ppdu.cc:489
uint8_t GetBssColor(void) const
Return the BSS Color field in the HE-SIG-A1.
Definition: he-ppdu.cc:389
void SetGuardIntervalAndLtfSize(uint16_t gi, uint8_t ltf)
Fill the GI + LTF size field of HE-SIG-A1.
Definition: he-ppdu.cc:437
void SetMcs(uint8_t mcs)
Fill the MCS field of HE-SIG-A1.
Definition: he-ppdu.cc:369
uint16_t GetChannelWidth(void) const
Return the channel width (in MHz).
Definition: he-ppdu.cc:416
void SetNStreams(uint8_t nStreams)
Fill the number of streams field of HE-SIG-A1.
Definition: he-ppdu.cc:476
HeSigHeader m_heSig
the HE-SIG PHY header
Definition: he-ppdu.h:259
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:262
void SetTxPsdFlag(TxPsdFlag flag)
Definition: he-ppdu.cc:281
bool IsDlMu(void) const
Return true if the PPDU is a DL MU PPDU.
Definition: he-ppdu.cc:193
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:242
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:246
virtual ~HePpdu()
Destructor for HePpdu.
Definition: he-ppdu.cc:85
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:75
void SetPhyHeaders(const WifiTxVector &txVector, Time ppduDuration)
Fill in the HE PHY headers.
Definition: he-ppdu.cc:90
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:235
WifiTxVector DoGetTxVector(void) const override
Get the TXVECTOR used to send the PPDU.
Definition: he-ppdu.cc:128
bool IsUlMu(void) const
Return true if the PPDU is an UL MU PPDU.
Definition: he-ppdu.cc:199
Ptr< WifiPpdu > Copy(void) const override
Copy this instance.
Definition: he-ppdu.cc:167
Time GetTxDuration(void) const override
Get the total transmission duration of the PPDU.
Definition: he-ppdu.cc:147
bool IsMu(void) const
Return true if the PPDU is a MU PPDU.
Definition: he-ppdu.cc:187
std::string PrintPayload(void) const override
Print the payload of the PPDU.
Definition: he-ppdu.cc:289
WifiPpduType GetType(void) const override
Return the PPDU type (.
Definition: he-ppdu.cc:173
TxPsdFlag m_txPsdFlag
the transmit power spectral density flag
Definition: he-ppdu.h:260
TxPsdFlag GetTxPsdFlag(void) const
Definition: he-ppdu.cc:275
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:126
LSigHeader m_lSig
the L-SIG PHY header
Definition: ofdm-ppdu.h:128
uint16_t m_channelWidth
the channel width used to transmit that PPDU in MHz
Definition: ofdm-ppdu.h:127
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
int64_t GetNanoSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:391
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:1300
WifiTxVector GetTxVector(void) const
Get the TXVECTOR used to send the PPDU.
Definition: wifi-ppdu.cc:63
WifiPreamble m_preamble
the PHY preamble
Definition: wifi-ppdu.h:177
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
WifiConstPsduMap m_psdus
the PSDUs contained in this PPDU
Definition: wifi-ppdu.h:179
Ptr< const WifiPsdu > GetPsdu(void) const
Get the payload of the PPDU.
Definition: wifi-ppdu.cc:79
virtual uint16_t GetTransmissionChannelWidth(void) const
Get the channel width over which the PPDU will effectively be transmitted.
Definition: wifi-ppdu.cc:104
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.
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.
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.
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_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
#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:1260
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1268
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1244
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_PREAMBLE_HE_SU
@ 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:1853
#define SU_STA_ID
Definition: wifi-mode.h:32