20#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
21#define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126
22#define BSS_MEMBERSHIP_SELECTOR_HE_PHY 122
23#define BSS_MEMBERSHIP_SELECTOR_EHT_PHY 121
34 for (std::size_t i = 0; i <
m_rates.size(); i++)
40 os <<
GetRate(i) / 1000000 <<
"mbs";
53 uint8_t rate =
static_cast<uint8_t
>(bs / 500000) | 0x80;
71 rates.
m_rates.emplace_back(
static_cast<uint8_t
>(bs / 500000));
79 extendedRates->m_rates.emplace_back(
static_cast<uint8_t
>(bs / 500000));
89 auto rate =
static_cast<uint8_t
>(bs / 500000);
93 if ((rate | 0x80) == currRate)
114 "Value " << bs <<
" not a BSS Membership Selector");
115 auto rate =
static_cast<uint8_t
>(bs / 500000);
125 for (std::size_t i = 0; i <
extendedRates->m_rates.size(); i++)
145 NS_LOG_DEBUG(
"add BSS membership selector rate " << bs <<
" as rate " << +rate);
152 auto rate =
static_cast<uint8_t
>(bs / 500000);
162 for (std::size_t i = 0; i <
extendedRates->m_rates.size(); i++)
192 return (
m_rates[i] & 0x7f) * 500000;
210 for (
const uint8_t rate :
m_rates)
220 for (uint16_t i = 0; i < length; i++)
222 m_rates.push_back(start.ReadU8());
iterator in a Buffer instance
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
void Print(std::ostream &os) const override
Generate human-readable form of IE.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
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)
std::vector< uint8_t > m_rates
List of supported bit rates (divided by 500000)
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint32_t GetRate(uint8_t i) const
Return the rate (converted back to raw value) at the given index.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
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.
SupportedRates rates
supported rates
void SetBasicRate(uint64_t bs)
Set the given rate to basic rates.
bool IsBssMembershipSelectorRate(uint64_t bs) const
Check if the given rate is a BSS membership selector value.
std::optional< ExtendedSupportedRatesIE > extendedRates
supported extended rates
void AddBssMembershipSelectorRate(uint64_t bs)
Add a special value to the supported rate set, corresponding to a BSS membership selector.
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.
void AddSupportedRate(uint64_t bs)
Add the given rate to the supported rates.
bool IsSupportedRate(uint64_t bs) const
Check if the given rate is supported.
#define BSS_MEMBERSHIP_SELECTOR_HT_PHY
#define BSS_MEMBERSHIP_SELECTOR_HE_PHY
#define BSS_MEMBERSHIP_SELECTOR_VHT_PHY
#define BSS_MEMBERSHIP_SELECTOR_EHT_PHY