A Discrete-Event Network Simulator
API
ns3::EhtCapabilities Class Reference

The IEEE 802.11be EHT Capabilities. More...

#include "eht-capabilities.h"

+ Inheritance diagram for ns3::EhtCapabilities:
+ Collaboration diagram for ns3::EhtCapabilities:

Public Member Functions

 EhtCapabilities ()
 Constructor. More...
 
 EhtCapabilities (bool is2_4Ghz, const std::optional< HeCapabilities > &heCapabilities)
 Constructor. More...
 
WifiInformationElementId ElementId () const override
 Get the wifi information element ID. More...
 
WifiInformationElementId ElementIdExt () const override
 Get the wifi information element ID extension. More...
 
uint8_t GetHighestSupportedRxMcs (EhtMcsAndNssSet::EhtMcsMapType mapType)
 Get the highest supported RX MCS for a given EHT-MCS map type. More...
 
uint8_t GetHighestSupportedTxMcs (EhtMcsAndNssSet::EhtMcsMapType mapType)
 Get the highest supported TX MCS for a given EHT-MCS map type. More...
 
uint32_t GetMaxAmpduLength () const
 Return the maximum A-MPDU length. More...
 
uint16_t GetMaxMpduLength () const
 Get the maximum MPDU length. More...
 
void Print (std::ostream &os) const override
 Generate human-readable form of IE. More...
 
void SetMaxAmpduLength (uint32_t maxAmpduLength)
 Set the maximum A-MPDU length. More...
 
void SetMaxMpduLength (uint16_t length)
 Set the maximum MPDU length. More...
 
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. More...
 
void SetSupportedRxEhtMcsAndNss (EhtMcsAndNssSet::EhtMcsMapType mapType, uint8_t upperMcs, uint8_t maxNss)
 Set a subfield of the Supported EHT-MCS And NSS Set. More...
 
void SetSupportedTxEhtMcsAndNss (EhtMcsAndNssSet::EhtMcsMapType mapType, uint8_t upperMcs, uint8_t maxNss)
 Set a subfield of the Supported EHT-MCS And NSS Set. More...
 
- Public Member Functions inherited from ns3::WifiInformationElement
virtual ~WifiInformationElement ()
 
Buffer::Iterator Deserialize (Buffer::Iterator i)
 Deserialize entire IE (which may possibly be fragmented into multiple elements), which must be present. More...
 
Buffer::Iterator DeserializeIfPresent (Buffer::Iterator i)
 Deserialize entire IE (which may possibly be fragmented into multiple elements) if it is present. More...
 
uint16_t GetSerializedSize () const
 Get the size of the serialized IE including Element ID and length fields (for every element this IE is possibly fragmented into). More...
 
virtual bool operator== (const WifiInformationElement &a) const
 Compare two IEs for equality by ID & Length, and then through memcmp of serialised version. More...
 
Buffer::Iterator Serialize (Buffer::Iterator i) const
 Serialize entire IE including Element ID and length fields. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< WifiInformationElement >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () const
 Decrement the reference count. More...
 

Public Attributes

EhtMacCapabilities m_macCapabilities
 EHT MAC Capabilities Info subfield. More...
 
EhtPhyCapabilities m_phyCapabilities
 EHT PHY Capabilities Info subfield. More...
 
EhtPpeThresholds m_ppeThresholds
 EHT PPE Threshold Info subfield. More...
 
EhtMcsAndNssSet m_supportedEhtMcsAndNssSet
 Supported EHT-MCS And NSS Set subfield. More...
 

Private Member Functions

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) More...
 
uint16_t GetInformationFieldSize () const override
 Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets. More...
 
void SerializeInformationField (Buffer::Iterator start) const override
 Serialize information (i.e., the body of the IE, not including the Element ID and length octets) More...
 

Private Attributes

std::optional< HeCapabilitiesm_heCapabilities
 HE capabilities contained in the same management frame if present. More...
 
bool m_is2_4Ghz
 flag indicating whether PHY is operating in 2.4 GHz based on other IEs contained in the same management frame More...
 

Detailed Description

The IEEE 802.11be EHT Capabilities.

Definition at line 247 of file eht-capabilities.h.

Constructor & Destructor Documentation

