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