28 #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
29 #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126
30 #define BSS_MEMBERSHIP_SELECTOR_HE_PHY 125
102 uint8_t rate = bs / 500000;
103 for (uint8_t i = 0; i <
m_nRates; i++)
105 if ((rate | 0x80) ==
m_rates[i])
111 NS_LOG_DEBUG (
"set basic rate=" << bs <<
", n rates=" << (uint32_t)m_nRates);
126 NS_ASSERT_MSG (
false,
"Value " << bs <<
" not a BSS Membership Selector");
128 uint32_t rate = (bs | 0x80);
129 for (uint8_t i = 0; i <
m_nRates; i++)
137 NS_LOG_DEBUG (
"add BSS membership selector rate " << bs <<
" as rate " << m_nRates);
145 uint8_t rate = (bs / 500000) | 0x80;
146 for (uint8_t i = 0; i <
m_nRates; i++)
160 uint8_t rate = bs / 500000;
161 for (uint8_t i = 0; i <
m_nRates; i++)
164 || (rate | 0x80) ==
m_rates[i])
194 return (
m_rates[i] & 0x7f) * 500000;
332 for (uint8_t i = 0; i < rates.
GetNRates (); i++)
334 uint32_t rate = rates.
GetRate (i);
339 os << rate / 1000000 <<
"mbs";
uint32_t GetRate(uint8_t i) const
Return the rate at the given index.
void AddSupportedRate(uint32_t bs)
Add the given rate to the supported rates.
SupportedRates & operator=(const SupportedRates &rates)
assignment operator
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize information field.
uint16_t GetSerializedSize() const
Return the serialized size of this supported rates information element.
#define BSS_MEMBERSHIP_SELECTOR_HT_PHY
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint8_t GetNRates(void) const
Return the number of supported rates.
void SerializeInformationField(Buffer::Iterator start) const
Get the information field size.
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
iterator in a Buffer instance
ExtendedSupportedRatesIE extended
extended suppoted rates info element
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if there are more than 8 rates...
WifiInformationElementId ElementId() const
Get element ID.
uint8_t GetInformationFieldSize() const
Get information field size.
void SetSupportedRates(SupportedRates *rates)
Set supported rates.
void SetBasicRate(uint32_t bs)
Set the given rate to basic rates.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
bool IsBasicRate(uint32_t bs) const
Check if the given rate is a basic rate.
uint8_t m_nRates
Number of supported rates.
#define BSS_MEMBERSHIP_SELECTOR_HE_PHY
void AddBssMembershipSelectorRate(uint32_t bs)
Add a special value to the supported rate set, corresponding to a BSS membership selector.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ExtendedSupportedRatesIE()
uint8_t m_rates[MAX_SUPPORTED_RATES]
List of supported bitrate (divided by 500000)
void Read(uint8_t *buffer, uint32_t size)
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Get the information field size.
#define BSS_MEMBERSHIP_SELECTOR_VHT_PHY
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
SupportedRates * m_supportedRates
This member points to the SupportedRates object that contains the actual rate details.
WifiInformationElementId ElementId() const
Get the ElementID.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void Write(uint8_t const *buffer, uint32_t size)
bool IsSupportedRate(uint32_t bs) const
Check if the given rate is supported.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
uint8_t GetInformationFieldSize() const
Get the information field size.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information field.
static const uint8_t MAX_SUPPORTED_RATES
This defines the maximum number of supported rates that a STA is allowed to have. ...
bool IsBssMembershipSelectorRate(uint32_t bs) const
Check if the given rate is a BSS membership selector value.