◆ EhtCapabilities() [1/2]

ns3::EhtCapabilities::EhtCapabilities ( )

Constructor.

Definition at line 394 of file eht-capabilities.cc.

◆ EhtCapabilities() [2/2]

ns3::EhtCapabilities::EhtCapabilities ( bool  is2_4Ghz,
const std::optional< HeCapabilities > &  heCapabilities 
)

Constructor.

Parameters
is2_4Ghzindicating whether PHY is operating in 2.4 GHz based on previously serialized IEs
heCapabilitiesthe optional HE capabilities contained in the same management frame

Definition at line 404 of file eht-capabilities.cc.

Member Function Documentation

◆ DeserializeInformationField()

uint16_t ns3::EhtCapabilities::DeserializeInformationField ( Buffer::Iterator  start,
uint16_t  length 
)
overrideprivatevirtual

Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)

Parameters
startan iterator which points to where the information should be written.
lengththe expected number of bytes to read
Returns
the number of bytes read

Implements ns3::WifiInformationElement.

Definition at line 706 of file eht-capabilities.cc.

References ns3::EhtMacCapabilities::Deserialize(), ns3::EhtPhyCapabilities::Deserialize(), ns3::EhtPpeThresholds::Deserialize(), ns3::EhtMcsAndNssSet::Deserialize(), m_heCapabilities, m_is2_4Ghz, m_macCapabilities, m_phyCapabilities, m_ppeThresholds, m_supportedEhtMcsAndNssSet, ns3::Buffer::Iterator::Next(), NS_ASSERT, ns3::EhtPhyCapabilities::ppeThresholdsPresent, two-ray-to-three-gpp-ch-calibration::start, and ns3::EhtPhyCapabilities::support320MhzIn6Ghz.

+ Here is the call graph for this function:

◆ ElementId()

WifiInformationElementId ns3::EhtCapabilities::ElementId ( ) const
overridevirtual

Get the wifi information element ID.

Returns
the wifi information element ID

Implements ns3::WifiInformationElement.

Definition at line 415 of file eht-capabilities.cc.

References IE_EXTENSION.

◆ ElementIdExt()

WifiInformationElementId ns3::EhtCapabilities::ElementIdExt ( ) const
overridevirtual

Get the wifi information element ID extension.

Returns
the wifi information element ID extension

Reimplemented from ns3::WifiInformationElement.

Definition at line 421 of file eht-capabilities.cc.

References IE_EXT_EHT_CAPABILITIES.

◆ GetHighestSupportedRxMcs()

uint8_t ns3::EhtCapabilities::GetHighestSupportedRxMcs ( EhtMcsAndNssSet::EhtMcsMapType  mapType)

Get the highest supported RX MCS for a given EHT-MCS map type.

Parameters
mapTypethe EHT-MCS map type
Returns
the highest supported RX MCS for the given EHT-MCS map type

Definition at line 608 of file eht-capabilities.cc.

References ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_20_MHZ_ONLY, m_supportedEhtMcsAndNssSet, NS_ASSERT, NS_ASSERT_MSG, and ns3::EhtMcsAndNssSet::supportedEhtMcsAndNssSet.

Referenced by ns3::WifiRemoteStationManager::AddStationEhtCapabilities(), and WifiEhtCapabilitiesIeTest::DoRun().

+ Here is the caller graph for this function:

◆ GetHighestSupportedTxMcs()

uint8_t ns3::EhtCapabilities::GetHighestSupportedTxMcs ( EhtMcsAndNssSet::EhtMcsMapType  mapType)

Get the highest supported TX MCS for a given EHT-MCS map type.

Parameters
mapTypethe EHT-MCS map type
Returns
the highest supported TX MCS for the given EHT-MCS map type

Definition at line 643 of file eht-capabilities.cc.

References ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_20_MHZ_ONLY, m_supportedEhtMcsAndNssSet, NS_ASSERT, NS_ASSERT_MSG, and ns3::EhtMcsAndNssSet::supportedEhtMcsAndNssSet.

Referenced by WifiEhtCapabilitiesIeTest::DoRun().

+ Here is the caller graph for this function:

◆ GetInformationFieldSize()

