A Discrete-Event Network Simulator
API
eht-capabilities.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 DERONNE SOFTWARE ENGINEERING
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  * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
18  */
19 
20 #ifndef EHT_CAPABILITIES_H
21 #define EHT_CAPABILITIES_H
22 
23 #include "ns3/he-capabilities.h"
24 #include "ns3/wifi-information-element.h"
25 
26 #include <map>
27 #include <optional>
28 #include <vector>
29 
30 namespace ns3
31 {
32 
33 class HeCapabilities;
34 
40 {
42  uint8_t ehtOmControlSupport : 1;
45  uint8_t restrictedTwtSupport : 1;
47  uint8_t maxMpduLength : 2;
49 
55  uint16_t GetSize() const;
62  void Serialize(Buffer::Iterator& start) const;
70 };
71 
77 {
78  uint8_t support320MhzIn6Ghz : 1;
83  uint8_t suBeamformer : 1;
84  uint8_t suBeamformee : 1;
86  uint8_t beamformeeSs160Mhz : 3;
87  uint8_t beamformeeSs320Mhz : 3;
91  uint8_t ng16SuFeedback : 1;
92  uint8_t ng16MuFeedback : 1;
93  uint8_t codebooksizeSuFeedback : 1;
94  uint8_t codebooksizeMuFeedback : 1;
98  uint8_t triggeredCqiFeedback : 1;
103  uint8_t maxNc : 4;
109  uint8_t ppeThresholdsPresent : 1;
112  uint8_t supportMcs15 : 4;
113  uint8_t supportEhtDupIn6GHz : 1;
114  uint8_t
121  uint8_t muBeamformer160Mhz : 1;
122  uint8_t muBeamformer320Mhz : 1;
124  uint8_t
126  uint8_t
128 
134  uint16_t GetSize() const;
141  void Serialize(Buffer::Iterator& start) const;
149 };
150 
156 {
161  enum EhtMcsMapType : uint8_t
162  {
168  };
169 
170  std::map<EhtMcsMapType, std::vector<uint8_t>>
172 
178  uint16_t GetSize() const;
185  void Serialize(Buffer::Iterator& start) const;
197  bool is2_4Ghz,
198  uint8_t heSupportedChannelWidthSet,
199  bool support320MhzIn6Ghz);
200 };
201 
207 {
212  {
213  uint8_t ppetMax : 3;
214  uint8_t ppet8 : 3;
215  };
216 
217  uint8_t nssPe : 4;
218  uint8_t ruIndexBitmask : 5;
219  std::vector<EhtPpeThresholdsInfo> ppeThresholdsInfo;
220 
226  uint16_t GetSize() const;
232  void Serialize(Buffer::Iterator& start) const;
240 };
241 
248 {
249  public:
253  EhtCapabilities();
260  EhtCapabilities(bool is2_4Ghz, const std::optional<HeCapabilities>& heCapabilities);
261  // Implementations of pure virtual methods, or overridden from base class.
262  WifiInformationElementId ElementId() const override;
263  WifiInformationElementId ElementIdExt() const override;
264  void Print(std::ostream& os) const override;
265 
271  void SetMaxMpduLength(uint16_t length);
272 
278  void SetMaxAmpduLength(uint32_t maxAmpduLength);
279 
285  uint32_t GetMaxAmpduLength() const;
286 
292  uint16_t GetMaxMpduLength() const;
293 
302  uint8_t upperMcs,
303  uint8_t maxNss);
312  uint8_t upperMcs,
313  uint8_t maxNss);
314 
329 
337  void SetPpeThresholds(uint8_t nssPe,
338  uint8_t ruIndexBitmask,
339  const std::vector<std::pair<uint8_t, uint8_t>>& ppeThresholds);
340 
345 
346  private:
347  uint16_t GetInformationFieldSize() const override;
348  void SerializeInformationField(Buffer::Iterator start) const override;
349  uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
350 
351  bool m_is2_4Ghz;
353  std::optional<HeCapabilities>
355 };
356 
357 } // namespace ns3
358 
359 #endif /* EHT_CAPABILITIES_H */
iterator in a Buffer instance
Definition: buffer.h:100
The IEEE 802.11be EHT Capabilities.
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
void SetMaxMpduLength(uint16_t length)
Set the maximum MPDU length.
void SetSupportedTxEhtMcsAndNss(EhtMcsAndNssSet::EhtMcsMapType mapType, uint8_t upperMcs, uint8_t maxNss)
Set a subfield of the Supported EHT-MCS And NSS Set.
void SetPpeThresholds(uint8_t nssPe, uint8_t ruIndexBitmask, const std::vector< std::pair< uint8_t, uint8_t >> &ppeThresholds)
Set the EHT PPE threshold info subfield.
bool m_is2_4Ghz
flag indicating whether PHY is operating in 2.4 GHz based on other IEs contained in the same manageme...
WifiInformationElementId ElementIdExt() const override
Get the wifi information element ID extension.
EhtCapabilities()
Constructor.
void Print(std::ostream &os) const override
Generate human-readable form of IE.
EhtMcsAndNssSet m_supportedEhtMcsAndNssSet
Supported EHT-MCS And NSS Set subfield.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
EhtPpeThresholds m_ppeThresholds
EHT PPE Threshold Info subfield.
EhtPhyCapabilities m_phyCapabilities
EHT PHY Capabilities Info subfield.
uint8_t GetHighestSupportedTxMcs(EhtMcsAndNssSet::EhtMcsMapType mapType)
Get the highest supported TX MCS for a given EHT-MCS map type.
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint32_t GetMaxAmpduLength() const
Return the maximum A-MPDU length.
EhtMacCapabilities m_macCapabilities
EHT MAC Capabilities Info subfield.
uint16_t GetMaxMpduLength() const
Get the maximum MPDU length.
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum A-MPDU length.
void SetSupportedRxEhtMcsAndNss(EhtMcsAndNssSet::EhtMcsMapType mapType, uint8_t upperMcs, uint8_t maxNss)
Set a subfield of the Supported EHT-MCS And NSS Set.
uint8_t GetHighestSupportedRxMcs(EhtMcsAndNssSet::EhtMcsMapType mapType)
Get the highest supported RX MCS for a given EHT-MCS map type.
std::optional< HeCapabilities > m_heCapabilities
HE capabilities contained in the same management frame if present.
Information element, as defined in 802.11-2007 standard.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
EHT MAC Capabilities Info subfield.
uint16_t GetSize() const
Get the size of the serialized EHT MAC capabilities subfield.
uint8_t maxMpduLength
Maximum MPDU Length.
uint8_t epcsPriorityAccessSupported
EPCS Priority Access Supported.
uint8_t triggeredTxopSharingMode1Support
Triggered TXOP Sharing Mode 1 Support.
uint8_t restrictedTwtSupport
Restricted TWT Support.
uint8_t ehtOmControlSupport
EHT OM Control Support.
void Serialize(Buffer::Iterator &start) const
Serialize the EHT MAC capabilities subfield.
uint16_t Deserialize(Buffer::Iterator start)
Deserialize the EHT MAC capabilities subfield.
uint8_t scsTrafficDescriptionSupport
SCS Traffic Description Support.
uint8_t maxAmpduLengthExponentExtension
Maximum A-MPDU length exponent extension.
uint8_t triggeredTxopSharingMode2Support
Triggered TXOP Sharing Mode 2 Support.
EHT MCS and NSS Set subfield.
uint16_t Deserialize(Buffer::Iterator start, bool is2_4Ghz, uint8_t heSupportedChannelWidthSet, bool support320MhzIn6Ghz)
Deserialize the Supported EHT-MCS And NSS Set subfield.
uint16_t GetSize() const
Get the size of the serialized Supported EHT-MCS And NSS Set subfield.
void Serialize(Buffer::Iterator &start) const
Serialize the Supported EHT-MCS And NSS Set subfield.
std::map< EhtMcsMapType, std::vector< uint8_t > > supportedEhtMcsAndNssSet
Supported EHT-MCS And NSS Set.
EhtMcsMapType
The different EHT-MCS map types as defined in 9.4.2.313.4 Supported EHT-MCS And NSS Set field.
EHT PHY Capabilities Info subfield.
uint8_t support242ToneRuInBwLargerThan20Mhz
Support For 242-tone RU In BW Wider Than 20 MHz.
uint8_t triggeredSuBeamformingFeedback
Triggered SU Beamforming Feedback.
uint8_t ndpWith4TimesEhtLtfAnd32usGi
NDP With 4x EHT-LTF And 3.2 μs GI.
uint8_t ppeThresholdsPresent
PPE Thresholds Present.
uint8_t muBeamformer320Mhz
MU Beamformer (BW = 320 MHz)
uint8_t nSoundingDimensions160Mhz
Beamformee SS (= 160 MHz)
uint8_t rx1024QamInWiderBwDlOfdmaSupport
Rx 1024-QAM In Wider Bandwidth DL OFDMA Support.
uint8_t supportMcs15
Support Of MCS 15.
uint8_t beamformeeSsBwNotLargerThan80Mhz
Beamformee SS (≤ 80 MHz)
uint8_t partialBandwidthDlMuMimo
Partial Bandwidth DL MU-MIMO.
uint8_t nonOfdmaUlMuMimo320Mhz
Non-OFDMA UL MU-MIMO (BW = 320 MHz)
uint8_t muBeamformerBwNotLargerThan80Mhz
MU Beamformer (BW ≤ 80 MHz)
uint8_t triggeredCqiFeedback
Triggered CQI Feedback.
uint8_t nonOfdmaUlMuMimoBwNotLargerThan80Mhz
Non-OFDMA UL MU-MIMO (BW ≤ 80 MHz)
uint16_t GetSize() const
Get the size of the serialized EHT PHY capabilities subfield.
uint8_t nSoundingDimensions320Mhz
Beamformee SS (= 320 MHz)
uint8_t beamformeeSs320Mhz
Beamformee SS (= 320 MHz)
uint8_t partialBandwidthUlMuMimo
Partial Bandwidth UL MU-MIMO.
uint8_t psrBasedSpatialReuseSupport
EHT PSR-Based SR Support.
uint8_t nonOfdmaUlMuMimo160Mhz
Non-OFDMA UL MU-MIMO (BW = 160 MHz)
uint8_t suBeamformee
SU Beamformee.
uint8_t rx4096QamInWiderBwDlOfdmaSupport
Rx 4096-QAM In Wider Bandwidth DL OFDMA Support.
uint8_t tbSoundingFeedbackRateLimit
TB Sounding Feedback Rate Limit.
uint8_t muPpdu4xEhtLtfAnd800nsGi
EHT MU PPDU With 4x EHT-LTF And 0.8 μs GI.
uint8_t muBeamformer160Mhz
MU Beamformer (BW = 160 MHz)
uint8_t support320MhzIn6Ghz
Support For 320 MHz In 6 GHz.
uint8_t support20MhzOperatingStaReceivingNdpWithWiderBw
Support For 20 MHz Operating STA Receiving NDP With Wider Bandwidth.
uint8_t beamformeeSs160Mhz
Beamformee SS (= 160 MHz)
uint8_t codebooksizeSuFeedback
Support for a codebook size for SU feedback.
uint8_t triggeredMuBeamformingPartialBwFeedback
Triggered MU Beamforming Partial BW Feedback.
uint8_t nonTriggeredCqiFeedback
Non-Triggered CQI Feedback.
uint8_t powerBoostFactorSupport
Power Boost Factor Support.
uint16_t Deserialize(Buffer::Iterator start)
Deserialize the EHT PHY capabilities subfield.
uint8_t supportEhtDupIn6GHz
Support Of EHT DUP (MCS 14) In 6 GHz.
uint8_t ng16MuFeedback
Support for subcarrier grouping of 16 for MU feedback.
uint8_t ng16SuFeedback
Support for subcarrier grouping of 16 for SU feedback.
uint8_t commonNominalPacketPadding
Common Nominal Packet Padding.
uint8_t codebooksizeMuFeedback
Support for a codebook size for MU feedback.
void Serialize(Buffer::Iterator &start) const
Serialize the EHT PHY capabilities subfield.
uint8_t supportTx1024And4096QamForRuSmallerThan242Tones
Tx 1024-QAM And 4096-QAM < 242-tone RU Support.
uint8_t suBeamformer
SU Beamformer.
uint8_t nSoundingDimensionsBwNotLargerThan80Mhz
Beamformee SS (≤ 80 MHz)
uint8_t supportRx1024And4096QamForRuSmallerThan242Tones
Rx 1024-QAM And 4096-QAM < 242-tone RU Support.
uint8_t maxNumSupportedEhtLtfs
Maximum Number Of Supported EHT-LTFs.
EHT PPE Thresholds subfield.
uint16_t Deserialize(Buffer::Iterator start)
Deserialize the EHT PPE Thresholds subfield.
std::vector< EhtPpeThresholdsInfo > ppeThresholdsInfo
PPE Thresholds Info.
void Serialize(Buffer::Iterator &start) const
Serialize the EHT PPE Thresholds subfield.
uint8_t ruIndexBitmask
RU Index Bitmask.
uint16_t GetSize() const
Get the size of the serialized EHT PPE Thresholds subfield.