Struct containing all supported rates. More...
#include "supported-rates.h"
Public Member Functions | |
void | AddBssMembershipSelectorRate (uint64_t bs) |
Add a special value to the supported rate set, corresponding to a BSS membership selector. | |
void | AddSupportedRate (uint64_t bs) |
Add the given rate to the supported rates. | |
uint8_t | GetNRates () const |
Return the number of supported rates. | |
bool | IsBasicRate (uint64_t bs) const |
Check if the given rate is a basic rate. | |
bool | IsBssMembershipSelectorRate (uint64_t bs) const |
Check if the given rate is a BSS membership selector value. | |
bool | IsSupportedRate (uint64_t bs) const |
Check if the given rate is supported. | |
void | SetBasicRate (uint64_t bs) |
Set the given rate to basic rates. | |
Public Attributes | |
std::optional< ExtendedSupportedRatesIE > | extendedRates |
supported extended rates | |
SupportedRates | rates |
supported rates | |
Struct containing all supported rates.
Definition at line 76 of file supported-rates.h.
void ns3::AllSupportedRates::AddBssMembershipSelectorRate | ( | uint64_t | bs | ) |
Add a special value to the supported rate set, corresponding to a BSS membership selector.
bs | the special membership selector value (not a valid rate) |
Definition at line 109 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().
void ns3::AllSupportedRates::AddSupportedRate | ( | uint64_t | bs | ) |
Add the given rate to the supported rates.
bs | the rate to be added in bps |
Definition at line 61 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::ApWifiMac::GetSupportedRates(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), ns3::StaWifiMac::GetSupportedRates(), and SetBasicRate().
uint8_t ns3::AllSupportedRates::GetNRates | ( | ) | const |
Return the number of supported rates.
Definition at line 184 of file supported-rates.cc.
References extendedRates, ns3::SupportedRates::m_rates, and rates.
Referenced by AddSupportedRate(), and SetBasicRate().
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).
bs | the rate to be checked in bps |
Definition at line 50 of file supported-rates.cc.
References extendedRates, ns3::SupportedRates::m_rates, NS_LOG_FUNCTION, and rates.
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).
bs | the rate to be checked in bps |
Definition at line 174 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().
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).
bs | the rate to be checked in bps |
Definition at line 149 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().
void ns3::AllSupportedRates::SetBasicRate | ( | uint64_t | bs | ) |
Set the given rate to basic rates.
bs | the rate to be set in bps |
Definition at line 85 of file supported-rates.cc.
References AddSupportedRate(), extendedRates, GetNRates(), IsBssMembershipSelectorRate(), ns3::SupportedRates::m_rates, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, rates, and SetBasicRate().
Referenced by ns3::ApWifiMac::GetSupportedRates(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), and SetBasicRate().
std::optional<ExtendedSupportedRatesIE> ns3::AllSupportedRates::extendedRates |
supported extended rates
Definition at line 135 of file supported-rates.h.
Referenced by ns3::MeshWifiBeacon::MeshWifiBeacon(), AddBssMembershipSelectorRate(), AddSupportedRate(), BasicMultiLinkElementTest::DoRun(), WifiMgtHeaderTest::DoRun(), GetNRates(), IsBasicRate(), IsSupportedRate(), and SetBasicRate().
SupportedRates ns3::AllSupportedRates::rates |
supported rates
Definition at line 134 of file supported-rates.h.
Referenced by ns3::MeshWifiBeacon::MeshWifiBeacon(), AddBssMembershipSelectorRate(), AddSupportedRate(), BasicMultiLinkElementTest::DoRun(), WifiMgtHeaderTest::DoRun(), GetNRates(), IsBasicRate(), IsSupportedRate(), and SetBasicRate().