uint16_t ns3::EhtCapabilities::GetInformationFieldSize ( ) const
overrideprivatevirtual

Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets.

This is the value that will appear in the second octet of the entire IE - the length field - if the IE is not fragmented)

Returns
the length of serialized information

Implements ns3::WifiInformationElement.

Definition at line 433 of file eht-capabilities.cc.

References ns3::EhtMacCapabilities::GetSize(), ns3::EhtPhyCapabilities::GetSize(), ns3::EhtMcsAndNssSet::GetSize(), ns3::EhtPpeThresholds::GetSize(), m_macCapabilities, m_phyCapabilities, m_ppeThresholds, m_supportedEhtMcsAndNssSet, and ns3::EhtPhyCapabilities::ppeThresholdsPresent.

+ Here is the call graph for this function:

◆ GetMaxAmpduLength()

uint32_t ns3::EhtCapabilities::GetMaxAmpduLength ( ) const

Return the maximum A-MPDU length.

Returns
the maximum A-MPDU length

Definition at line 496 of file eht-capabilities.cc.

References m_macCapabilities, and ns3::EhtMacCapabilities::maxAmpduLengthExponentExtension.

◆ GetMaxMpduLength()

uint16_t ns3::EhtCapabilities::GetMaxMpduLength ( ) const

Get the maximum MPDU length.

Returns
the maximum MPDU length in bytes

Definition at line 465 of file eht-capabilities.cc.

References m_macCapabilities, ns3::EhtMacCapabilities::maxMpduLength, and NS_ABORT_MSG.

◆ Print()

void ns3::EhtCapabilities::Print ( std::ostream &  os) const
overridevirtual

Generate human-readable form of IE.

Parameters
osoutput stream

Reimplemented from ns3::WifiInformationElement.

Definition at line 427 of file eht-capabilities.cc.

◆ SerializeInformationField()

void ns3::EhtCapabilities::SerializeInformationField ( Buffer::Iterator  start) const
overrideprivatevirtual

Serialize information (i.e., the body of the IE, not including the Element ID and length octets)

Parameters
startan iterator which points to where the information should be written.

Implements ns3::WifiInformationElement.

Definition at line 694 of file eht-capabilities.cc.

References m_macCapabilities, m_phyCapabilities, m_ppeThresholds, m_supportedEhtMcsAndNssSet, ns3::EhtPhyCapabilities::ppeThresholdsPresent, ns3::EhtMacCapabilities::Serialize(), ns3::EhtPhyCapabilities::Serialize(), ns3::EhtMcsAndNssSet::Serialize(), ns3::EhtPpeThresholds::Serialize(), and two-ray-to-three-gpp-ch-calibration::start.

+ Here is the call graph for this function:

◆ SetMaxAmpduLength()

void ns3::EhtCapabilities::SetMaxAmpduLength ( uint32_t  maxAmpduLength)

Set the maximum A-MPDU length.

Parameters
maxAmpduLength2^(23 + x) - 1, x in the range 0 to 1

Definition at line 482 of file eht-capabilities.cc.

References m_macCapabilities, ns3::EhtMacCapabilities::maxAmpduLengthExponentExtension, and NS_ABORT_MSG.

Referenced by AmpduAggregationTest::DoSetup(), WifiEhtCapabilitiesIeTest::GetEhtCapabilities(), and ns3::WifiMac::GetEhtCapabilities().

+ Here is the caller graph for this function:

◆ SetMaxMpduLength()

void ns3::EhtCapabilities::SetMaxMpduLength ( uint16_t  length)

Set the maximum MPDU length.

Parameters
lengththe maximum MPDU length (3895, 7991 or 11454)

Definition at line 446 of file eht-capabilities.cc.

References m_macCapabilities, ns3::EhtMacCapabilities::maxMpduLength, and NS_ABORT_MSG.

Referenced by AmpduAggregationTest::DoSetup(), WifiEhtCapabilitiesIeTest::GetEhtCapabilities(), and ns3::WifiMac::GetEhtCapabilities().

+ Here is the caller graph for this function:

◆ SetPpeThresholds()

void ns3::EhtCapabilities::SetPpeThresholds ( uint8_t  nssPe,
uint8_t  ruIndexBitmask,
const std::vector< std::pair< uint8_t, uint8_t >> &  ppeThresholds 
)

