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