|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
29 m_records {{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}
48 auto timerNotNull = [](
const ParameterRecord &r) {
return r.muEdcaTimer != 0; };
56 "MU EDCA Timers must be either all zero or all non-zero.");
70 NS_ABORT_MSG_IF (aifsn == 1 || aifsn > 15,
"Invalid AIFSN value: " << +aifsn);
72 m_records[aci].aifsnField |= (aifsn & 0x0f);
73 m_records[aci].aifsnField |= (aci & 0x03) << 5;
82 auto eCwMin = std::log2 (cwMin + 1);
83 NS_ABORT_MSG_IF (std::trunc (eCwMin) != eCwMin,
"CWmin is not a power of 2 minus 1");
85 m_records[aci].cwMinMax |= (
static_cast<uint8_t
> (eCwMin) & 0x0f);
94 auto eCwMax = std::log2 (cwMax + 1);
95 NS_ABORT_MSG_IF (std::trunc (eCwMax) != eCwMax,
"CWmax is not a power of 2 minus 1");
97 m_records[aci].cwMinMax |= (
static_cast<uint8_t
> (eCwMax) & 0x0f) << 4;
105 "Timer value is below 8.192 ms");
109 NS_ABORT_MSG_IF (std::trunc (value) != value,
"Timer value is not a multiple of 8 TUs (8192 us)");
111 m_records[aci].muEdcaTimer =
static_cast<uint8_t
> (value);
124 return (
m_records[aci].aifsnField & 0x0f);
131 uint8_t eCwMin = (
m_records[aci].cwMinMax & 0x0f);
132 return static_cast<uint16_t
> (std::exp2 (eCwMin) - 1);
139 uint8_t eCwMax = ((
m_records[aci].cwMinMax >> 4) & 0x0f);
140 return static_cast<uint16_t
> (std::exp2 (eCwMax) - 1);
186 start.WriteU8 (record.aifsnField);
187 start.WriteU8 (record.cwMinMax);
188 start.WriteU8 (record.muEdcaTimer);
200 record.aifsnField = i.
ReadU8 ();
201 record.cwMinMax = i.
ReadU8 ();
202 record.muEdcaTimer = i.
ReadU8 ();
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
void SetMuCwMax(uint8_t aci, uint16_t cwMax)
Set the ECWmax subfield of the ECWmin/ECWmax field in the MU AC Parameter Record field corresponding ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiInformationElementId ElementId() const
Get the wifi information element ID.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
bool IsStrictlyPositive(void) const
Exactly equivalent to t > 0.
bool IsPresent(void) const
Return true if a valid MU EDCA Parameter Set is present in this object.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Time GetMuEdcaTimer(uint8_t aci) const
Get the MU EDCA Timer value encoded in the MU AC Parameter Record field corresponding to the given AC...
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize information field function.
uint8_t GetMuAifsn(uint8_t aci) const
Get the AIFSN subfield of the ACI/AIFSN field in the MU AC Parameter Record field corresponding to th...
int64_t GetMicroSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
WifiInformationElementId ElementIdExt() const
Get the wifi information element ID extension.
uint8_t m_qosInfo
QoS info field.
Simulation virtual time values and global simulation resolution.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
void SetMuAifsn(uint8_t aci, uint8_t aifsn)
Set the AIFSN subfield of the ACI/AIFSN field in the MU AC Parameter Record field corresponding to th...
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an HE STA.
MU AC Parameter Record type.
uint16_t GetMuCwMax(uint8_t aci) const
Get the CWmax value encoded by the ECWmax subfield of the ECWmin/ECWmax field in the MU AC Parameter ...
std::array< ParameterRecord, 4 > m_records
MU AC Parameter Record fields.
iterator in a Buffer instance
void SetQosInfo(uint8_t qosInfo)
Set the QoS Info field in the MuEdcaParameterSet information element.
uint8_t GetQosInfo(void) const
Return the QoS Info field in the MuEdcaParameterSet information element.
void SetMuCwMin(uint8_t aci, uint16_t cwMin)
Set the ECWmin subfield of the ECWmin/ECWmax field in the MU AC Parameter Record field corresponding ...
void SetMuEdcaTimer(uint8_t aci, Time timer)
Set the MU EDCA Timer field in the MU AC Parameter Record field corresponding to the given AC Index (...
uint16_t GetMuCwMin(uint8_t aci) const
Get the CWmin value encoded by the ECWmin subfield of the ECWmin/ECWmax field in the MU AC Parameter ...
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information field function.
uint8_t GetInformationFieldSize() const
Get information field size function.