Set the EHT PPE threshold info subfield.

Parameters
nssPethe NSS_PE subfield
ruIndexBitmaskthe RU Index Bitmask subfield
ppeThresholdsthe PPE thresholds made of pairs (PPETmax, PPET8)

Definition at line 678 of file eht-capabilities.cc.

References m_phyCapabilities, m_ppeThresholds, NS_ASSERT, ns3::EhtPpeThresholds::nssPe, ns3::EhtPpeThresholds::ppeThresholdsInfo, ns3::EhtPhyCapabilities::ppeThresholdsPresent, and ns3::EhtPpeThresholds::ruIndexBitmask.

Referenced by WifiEhtCapabilitiesIeTest::DoRun().

+ Here is the caller graph for this function:

◆ SetSupportedRxEhtMcsAndNss()

void ns3::EhtCapabilities::SetSupportedRxEhtMcsAndNss ( EhtMcsAndNssSet::EhtMcsMapType  mapType,
uint8_t  upperMcs,
uint8_t  maxNss 
)

Set a subfield of the Supported EHT-MCS And NSS Set.

Parameters
mapTypethe type of the subfield
upperMcsthe upper MCS of the range
maxNssthe maximum NSS supported for reception in the MCS range

Definition at line 503 of file eht-capabilities.cc.

References ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_160_MHZ, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_20_MHZ_ONLY, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_320_MHZ, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_NOT_LARGER_THAN_80_MHZ, m_supportedEhtMcsAndNssSet, NS_ASSERT, NS_ASSERT_MSG, and ns3::EhtMcsAndNssSet::supportedEhtMcsAndNssSet.

Referenced by BasicMultiLinkElementTest::DoRun(), WifiEhtCapabilitiesIeTest::GetEhtCapabilities(), and ns3::WifiMac::GetEhtCapabilities().

+ Here is the caller graph for this function:

◆ SetSupportedTxEhtMcsAndNss()

void ns3::EhtCapabilities::SetSupportedTxEhtMcsAndNss ( EhtMcsAndNssSet::EhtMcsMapType  mapType,
uint8_t  upperMcs,
uint8_t  maxNss 
)

Set a subfield of the Supported EHT-MCS And NSS Set.

Parameters
mapTypethe type of the subfield
upperMcsthe upper MCS of the range
maxNssthe maximum NSS supported for transmission in the MCS range

Definition at line 555 of file eht-capabilities.cc.

References ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_160_MHZ, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_20_MHZ_ONLY, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_320_MHZ, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_NOT_LARGER_THAN_80_MHZ, m_supportedEhtMcsAndNssSet, NS_ASSERT, NS_ASSERT_MSG, and ns3::EhtMcsAndNssSet::supportedEhtMcsAndNssSet.

Referenced by BasicMultiLinkElementTest::DoRun(), WifiEhtCapabilitiesIeTest::GetEhtCapabilities(), and ns3::WifiMac::GetEhtCapabilities().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_heCapabilities

std::optional<HeCapabilities> ns3::EhtCapabilities::m_heCapabilities
private

HE capabilities contained in the same management frame if present.

Definition at line 354 of file eht-capabilities.h.

Referenced by DeserializeInformationField().

◆ m_is2_4Ghz

bool ns3::EhtCapabilities::m_is2_4Ghz
private

flag indicating whether PHY is operating in 2.4 GHz based on other IEs contained in the same management frame

Definition at line 351 of file eht-capabilities.h.

Referenced by DeserializeInformationField().

◆ m_macCapabilities

EhtMacCapabilities ns3::EhtCapabilities::m_macCapabilities

◆ m_phyCapabilities

◆ m_ppeThresholds

EhtPpeThresholds ns3::EhtCapabilities::m_ppeThresholds

EHT PPE Threshold Info subfield.

Definition at line 344 of file eht-capabilities.h.

Referenced by DeserializeInformationField(), GetInformationFieldSize(), SerializeInformationField(), and SetPpeThresholds().

◆ m_supportedEhtMcsAndNssSet

EhtMcsAndNssSet ns3::EhtCapabilities::m_supportedEhtMcsAndNssSet

The documentation for this class was generated from the following files: