30 m_records{{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}
35 MuEdcaParameterSet::ElementId()
const
41 MuEdcaParameterSet::ElementIdExt()
const
47 MuEdcaParameterSet::SetQosInfo(uint8_t qosInfo)
53 MuEdcaParameterSet::SetMuAifsn(uint8_t aci, uint8_t aifsn)
56 NS_ABORT_MSG_IF(aifsn == 1 || aifsn > 15,
"Invalid AIFSN value: " << +aifsn);
58 m_records[aci].aifsnField |= (aifsn & 0x0f);
59 m_records[aci].aifsnField |= (aci & 0x03) << 5;
63 MuEdcaParameterSet::SetMuCwMin(uint8_t aci, uint16_t cwMin)
68 auto eCwMin = std::log2(cwMin + 1);
69 NS_ABORT_MSG_IF(std::trunc(eCwMin) != eCwMin,
"CWmin is not a power of 2 minus 1");
71 m_records[aci].cwMinMax |= (
static_cast<uint8_t
>(eCwMin) & 0x0f);
75 MuEdcaParameterSet::SetMuCwMax(uint8_t aci, uint16_t cwMax)
80 auto eCwMax = std::log2(cwMax + 1);
81 NS_ABORT_MSG_IF(std::trunc(eCwMax) != eCwMax,
"CWmax is not a power of 2 minus 1");
83 m_records[aci].cwMinMax |= (
static_cast<uint8_t
>(eCwMax) & 0x0f) << 4;
87 MuEdcaParameterSet::SetMuEdcaTimer(uint8_t aci,
Time timer)
91 "Timer value is below 8.192 ms");
97 m_records[aci].muEdcaTimer =
static_cast<uint8_t
>(
value);
101 MuEdcaParameterSet::GetQosInfo()
const
107 MuEdcaParameterSet::GetMuAifsn(uint8_t aci)
const
110 return (m_records[aci].aifsnField & 0x0f);
114 MuEdcaParameterSet::GetMuCwMin(uint8_t aci)
const
117 uint8_t eCwMin = (m_records[aci].cwMinMax & 0x0f);
118 return static_cast<uint16_t
>(std::exp2(eCwMin) - 1);
122 MuEdcaParameterSet::GetMuCwMax(uint8_t aci)
const
125 uint8_t eCwMax = ((m_records[aci].cwMinMax >> 4) & 0x0f);
126 return static_cast<uint16_t
>(std::exp2(eCwMax) - 1);
130 MuEdcaParameterSet::GetMuEdcaTimer(uint8_t aci)
const
137 MuEdcaParameterSet::GetInformationFieldSize()
const
146 start.WriteU8(GetQosInfo());
147 for (
const auto& record : m_records)
149 start.WriteU8(record.aifsnField);
150 start.WriteU8(record.cwMinMax);
151 start.WriteU8(record.muEdcaTimer);
160 for (
auto& record : m_records)
162 record.aifsnField = i.
ReadU8();
163 record.cwMinMax = i.
ReadU8();
164 record.muEdcaTimer = i.
ReadU8();
iterator in a Buffer instance
Simulation virtual time values and global simulation resolution.
bool IsStrictlyPositive() const
Exactly equivalent to t > 0.
int64_t GetMicroSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
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.