22 #include "ns3/assert.h"
50 uint8_t rate = bs / 500000;
51 for (uint8_t i = 0; i <
m_nRates; i++)
53 if ((rate | 0x80) ==
m_rates[i])
59 NS_LOG_DEBUG (
"set basic rate=" << bs <<
", n rates=" << (uint32_t)m_nRates);
70 uint8_t rate = (bs / 500000) | 0x80;
71 for (uint8_t i = 0; i <
m_nRates; i++)
83 uint8_t rate = bs / 500000;
84 for (uint8_t i = 0; i <
m_nRates; i++)
102 return (
m_rates[i] & 0x7f) * 500000;
230 for (uint8_t i = 0; i < rates.
GetNRates (); i++)
232 uint32_t rate = rates.
GetRate (i);
237 os << rate / 1000000 <<
"mbs";
uint32_t GetRate(uint8_t i) const
Return the rate at the given index.
#define MAX_SUPPORTED_RATES
This defines the maximum number of supported rates that a STA is allowed to have. ...
void AddSupportedRate(uint32_t bs)
Add the given rate to the supported rates.
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
uint16_t GetSerializedSize() const
Return the serialized size of this supported rates information element.
#define NS_ASSERT(condition)
uint8_t GetNRates(void) const
Return the number of supported rates.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
iterator in a Buffer instance
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
Own unique Element ID.
uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
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.
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)
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
SupportedRates * m_supportedRates
This member points to the SupportedRates object that contains the actual rate details.
WifiInformationElementId ElementId() const
Own unique Element ID.
#define NS_LOG_DEBUG(msg)
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
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
void SerializeInformationField(Buffer::Iterator start) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
NS_LOG_COMPONENT_DEFINE("SupportedRates")