A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-tx-vector.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 CTTC
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 * Authors: Nicola Baldo <nbaldo@cttc.es>
18 * Ghada Badawy <gbadawy@gmail.com>
19 */
20
21#ifndef WIFI_TX_VECTOR_H
22#define WIFI_TX_VECTOR_H
23
24#include "wifi-mode.h"
25#include "wifi-phy-band.h"
26#include "wifi-phy-common.h"
27
28#include "ns3/he-ru.h"
29
30#include <list>
31#include <optional>
32#include <set>
33#include <vector>
34
35namespace ns3
36{
37
38/// STA_ID for a RU that is intended for no user (Section 26.11.1 802.11ax-2021)
39static constexpr uint16_t NO_USER_STA_ID = 2046;
40
41/// HE MU specific user transmission parameters.
43{
44 HeRu::RuSpec ru; ///< RU specification
45 uint8_t mcs; ///< MCS index
46 uint8_t nss; ///< number of spatial streams
47
48 /**
49 * Compare this user info to the given user info.
50 *
51 * \param other the given user info
52 * \return true if this user info compares equal to the given user info, false otherwise
53 */
54 bool operator==(const HeMuUserInfo& other) const;
55 /**
56 * Compare this user info to the given user info.
57 *
58 * \param other the given user info
59 * \return true if this user info differs from the given user info, false otherwise
60 */
61 bool operator!=(const HeMuUserInfo& other) const;
62};
63
64/// 8 bit RU_ALLOCATION per 20 MHz
65using RuAllocation = std::vector<uint8_t>;
66
67/**
68 * \ingroup wifi
69 * Enum for the different values for CENTER_26_TONE_RU
70 */
72{
74 CENTER_26_TONE_RU_LOW_80_MHZ_ALLOCATED, /* also used if BW == 80 MHz */
75 CENTER_26_TONE_RU_HIGH_80_MHZ_ALLOCATED, /* unused if BW < 160 MHz */
78};
79
80/**
81 * This class mimics the TXVECTOR which is to be
82 * passed to the PHY in order to define the parameters which are to be
83 * used for a transmission. See IEEE 802.11-2016 16.2.5 "Transmit PHY",
84 * and also 8.3.4.1 "PHY SAP peer-to-peer service primitive
85 * parameters".
86 *
87 * If this class is constructed with the constructor that takes no
88 * arguments, then the client must explicitly set the mode and
89 * transmit power level parameters before using them. Default
90 * member initializers are provided for the other parameters, to
91 * conform to a non-MIMO/long guard configuration, although these
92 * may also be explicitly set after object construction.
93 *
94 * When used in a infrastructure context, WifiTxVector values should be
95 * drawn from WifiRemoteStationManager parameters since rate adaptation
96 * is responsible for picking the mode, number of streams, etc., but in
97 * the case in which there is no such manager (e.g. mesh), the client
98 * still needs to initialize at least the mode and transmit power level
99 * appropriately.
100 *
101 * \note the above reference is valid for the DSSS PHY only (clause
102 * 16). TXVECTOR is defined also for the other PHYs, however they
103 * don't include the TXPWRLVL explicitly in the TXVECTOR. This is
104 * somewhat strange, since all PHYs actually have a
105 * PMD_TXPWRLVL.request primitive. We decide to include the power
106 * level in WifiTxVector for all PHYs, since it serves better our
107 * purposes, and furthermore it seems close to the way real devices
108 * work (e.g., madwifi).
109 */
111{
112 public:
113 /// map of HE MU specific user info parameters indexed by STA-ID
114 typedef std::map<uint16_t /* staId */, HeMuUserInfo /* HE MU specific user info */>
116
117 WifiTxVector();
118 /**
119 * Create a TXVECTOR with the given parameters.
120 *
121 * \param mode WifiMode
122 * \param powerLevel transmission power level
123 * \param preamble preamble type
124 * \param guardInterval the guard interval duration in nanoseconds
125 * \param nTx the number of TX antennas
126 * \param nss the number of spatial STBC streams (NSS)
127 * \param ness the number of extension spatial streams (NESS)
128 * \param channelWidth the channel width in MHz
129 * \param aggregation enable or disable MPDU aggregation
130 * \param stbc enable or disable STBC
131 * \param ldpc enable or disable LDPC (BCC is used otherwise)
132 * \param bssColor the BSS color
133 * \param length the LENGTH field of the L-SIG
134 * \param triggerResponding the Trigger Responding parameter
135 */
137 uint8_t powerLevel,
138 WifiPreamble preamble,
139 uint16_t guardInterval,
140 uint8_t nTx,
141 uint8_t nss,
142 uint8_t ness,
143 uint16_t channelWidth,
144 bool aggregation,
145 bool stbc = false,
146 bool ldpc = false,
147 uint8_t bssColor = 0,
148 uint16_t length = 0,
149 bool triggerResponding = false);
150 /**
151 * Copy constructor
152 * \param txVector the TXVECTOR to copy
153 */
154 WifiTxVector(const WifiTxVector& txVector);
155
156 /**
157 * \returns whether mode has been initialized
158 */
159 bool GetModeInitialized() const;
160 /**
161 * If this TX vector is associated with an SU PPDU, return the selected
162 * payload transmission mode. If this TX vector is associated with an
163 * MU PPDU, return the transmission mode (MCS) selected for the transmission
164 * to the station identified by the given STA-ID.
165 *
166 * \param staId the station ID for MU
167 * \returns the selected payload transmission mode
168 */
169 WifiMode GetMode(uint16_t staId = SU_STA_ID) const;
170 /**
171 * Sets the selected payload transmission mode
172 *
173 * \param mode the payload WifiMode
174 */
175 void SetMode(WifiMode mode);
176 /**
177 * Sets the selected payload transmission mode for a given STA ID (for MU only)
178 *
179 * \param mode
180 * \param staId the station ID for MU
181 */
182 void SetMode(WifiMode mode, uint16_t staId);
183
184 /**
185 * Get the modulation class specified by this TXVECTOR.
186 *
187 * \return the Modulation Class specified by this TXVECTOR
188 */
190
191 /**
192 * \returns the transmission power level
193 */
194 uint8_t GetTxPowerLevel() const;
195 /**
196 * Sets the selected transmission power level
197 *
198 * \param powerlevel the transmission power level
199 */
200 void SetTxPowerLevel(uint8_t powerlevel);
201 /**
202 * \returns the preamble type
203 */
205 /**
206 * Sets the preamble type
207 *
208 * \param preamble the preamble type
209 */
210 void SetPreambleType(WifiPreamble preamble);
211 /**
212 * \returns the channel width (in MHz)
213 */
214 uint16_t GetChannelWidth() const;
215 /**
216 * Sets the selected channelWidth (in MHz)
217 *
218 * \param channelWidth the channel width (in MHz)
219 */
220 void SetChannelWidth(uint16_t channelWidth);
221 /**
222 * \returns the guard interval duration (in nanoseconds)
223 */
224 uint16_t GetGuardInterval() const;
225 /**
226 * Sets the guard interval duration (in nanoseconds)
227 *
228 * \param guardInterval the guard interval duration (in nanoseconds)
229 */
230 void SetGuardInterval(uint16_t guardInterval);
231 /**
232 * \returns the number of TX antennas
233 */
234 uint8_t GetNTx() const;
235 /**
236 * Sets the number of TX antennas
237 *
238 * \param nTx the number of TX antennas
239 */
240 void SetNTx(uint8_t nTx);
241 /**
242 * If this TX vector is associated with an SU PPDU, return the number of
243 * spatial streams. If this TX vector is associated with an MU PPDU,
244 * return the number of spatial streams for the transmission to the station
245 * identified by the given STA-ID.
246 *
247 * \param staId the station ID for MU
248 * \returns the number of spatial streams
249 */
250 uint8_t GetNss(uint16_t staId = SU_STA_ID) const;
251 /**
252 * \returns the maximum number of Nss over all RUs of an HE MU (used for OFDMA)
253 */
254 uint8_t GetNssMax() const;
255 /**
256 * \returns the total number of Nss for a given RU of an HE MU (used for full bandwidth MU-MIMO)
257 */
258 uint8_t GetNssTotal() const;
259 /**
260 * Sets the number of Nss
261 *
262 * \param nss the number of spatial streams
263 */
264 void SetNss(uint8_t nss);
265 /**
266 * Sets the number of Nss for MU
267 *
268 * \param nss the number of spatial streams
269 * \param staId the station ID for MU
270 */
271 void SetNss(uint8_t nss, uint16_t staId);
272 /**
273 * \returns the number of extended spatial streams
274 */
275 uint8_t GetNess() const;
276 /**
277 * Sets the Ness number
278 *
279 * \param ness the number of extended spatial streams
280 */
281 void SetNess(uint8_t ness);
282 /**
283 * Checks whether the PSDU contains A-MPDU.
284 * \returns true if this PSDU has A-MPDU aggregation,
285 * false otherwise
286 */
287 bool IsAggregation() const;
288 /**
289 * Sets if PSDU contains A-MPDU.
290 *
291 * \param aggregation whether the PSDU contains A-MPDU or not
292 */
293 void SetAggregation(bool aggregation);
294 /**
295 * Check if STBC is used or not
296 *
297 * \returns true if STBC is used,
298 * false otherwise
299 */
300 bool IsStbc() const;
301 /**
302 * Sets if STBC is being used
303 *
304 * \param stbc enable or disable STBC
305 */
306 void SetStbc(bool stbc);
307 /**
308 * Check if LDPC FEC coding is used or not
309 *
310 * \returns true if LDPC is used,
311 * false if BCC is used
312 */
313 bool IsLdpc() const;
314 /**
315 * Sets if LDPC FEC coding is being used
316 *
317 * \param ldpc enable or disable LDPC
318 */
319 void SetLdpc(bool ldpc);
320 /**
321 * Checks whether this TXVECTOR corresponds to a non-HT duplicate.
322 * \returns true if this TXVECTOR corresponds to a non-HT duplicate,
323 * false otherwise.
324 */
325 bool IsNonHtDuplicate() const;
326 /**
327 * Set the BSS color
328 * \param color the BSS color
329 */
330 void SetBssColor(uint8_t color);
331 /**
332 * Get the BSS color
333 * \return the BSS color
334 */
335 uint8_t GetBssColor() const;
336 /**
337 * Set the LENGTH field of the L-SIG
338 * \param length the LENGTH field of the L-SIG
339 */
340 void SetLength(uint16_t length);
341 /**
342 * Get the LENGTH field of the L-SIG
343 * \return the LENGTH field of the L-SIG
344 */
345 uint16_t GetLength() const;
346 /**
347 * Return true if the Trigger Responding parameter is set to true, false otherwise.
348 * \return true if the Trigger Responding parameter is set to true, false otherwise
349 */
350 bool IsTriggerResponding() const;
351 /**
352 * Set the Trigger Responding parameter to the given value
353 * \param triggerResponding the value for the Trigger Responding parameter
354 */
355 void SetTriggerResponding(bool triggerResponding);
356 /**
357 * The standard disallows certain combinations of WifiMode, number of
358 * spatial streams, and channel widths. This method can be used to
359 * check whether this WifiTxVector contains an invalid combination.
360 * If a PHY band is specified, it is checked that the PHY band is appropriate for
361 * the modulation class of the TXVECTOR, in case the latter is OFDM or ERP-OFDM.
362 *
363 * \param band the PHY band
364 * \return true if the WifiTxVector parameters are allowed by the standard
365 */
367 /**
368 * \return true if this TX vector is used for a multi-user (OFDMA and/or MU-MIMO) transmission
369 */
370 bool IsMu() const;
371 /**
372 * \return true if this TX vector is used for a downlink multi-user (OFDMA and/or MU-MIMO)
373 * transmission
374 */
375 bool IsDlMu() const;
376 /**
377 * \return true if this TX vector is used for an uplink multi-user (OFDMA and/or MU-MIMO)
378 * transmission
379 */
380 bool IsUlMu() const;
381 /**
382 * Return true if this TX vector is used for a downlink multi-user transmission using OFDMA.
383 *
384 * \return true if this TX vector is used for a downlink multi-user transmission using OFDMA
385 */
386 bool IsDlOfdma() const;
387 /**
388 * Return true if this TX vector is used for a downlink multi-user transmission using MU-MIMO.
389 *
390 * \return true if this TX vector is used for a downlink multi-user transmission using MU-MIMO
391 */
392 bool IsDlMuMimo() const;
393 /**
394 * Check if STA ID is allocated
395 * \param staId STA ID
396 * \return true if allocated, false otherwise
397 */
398 bool IsAllocated(uint16_t staId) const;
399 /**
400 * Get the RU specification for the STA-ID.
401 * This is applicable only for MU.
402 *
403 * \param staId the station ID
404 * \return the RU specification for the STA-ID
405 */
406 HeRu::RuSpec GetRu(uint16_t staId) const;
407 /**
408 * Set the RU specification for the STA-ID.
409 * This is applicable only for MU.
410 *
411 * \param ru the RU specification
412 * \param staId the station ID
413 */
414 void SetRu(HeRu::RuSpec ru, uint16_t staId);
415 /**
416 * Get the HE MU user-specific transmission information for the given STA-ID.
417 * This is applicable only for HE MU.
418 *
419 * \param staId the station ID
420 * \return the HE MU user-specific transmission information for the given STA-ID
421 */
422 HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const;
423 /**
424 * Set the HE MU user-specific transmission information for the given STA-ID.
425 * This is applicable only for HE MU.
426 *
427 * \param staId the station ID
428 * \param userInfo the HE MU user-specific transmission information
429 */
430 void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo);
431 /**
432 * Get a const reference to the map HE MU user-specific transmission information indexed by
433 * STA-ID. This is applicable only for HE MU.
434 *
435 * \return a const reference to the map of HE MU user-specific information indexed by STA-ID
436 */
437 const HeMuUserInfoMap& GetHeMuUserInfoMap() const;
438 /**
439 * Get a reference to the map HE MU user-specific transmission information indexed by STA-ID.
440 * This is applicable only for HE MU.
441 *
442 * \return a reference to the map of HE MU user-specific information indexed by STA-ID
443 */
445
446 /// map of specific user info parameters ordered per increasing frequency RUs
447 using UserInfoMapOrderedByRus = std::map<HeRu::RuSpec, std::set<uint16_t>, HeRu::RuSpecCompare>;
448
449 /**
450 * Get the map of specific user info parameters ordered per increasing frequency RUs.
451 *
452 * \param p20Index the index of the primary20 channel
453 * \return the map of specific user info parameters ordered per increasing frequency RUs
454 */
456
457 /**
458 * Indicate whether the Common field is present in the HE-SIG-B field.
459 *
460 * \return true if the Common field is present in the HE-SIG-B, false otherwise
461 */
462 bool IsSigBCompression() const;
463
464 /**
465 * Set the 20 MHz subchannels that are punctured.
466 *
467 * \param inactiveSubchannels the bitmap indexed by the 20 MHz subchannels in ascending order,
468 * where each bit indicates whether the corresponding 20 MHz subchannel is punctured or
469 * not within the transmission bandwidth
470 */
471 void SetInactiveSubchannels(const std::vector<bool>& inactiveSubchannels);
472 /**
473 * Get the 20 MHz subchannels that are punctured.
474 *
475 * \return the bitmap indexed by the 20 MHz subchannels in ascending order,
476 * where each bit indicates whether the corresponding 20 MHz subchannel is punctured or
477 * not within the transmission bandwidth
478 */
479 const std::vector<bool>& GetInactiveSubchannels() const;
480
481 /**
482 * Set the MCS used for SIG-B
483 * \param mode MCS used for SIG-B
484 */
485 void SetSigBMode(const WifiMode& mode);
486
487 /**
488 * Get MCS used for SIG-B
489 * \return MCS for SIG-B
490 */
491 WifiMode GetSigBMode() const;
492
493 /**
494 * Set RU_ALLOCATION field
495 * \param ruAlloc 8 bit RU_ALLOCATION per 20 MHz
496 * \param p20Index the index of the primary20 channel
497 */
498 void SetRuAllocation(const RuAllocation& ruAlloc, uint8_t p20Index);
499
500 /**
501 * Get RU_ALLOCATION field
502 * \return 8 bit RU_ALLOCATION per 20 MHz
503 * \param p20Index the index of the primary20 channel
504 */
505 const RuAllocation& GetRuAllocation(uint8_t p20Index) const;
506
507 /**
508 * Set CENTER_26_TONE_RU field
509 * \param center26ToneRuIndication the CENTER_26_TONE_RU field
510 */
511 void SetCenter26ToneRuIndication(Center26ToneRuIndication center26ToneRuIndication);
512
513 /**
514 * Get CENTER_26_TONE_RU field
515 * This field is present if format is HE_MU and
516 * when channel width is set to 80 MHz or larger.
517 * \return the CENTER_26_TONE_RU field if present
518 */
519 std::optional<Center26ToneRuIndication> GetCenter26ToneRuIndication() const;
520
521 /**
522 * Set the EHT_PPDU_TYPE parameter
523 * \param type the EHT_PPDU_TYPE parameter
524 */
525 void SetEhtPpduType(uint8_t type);
526 /**
527 * Get the EHT_PPDU_TYPE parameter
528 * \return the EHT_PPDU_TYPE parameter
529 */
530 uint8_t GetEhtPpduType() const;
531
532 private:
533 /**
534 * Derive the RU_ALLOCATION field from the TXVECTOR
535 * for which its RU_ALLOCATION field has not been set yet,
536 * based on the content of per-user information.
537 * This is valid only for allocations of RUs of the same size per 20 MHz subchannel.
538 *
539 * \param p20Index the index of the primary20 channel
540 * \return 8 bit RU_ALLOCATION per 20 MHz
541 */
542 RuAllocation DeriveRuAllocation(uint8_t p20Index) const;
543
544 /**
545 * Derive the CENTER_26_TONE_RU field from the TXVECTOR
546 * for which its CENTER_26_TONE_RU has not been set yet,
547 * based on the content of per-user information.
548 *
549 * \return the CENTER_26_TONE_RU field
550 */
552
553 /**
554 * Get the number of STAs in a given RU.
555 *
556 * \param ru the RU specification
557 * \return the number of STAs in the RU
558 */
559 uint8_t GetNumStasInRu(const HeRu::RuSpec& ru) const;
560
561 WifiMode m_mode; /**< The DATARATE parameter in Table 15-4.
562 It is the value that will be passed
563 to PMD_RATE.request */
564 uint8_t m_txPowerLevel; /**< The TXPWR_LEVEL parameter in Table 15-4.
565 It is the value that will be passed
566 to PMD_TXPWRLVL.request */
567 WifiPreamble m_preamble; /**< preamble */
568 uint16_t m_channelWidth; /**< channel width in MHz */
569 uint16_t m_guardInterval; /**< guard interval duration in nanoseconds */
570 uint8_t m_nTx; /**< number of TX antennas */
571 uint8_t m_nss; /**< number of spatial streams */
572 uint8_t m_ness; /**< number of spatial streams in beamforming */
573 bool m_aggregation; /**< Flag whether the PSDU contains A-MPDU. */
574 bool m_stbc; /**< STBC used or not */
575 bool m_ldpc; /**< LDPC FEC coding if true, BCC otherwise*/
576 uint8_t m_bssColor; /**< BSS color */
577 uint16_t m_length; /**< LENGTH field of the L-SIG */
578 bool m_triggerResponding; /**< The Trigger Responding parameter */
579
580 bool m_modeInitialized; /**< Internal initialization flag */
581
582 // MU information
583 HeMuUserInfoMap m_muUserInfos; /**< HE MU specific per-user information
584 indexed by station ID (STA-ID) corresponding
585 to the 11 LSBs of the AID of the recipient STA
586 This list shall be used only for HE MU */
587 std::vector<bool>
588 m_inactiveSubchannels; /**< Bitmap of inactive subchannels used for preamble puncturing */
589
590 WifiMode m_sigBMcs; /**< MCS_SIG_B per Table 27-1 IEEE 802.11ax-2021 */
591
592 mutable RuAllocation m_ruAllocation; /**< RU allocations that are going to be carried
593 in SIG-B common field per Table 27-1 IEEE */
594
595 mutable std::optional<Center26ToneRuIndication>
596 m_center26ToneRuIndication; /**< CENTER_26_TONE_RU field when format is HE_MU and
597 when channel width is set to 80 MHz or larger (Table 27-1
598 802.11ax-2021)*/
599
600 uint8_t m_ehtPpduType; /**< EHT_PPDU_TYPE per Table 36-1 IEEE 802.11be D2.3 */
601};
602
603/**
604 * Serialize WifiTxVector to the given ostream.
605 *
606 * \param os the output stream
607 * \param v the WifiTxVector to stringify
608 *
609 * \return output stream
610 */
611std::ostream& operator<<(std::ostream& os, const WifiTxVector& v);
612
613} // namespace ns3
614
615#endif /* WIFI_TX_VECTOR_H */
RU Specification.
Definition: he-ru.h:66
represent a single transmission mode
Definition: wifi-mode.h:51
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
uint16_t m_channelWidth
channel width in MHz
void SetCenter26ToneRuIndication(Center26ToneRuIndication center26ToneRuIndication)
Set CENTER_26_TONE_RU field.
void SetRuAllocation(const RuAllocation &ruAlloc, uint8_t p20Index)
Set RU_ALLOCATION field.
void SetStbc(bool stbc)
Sets if STBC is being used.
void SetNess(uint8_t ness)
Sets the Ness number.
UserInfoMapOrderedByRus GetUserInfoMapOrderedByRus(uint8_t p20Index) const
Get the map of specific user info parameters ordered per increasing frequency RUs.
bool IsTriggerResponding() const
Return true if the Trigger Responding parameter is set to true, false otherwise.
bool m_aggregation
Flag whether the PSDU contains A-MPDU.
void SetEhtPpduType(uint8_t type)
Set the EHT_PPDU_TYPE parameter.
uint8_t GetNumStasInRu(const HeRu::RuSpec &ru) const
Get the number of STAs in a given RU.
uint16_t GetGuardInterval() const
bool IsSigBCompression() const
Indicate whether the Common field is present in the HE-SIG-B field.
void SetTxPowerLevel(uint8_t powerlevel)
Sets the selected transmission power level.
void SetLdpc(bool ldpc)
Sets if LDPC FEC coding is being used.
void SetChannelWidth(uint16_t channelWidth)
Sets the selected channelWidth (in MHz)
uint8_t GetBssColor() const
Get the BSS color.
bool GetModeInitialized() const
const RuAllocation & GetRuAllocation(uint8_t p20Index) const
Get RU_ALLOCATION field.
std::optional< Center26ToneRuIndication > m_center26ToneRuIndication
CENTER_26_TONE_RU field when format is HE_MU and when channel width is set to 80 MHz or larger (Table...
std::vector< bool > m_inactiveSubchannels
Bitmap of inactive subchannels used for preamble puncturing.
WifiMode m_mode
The DATARATE parameter in Table 15-4.
std::map< uint16_t, HeMuUserInfo > HeMuUserInfoMap
map of HE MU specific user info parameters indexed by STA-ID
uint8_t GetNTx() const
void SetGuardInterval(uint16_t guardInterval)
Sets the guard interval duration (in nanoseconds)
bool IsValid(WifiPhyBand band=WIFI_PHY_BAND_UNSPECIFIED) const
The standard disallows certain combinations of WifiMode, number of spatial streams,...
std::optional< Center26ToneRuIndication > GetCenter26ToneRuIndication() const
Get CENTER_26_TONE_RU field This field is present if format is HE_MU and when channel width is set to...
void SetTriggerResponding(bool triggerResponding)
Set the Trigger Responding parameter to the given value.
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.
RuAllocation m_ruAllocation
RU allocations that are going to be carried in SIG-B common field per Table 27-1 IEEE.
void SetInactiveSubchannels(const std::vector< bool > &inactiveSubchannels)
Set the 20 MHz subchannels that are punctured.
bool IsStbc() const
Check if STBC is used or not.
void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo)
Set the HE MU user-specific transmission information for the given STA-ID.
WifiPreamble GetPreambleType() const
HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const
Get the HE MU user-specific transmission information for the given STA-ID.
uint8_t m_nTx
number of TX antennas
bool m_triggerResponding
The Trigger Responding parameter.
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.
HeMuUserInfoMap m_muUserInfos
HE MU specific per-user information indexed by station ID (STA-ID) corresponding to the 11 LSBs of th...
uint8_t m_txPowerLevel
The TXPWR_LEVEL parameter in Table 15-4.
bool m_ldpc
LDPC FEC coding if true, BCC otherwise.
uint16_t GetLength() const
Get the LENGTH field of the L-SIG.
uint16_t m_guardInterval
guard interval duration in nanoseconds
bool IsDlMu() const
bool m_stbc
STBC used or not.
uint8_t m_nss
number of spatial streams
uint8_t GetNssTotal() const
const HeMuUserInfoMap & GetHeMuUserInfoMap() const
Get a const reference to the map HE MU user-specific transmission information indexed by STA-ID.
void SetRu(HeRu::RuSpec ru, uint16_t staId)
Set the RU specification for the STA-ID.
uint8_t GetEhtPpduType() const
Get the EHT_PPDU_TYPE parameter.
bool IsDlOfdma() const
Return true if this TX vector is used for a downlink multi-user transmission using OFDMA.
WifiModulationClass GetModulationClass() const
Get the modulation class specified by this TXVECTOR.
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.
uint8_t GetNssMax() const
bool IsUlMu() const
void SetSigBMode(const WifiMode &mode)
Set the MCS used for SIG-B.
uint16_t m_length
LENGTH field of the L-SIG.
uint8_t m_bssColor
BSS color.
WifiMode m_sigBMcs
MCS_SIG_B per Table 27-1 IEEE 802.11ax-2021.
void SetBssColor(uint8_t color)
Set the BSS color.
bool IsLdpc() const
Check if LDPC FEC coding is used or not.
void SetNTx(uint8_t nTx)
Sets the number of TX antennas.
uint8_t GetTxPowerLevel() const
std::map< HeRu::RuSpec, std::set< uint16_t >, HeRu::RuSpecCompare > UserInfoMapOrderedByRus
map of specific user info parameters ordered per increasing frequency RUs
bool IsAggregation() const
Checks whether the PSDU contains A-MPDU.
uint8_t m_ehtPpduType
EHT_PPDU_TYPE per Table 36-1 IEEE 802.11be D2.3.
bool IsAllocated(uint16_t staId) const
Check if STA ID is allocated.
uint16_t GetChannelWidth() const
WifiPreamble m_preamble
preamble
Center26ToneRuIndication DeriveCenter26ToneRuIndication() const
Derive the CENTER_26_TONE_RU field from the TXVECTOR for which its CENTER_26_TONE_RU has not been set...
RuAllocation DeriveRuAllocation(uint8_t p20Index) const
Derive the RU_ALLOCATION field from the TXVECTOR for which its RU_ALLOCATION field has not been set y...
bool m_modeInitialized
Internal initialization flag.
bool IsDlMuMimo() const
Return true if this TX vector is used for a downlink multi-user transmission using MU-MIMO.
uint8_t GetNess() const
uint8_t m_ness
number of spatial streams in beamforming
bool IsNonHtDuplicate() const
Checks whether this TXVECTOR corresponds to a non-HT duplicate.
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.
const std::vector< bool > & GetInactiveSubchannels() const
Get the 20 MHz subchannels that are punctured.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Center26ToneRuIndication
Enum for the different values for CENTER_26_TONE_RU.
WifiPhyBand
Identifies the PHY band.
Definition: wifi-phy-band.h:33
WifiModulationClass
This enumeration defines the modulation classes per (Table 10-6 "Modulation classes"; IEEE 802....
@ CENTER_26_TONE_RU_LOW_AND_HIGH_80_MHZ_ALLOCATED
@ CENTER_26_TONE_RU_UNALLOCATED
@ CENTER_26_TONE_RU_HIGH_80_MHZ_ALLOCATED
@ CENTER_26_TONE_RU_LOW_80_MHZ_ALLOCATED
@ CENTER_26_TONE_RU_INDICATION_MAX
@ WIFI_PHY_BAND_UNSPECIFIED
Unspecified.
Definition: wifi-phy-band.h:43
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:159
static constexpr uint16_t NO_USER_STA_ID
STA_ID for a RU that is intended for no user (Section 26.11.1 802.11ax-2021)
std::vector< uint8_t > RuAllocation
8 bit RU_ALLOCATION per 20 MHz
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
Definition: wifi-mode.h:35
HE MU specific user transmission parameters.
uint8_t mcs
MCS index.
HeRu::RuSpec ru
RU specification.
uint8_t nss
number of spatial streams
bool operator!=(const HeMuUserInfo &other) const
Compare this user info to the given user info.
bool operator==(const HeMuUserInfo &other) const
Compare this user info to the given user info.
Struct providing a function call operator to compare two RUs.
Definition: he-ru.h:141
Declaration of the following enums: