22 #include "ns3/assert.h"
68 m_acBE |= (acm & 0x01) << 4;
74 m_acBE |= (aci & 0x03) << 5;
80 uint8_t ECWmin = log2 (cwMin + 1);
81 m_acBE |= (ECWmin & 0x0f) << 8;
87 uint8_t ECWmax = log2 (cwMax + 1);
88 m_acBE |= (ECWmax & 0x0f) << 12;
106 m_acBK |= (acm & 0x01) << 4;
112 m_acBK |= (aci & 0x03) << 5;
118 uint8_t ECWmin = log2 (cwMin + 1);
119 m_acBK |= (ECWmin & 0x0f) << 8;
125 uint8_t ECWmax = log2 (cwMax + 1);
126 m_acBK |= (ECWmax & 0x0f) << 12;
144 m_acVI |= (acm & 0x01) << 4;
150 m_acVI |= (aci & 0x03) << 5;
156 uint8_t ECWmin = log2 (cwMin + 1);
157 m_acVI |= (ECWmin & 0x0f) << 8;
163 uint8_t ECWmax = log2 (cwMax + 1);
164 m_acVI |= (ECWmax & 0x0f) << 12;
182 m_acVO |= (acm & 0x01) << 4;
188 m_acVO |= (aci & 0x03) << 5;
194 uint8_t ECWmin = log2 (cwMin + 1);
195 m_acVO |= (ECWmin & 0x0f) << 8;
201 uint8_t ECWmax = log2 (cwMax + 1);
202 m_acVO |= (ECWmax & 0x0f) << 12;
226 return ((
m_acBE >> 4) & 0x01);
232 return ((
m_acBE >> 5) & 0x03);
238 uint8_t ECWmin = ((
m_acBE >> 8) & 0x0f);
239 return (exp2 (ECWmin) - 1);
245 uint8_t ECWmax = ((
m_acBE >> 12) & 0x0f);
246 return (exp2 (ECWmax) - 1);
264 return ((
m_acBK >> 4) & 0x01);
270 return ((
m_acBK >> 5) & 0x03);
276 uint8_t ECWmin = ((
m_acBK >> 8) & 0x0f);
277 return (exp2 (ECWmin) - 1);
283 uint8_t ECWmax = ((
m_acBK >> 12) & 0x0f);
284 return (exp2 (ECWmax) - 1);
302 return ((
m_acVI >> 4) & 0x01);
308 return ((
m_acVI >> 5) & 0x03);
314 uint8_t ECWmin = ((
m_acVI >> 8) & 0x0f);
315 return (exp2 (ECWmin) - 1);
321 uint8_t ECWmax = ((
m_acVI >> 12) & 0x0f);
322 return (exp2 (ECWmax) - 1);
340 return ((
m_acVO >> 4) & 0x01);
346 return ((
m_acVO >> 5) & 0x03);
352 uint8_t ECWmin = ((
m_acVO >> 8) & 0x0f);
353 return (exp2 (ECWmin) - 1);
359 uint8_t ECWmax = ((
m_acVO >> 12) & 0x0f);
360 return (exp2 (ECWmax) - 1);
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
void SetViAcm(uint8_t acm)
Set the AC_VI ACM field in the EdcaParameterSet information element.
void SetQosSupported(uint8_t qosSupported)
uint8_t GetVoAcm(void) const
void SetBkCWmin(uint8_t cwMin)
Set the AC_BK CWmin field in the EdcaParameterSet information element.
void SetBeAcm(uint8_t acm)
Set the AC_BE ACM field in the EdcaParameterSet information element.
WifiInformationElementId ElementId() const
Own unique Element ID.
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type.
void SetVoAci(uint8_t aci)
Set the AC_VO ACI field in the EdcaParameterSet information element.
uint8_t GetViCWmax(void) const
uint8_t GetVoAifsn(void) const
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the EdcaParameterSet information element.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void SetVoAifsn(uint8_t aifsn)
Set the AC_VO AIFSN field in the EdcaParameterSet information element.
void SetVoTXOPLimit(uint16_t txop)
Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
uint8_t GetBeAci(void) const
uint8_t GetVoCWmin(void) const
uint8_t GetBkAci(void) const
iterator in a Buffer instance
uint16_t GetBeTXOPLimit(void) const
uint8_t GetViCWmin(void) const
void SetViAifsn(uint8_t aifsn)
Set the AC_VI AIFSN field in the EdcaParameterSet information element.
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void SetBeTXOPLimit(uint16_t txop)
Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
uint16_t GetBkTXOPLimit(void) const
uint8_t GetBeCWmin(void) const
void SetViAci(uint8_t aci)
Set the AC_VI ACI field in the EdcaParameterSet information element.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
uint16_t GetVoTXOPLimit(void) const
void SetBeCWmax(uint8_t cwMax)
Set the AC_BE CWmax field in the EdcaParameterSet information element.
void SetBeCWmin(uint8_t cwMin)
Set the AC_BE CWmin field in the EdcaParameterSet information element.
uint8_t GetVoCWmax(void) const
void SetViCWmin(uint8_t cwMin)
Set the AC_VI CWmin field in the EdcaParameterSet information element.
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) ...
uint8_t GetBkAcm(void) const
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is a QoS STA...
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t GetBeCWmax(void) const
The EDCA Parameter SetThis class knows how to serialise and deserialise the EDCA Parameter Set...
uint8_t GetBkCWmax(void) const
uint8_t GetBeAcm(void) const
void SetBkAifsn(uint8_t aifsn)
Set the AC_BK AIFSN field in the EdcaParameterSet information element.
uint8_t GetBkCWmin(void) const
uint8_t GetQosInfo(void) const
uint16_t GetViTXOPLimit(void) const
uint8_t GetViAifsn(void) const
void SetBkTXOPLimit(uint16_t txop)
Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
void SetBeAci(uint8_t aci)
Set the AC_BE ACI field in the EdcaParameterSet information element.
uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
void SetBkAci(uint8_t aci)
Set the AC_BK ACI field in the EdcaParameterSet information element.
void SetVoAcm(uint8_t acm)
Set the AC_VO ACM field in the EdcaParameterSet information element.
void WriteU8(uint8_t data)
void SetViTXOPLimit(uint16_t txop)
Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
uint8_t GetViAci(void) const
void SetVoCWmin(uint8_t cwMin)
Set the AC_VO CWmin field in the EdcaParameterSet information element.
uint8_t GetBeAifsn(void) const
uint8_t GetBkAifsn(void) const
uint8_t GetViAcm(void) const
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
void SetVoCWmax(uint8_t cwMax)
Set the AC_VO CWmax field in the EdcaParameterSet information element.
uint8_t GetVoAci(void) const
void SetBkCWmax(uint8_t cwMax)
Set the AC_BK CWmax field in the EdcaParameterSet information element.
void WriteU32(uint32_t data)
void SetBeAifsn(uint8_t aifsn)
Set the AC_BE AIFSN field in the EdcaParameterSet information element.
void SetViCWmax(uint8_t cwMax)
Set the AC_VI CWmax field in the EdcaParameterSet information element.
void SetBkAcm(uint8_t acm)
Set the AC_BK ACM field in the EdcaParameterSet information element.