A Discrete-Event Network Simulator
API
ns3::AllSupportedRates Struct Reference

Struct containing all supported rates. More...

#include "supported-rates.h"

+ Collaboration diagram for ns3::AllSupportedRates:

Public Member Functions

void AddBssMembershipSelectorRate (uint64_t bs)
 Add a special value to the supported rate set, corresponding to a BSS membership selector. More...
 
void AddSupportedRate (uint64_t bs)
 Add the given rate to the supported rates. More...
 
uint8_t GetNRates () const
 Return the number of supported rates. More...
 
bool IsBasicRate (uint64_t bs) const
 Check if the given rate is a basic rate. More...
 
bool IsBssMembershipSelectorRate (uint64_t bs) const
 Check if the given rate is a BSS membership selector value. More...
 
bool IsSupportedRate (uint64_t bs) const
 Check if the given rate is supported. More...
 
void SetBasicRate (uint64_t bs)
 Set the given rate to basic rates. More...
 

Public Attributes

std::optional< ExtendedSupportedRatesIEextendedRates
 supported extended rates More...
 
SupportedRates rates
 supported rates More...
 

Detailed Description

Struct containing all supported rates.

Definition at line 87 of file supported-rates.h.

Member Function Documentation

◆ AddBssMembershipSelectorRate()

void ns3::AllSupportedRates::AddBssMembershipSelectorRate ( uint64_t  bs)

Add a special value to the supported rate set, corresponding to a BSS membership selector.

Parameters
bsthe special membership selector value (not a valid rate)

Definition at line 120 of file supported-rates.cc.

References BSS_MEMBERSHIP_SELECTOR_EHT_PHY, BSS_MEMBERSHIP_SELECTOR_HE_PHY, BSS_MEMBERSHIP_SELECTOR_HT_PHY, BSS_MEMBERSHIP_SELECTOR_VHT_PHY, extendedRates, ns3::SupportedRates::m_rates, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and rates.

Referenced by ns3::ApWifiMac::GetSupportedRates(), and ns3::StaWifiMac::GetSupportedRates().

+ Here is the caller graph for this function:

◆ AddSupportedRate()

void ns3::AllSupportedRates::AddSupportedRate ( uint64_t  bs)

Add the given rate to the supported rates.

Parameters
bsthe rate to be added in bps

Definition at line 72 of file supported-rates.cc.

References extendedRates, GetNRates(), IsBssMembershipSelectorRate(), IsSupportedRate(), ns3::SupportedRates::m_rates, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and rates.

Referenced by BasicMultiLinkElementTest::DoRun(), WifiMgtHeaderTest::DoRun(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), ns3::ApWifiMac::GetSupportedRates(), ns3::StaWifiMac::GetSupportedRates(), and SetBasicRate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNRates()

uint8_t ns3::AllSupportedRates::GetNRates ( ) const

Return the number of supported rates.

Returns
the number of supported rates

Definition at line 195 of file supported-rates.cc.

References extendedRates, ns3::SupportedRates::m_rates, and rates.

Referenced by AddSupportedRate(), and SetBasicRate().

+ Here is the caller graph for this function:

◆ IsBasicRate()

bool ns3::AllSupportedRates::IsBasicRate ( uint64_t  bs) const

Check if the given rate is a basic rate.

The rate is encoded as it is serialized to the Supported Rates Information Element (i.e. as a multiple of 500 Kbits/sec, with MSB set to 1).

Parameters
bsthe rate to be checked in bps
Returns
true if the rate is a basic rate, false otherwise

Definition at line 61 of file supported-rates.cc.

References extendedRates, ns3::SupportedRates::m_rates, NS_LOG_FUNCTION, and rates.

◆ IsBssMembershipSelectorRate()

bool ns3::AllSupportedRates::IsBssMembershipSelectorRate ( uint64_t  bs) const

Check if the given rate is a BSS membership selector value.

The rate is encoded as it is serialized to the Supporting Rates Information Element (i.e. with the MSB set to 1).

Parameters
bsthe rate to be checked in bps
Returns
true if the rate is a BSS membership selector, false otherwise

Definition at line 185 of file supported-rates.cc.

References BSS_MEMBERSHIP_SELECTOR_EHT_PHY, BSS_MEMBERSHIP_SELECTOR_HE_PHY, BSS_MEMBERSHIP_SELECTOR_HT_PHY, BSS_MEMBERSHIP_SELECTOR_VHT_PHY, and NS_LOG_FUNCTION.

Referenced by AddSupportedRate(), and SetBasicRate().

+ Here is the caller graph for this function:

◆ IsSupportedRate()

bool ns3::AllSupportedRates::IsSupportedRate ( uint64_t  bs) const

Check if the given rate is supported.

The rate is encoded as it is serialized to the Supported Rates Information Element (i.e. as a multiple of 500 Kbits/sec, possibly with MSB set to 1).

Parameters
bsthe rate to be checked in bps
Returns
true if the rate is supported, false otherwise

Definition at line 160 of file supported-rates.cc.

References extendedRates, ns3::SupportedRates::m_rates, NS_LOG_FUNCTION, and rates.

Referenced by AddSupportedRate(), ns3::MeshWifiInterfaceMac::CheckSupportedRates(), and ns3::WifiMgtHeader< Derived, std::tuple< Elems... > >::InitForDeserialization().

+ Here is the caller graph for this function:

◆ SetBasicRate()

void ns3::AllSupportedRates::SetBasicRate ( uint64_t  bs)

Set the given rate to basic rates.

Parameters
bsthe rate to be set in bps

Definition at line 96 of file supported-rates.cc.

References AddSupportedRate(), extendedRates, GetNRates(), IsBssMembershipSelectorRate(), ns3::SupportedRates::m_rates, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and rates.

Referenced by ns3::MeshWifiInterfaceMac::GetSupportedRates(), and ns3::ApWifiMac::GetSupportedRates().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ extendedRates

◆ rates


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