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#include "wifi-ru.h"
17
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 WifiRu::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/// 9 bits RU_ALLOCATION per 20 MHz
55using RuAllocation = std::vector<uint16_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 * Get the RU specification for the STA-ID.
385 * This is applicable only for MU.
386 *
387 * @param staId the station ID
388 * @return the RU specification for the STA-ID
389 */
390 WifiRu::RuSpec GetRu(uint16_t staId) const;
391 /**
392 * Set the RU specification for the STA-ID.
393 * This is applicable only for MU.
394 *
395 * @param ru the RU specification
396 * @param staId the station ID
397 */
398 void SetRu(WifiRu::RuSpec ru, uint16_t staId);
399 /**
400 * Get the HE MU user-specific transmission information for the given STA-ID.
401 * This is applicable only for HE MU.
402 *
403 * @param staId the station ID
404 * @return the HE MU user-specific transmission information for the given STA-ID
405 */
406 HeMuUserInfo GetHeMuUserInfo(uint16_t staId) const;
407 /**
408 * Set the HE MU user-specific transmission information for the given STA-ID.
409 * This is applicable only for HE MU.
410 *
411 * @param staId the station ID
412 * @param userInfo the HE MU user-specific transmission information
413 */
414 void SetHeMuUserInfo(uint16_t staId, HeMuUserInfo userInfo);
415 /**
416 * Get a const reference to the map HE MU user-specific transmission information indexed by
417 * STA-ID. This is applicable only for HE MU.
418 *
419 * @return a const reference to the map of HE MU user-specific information indexed by STA-ID
420 */
421 const HeMuUserInfoMap& GetHeMuUserInfoMap() const;
422 /**
423 * Get a reference to the map HE MU user-specific transmission information indexed by STA-ID.
424 * This is applicable only for HE MU.
425 *
426 * @return a reference to the map of HE MU user-specific information indexed by STA-ID
427 */
429
430 /// map of specific user info parameters ordered per increasing frequency RUs
432 std::map<WifiRu::RuSpec, std::set<uint16_t>, WifiRu::RuSpecCompare>;
433
434 /**
435 * Get the map of specific user info parameters ordered per increasing frequency RUs.
436 *
437 * @param p20Index the index of the primary20 channel
438 * @return the map of specific user info parameters ordered per increasing frequency RUs
439 */
441
442 /**
443 * Indicate whether the Common field is present in the HE-SIG-B field.
444 *
445 * @return true if the Common field is present in the HE-SIG-B, false otherwise
446 */
447 bool IsSigBCompression() const;
448
449 /**
450 * Set the 20 MHz subchannels that are punctured.
451 *
452 * @param inactiveSubchannels the bitmap indexed by the 20 MHz subchannels in ascending order,
453 * where each bit indicates whether the corresponding 20 MHz subchannel is punctured or
454 * not within the transmission bandwidth
455 */
456 void SetInactiveSubchannels(const std::vector<bool>& inactiveSubchannels);
457 /**
458 * Get the 20 MHz subchannels that are punctured.
459 *
460 * @return the bitmap indexed by the 20 MHz subchannels in ascending order,
461 * where each bit indicates whether the corresponding 20 MHz subchannel is punctured or
462 * not within the transmission bandwidth
463 */
464 const std::vector<bool>& GetInactiveSubchannels() const;
465
466 /**
467 * Set the MCS used for SIG-B
468 * @param mode MCS used for SIG-B
469 */
470 void SetSigBMode(const WifiMode& mode);
471
472 /**
473 * Get MCS used for SIG-B
474 * @return MCS for SIG-B
475 */
476 WifiMode GetSigBMode() const;
477
478 /**
479 * Set RU_ALLOCATION field
480 * @param ruAlloc 8 bit RU_ALLOCATION per 20 MHz
481 * @param p20Index the index of the primary20 channel
482 */
483 void SetRuAllocation(const RuAllocation& ruAlloc, uint8_t p20Index);
484
485 /**
486 * Get RU_ALLOCATION field
487 * @return 8 bit RU_ALLOCATION per 20 MHz
488 * @param p20Index the index of the primary20 channel
489 */
490 const RuAllocation& GetRuAllocation(uint8_t p20Index) const;
491
492 /**
493 * Set CENTER_26_TONE_RU field
494 * @param center26ToneRuIndication the CENTER_26_TONE_RU field
495 */
496 void SetCenter26ToneRuIndication(Center26ToneRuIndication center26ToneRuIndication);
497
498 /**
499 * Get CENTER_26_TONE_RU field
500 * This field is present if format is HE_MU and
501 * when channel width is set to 80 MHz or larger.
502 * @return the CENTER_26_TONE_RU field if present
503 */
504 std::optional<Center26ToneRuIndication> GetCenter26ToneRuIndication() const;
505
506 /**
507 * Set the EHT_PPDU_TYPE parameter
508 * @param type the EHT_PPDU_TYPE parameter
509 */
510 void SetEhtPpduType(uint8_t type);
511 /**
512 * Get the EHT_PPDU_TYPE parameter
513 * @return the EHT_PPDU_TYPE parameter
514 */
515 uint8_t GetEhtPpduType() const;
516
517 private:
518 /**
519 * Derive the RU_ALLOCATION field from the TXVECTOR
520 * for which its RU_ALLOCATION field has not been set yet,
521 * based on the content of per-user information.
522 * This is valid only for allocations of RUs of the same size per 20 MHz subchannel.
523 *
524 * @param p20Index the index of the primary20 channel
525 * @return 8 bit RU_ALLOCATION per 20 MHz
526 */
527 RuAllocation DeriveRuAllocation(uint8_t p20Index) const;
528
529 /**
530 * Derive the CENTER_26_TONE_RU field from the TXVECTOR
531 * for which its CENTER_26_TONE_RU has not been set yet,
532 * based on the content of per-user information.
533 *
534 * @return the CENTER_26_TONE_RU field
535 */
537
538 /**
539 * Get the number of STAs in a given RU.
540 *
541 * @param ru the RU specification
542 * @return the number of STAs in the RU
543 */
544 uint8_t GetNumStasInRu(const WifiRu::RuSpec& ru) const;
545
546 WifiMode m_mode; /**< The DATARATE parameter in Table 15-4.
547 It is the value that will be passed
548 to PMD_RATE.request */
549 uint8_t m_txPowerLevel; /**< The TXPWR_LEVEL parameter in Table 15-4.
550 It is the value that will be passed
551 to PMD_TXPWRLVL.request */
552 WifiPreamble m_preamble; /**< preamble */
553 MHz_u m_channelWidth; /**< channel width */
554 Time m_guardInterval; /**< guard interval duration */
555 uint8_t m_nTx; /**< number of TX antennas */
556 uint8_t m_nss; /**< number of spatial streams */
557 uint8_t m_ness; /**< number of spatial streams in beamforming */
558 bool m_aggregation; /**< Flag whether the PSDU contains A-MPDU. */
559 bool m_stbc; /**< STBC used or not */
560 bool m_ldpc; /**< LDPC FEC coding if true, BCC otherwise*/
561 uint8_t m_bssColor; /**< BSS color */
562 uint16_t m_length; /**< LENGTH field of the L-SIG */
563 bool m_triggerResponding; /**< The Trigger Responding parameter */
564
565 bool m_modeInitialized; /**< Internal initialization flag */
566
567 // MU information
568 HeMuUserInfoMap m_muUserInfos; /**< HE MU specific per-user information
569 indexed by station ID (STA-ID) corresponding
570 to the 11 LSBs of the AID of the recipient STA
571 This list shall be used only for HE MU */
572 std::vector<bool>
573 m_inactiveSubchannels; /**< Bitmap of inactive subchannels used for preamble puncturing */
574
575 WifiMode m_sigBMcs; /**< MCS_SIG_B per Table 27-1 IEEE 802.11ax-2021 */
576
577 mutable RuAllocation m_ruAllocation; /**< RU allocations that are going to be carried
578 in SIG-B common field per Table 27-1 IEEE */
579
580 mutable std::optional<Center26ToneRuIndication>
581 m_center26ToneRuIndication; /**< CENTER_26_TONE_RU field when format is HE_MU and
582 when channel width is set to 80 MHz or larger (Table 27-1
583 802.11ax-2021)*/
584
585 uint8_t m_ehtPpduType; /**< EHT_PPDU_TYPE per Table 36-1 IEEE 802.11be D2.3 */
586};
587
588/**
589 * Serialize WifiTxVector to the given ostream.
590 *
591 * @param os the output stream
592 * @param v the WifiTxVector to stringify
593 *
594 * @return output stream
595 */
596std::ostream& operator<<(std::ostream& os, const WifiTxVector& v);
597
598} // namespace ns3
599
600#endif /* WIFI_TX_VECTOR_H */
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
represent a single transmission mode
Definition wifi-mode.h:40
std::variant< HeRu::RuSpec, EhtRu::RuSpec > RuSpec
variant of the RU specification
Definition wifi-ru.h:27
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.
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
void SetRu(WifiRu::RuSpec ru, uint16_t staId)
Set the RU specification for the 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.
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.
std::map< WifiRu::RuSpec, std::set< uint16_t >, WifiRu::RuSpecCompare > UserInfoMapOrderedByRus
map of specific user info parameters ordered per increasing frequency RUs
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.
uint8_t GetNumStasInRu(const WifiRu::RuSpec &ru) const
Get the number of STAs in a given RU.
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
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.
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
WifiRu::RuSpec GetRu(uint16_t staId) const
Get the RU specification for the STA-ID.
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)
static constexpr uint16_t SU_STA_ID
STA_ID to identify a single user (SU)
Definition wifi-mode.h:24
std::vector< uint16_t > RuAllocation
9 bits RU_ALLOCATION per 20 MHz
HE MU specific user transmission parameters.
uint8_t mcs
MCS index.
uint8_t nss
number of spatial streams
WifiRu::RuSpec ru
RU specification.
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 wifi-ru.h:33
Declaration of the following enums: