16 : m_basicHeMcsAndNssSet(0xffff),
17 m_6GHzOpInfo(m_heOpParams.m_6GHzOpPresent)
52 uint16_t twoBytes = m_defaultPeDuration | (m_twtRequired << 3) | (m_txopDurRtsThresh << 4) |
53 (m_vhOpPresent << 14) | (m_coHostedBss << 15);
54 uint8_t oneByte = m_erSuDisable | ((m_6GHzOpPresent ? 1 : 0) << 1);
55 start.WriteHtolsbU16(twoBytes);
56 start.WriteU8(oneByte);
64 uint8_t oneByte = start.ReadU8();
65 m_defaultPeDuration = twoBytes & 0x07;
66 m_twtRequired = (twoBytes >> 3) & 0x01;
67 m_txopDurRtsThresh = (twoBytes >> 4) & 0x03ff;
68 m_vhOpPresent = (twoBytes >> 14) & 0x01;
69 m_coHostedBss = (twoBytes >> 15) & 0x01;
70 m_erSuDisable = oneByte & 0x01;
71 m_6GHzOpPresent = ((oneByte >> 1) & 0x01) == 1;
72 return start.GetDistanceFrom(tmp);
78 os <<
"BSS Color: " << +m_bssColor <<
" Partial BSS Color: " << +m_partialBssColor
79 <<
" BSS Color Disabled: " << +m_bssColorDisabled;
91 uint8_t oneByte = m_bssColor | (m_partialBssColor << 6) | (m_bssColorDisabled << 7);
92 start.WriteU8(oneByte);
99 uint8_t oneByte = start.
ReadU8();
100 m_bssColor = oneByte & 0x3f;
101 m_partialBssColor = (oneByte >> 6) & 0x01;
102 m_bssColorDisabled = (oneByte >> 7) & 0x01;
103 return start.GetDistanceFrom(tmp);
109 os <<
"Primary channel: " << +m_primCh <<
" Channel Width: " << +m_chWid
110 <<
" Duplicate Beacon: " << +m_dupBeacon <<
" Regulatory Info: " << +m_regInfo
111 <<
" Channel center frequency segment 0: " << +m_chCntrFreqSeg0
112 <<
" Channel center frequency segment 1: " << +m_chCntrFreqSeg1
113 <<
" Minimum Rate: " << +m_minRate;
125 start.WriteU8(m_primCh);
126 uint8_t control = m_chWid | (m_dupBeacon << 2) | (m_regInfo << 3);
127 start.WriteU8(control);
128 start.WriteU8(m_chCntrFreqSeg0);
129 start.WriteU8(m_chCntrFreqSeg1);
130 start.WriteU8(m_minRate);
138 uint8_t control = i.
ReadU8();
139 m_chWid = control & 0x03;
140 m_dupBeacon = (control >> 2) & 0x01;
141 m_regInfo = (control >> 3) & 0x07;
142 m_chCntrFreqSeg0 = i.
ReadU8();
143 m_chCntrFreqSeg1 = i.
ReadU8();
151 NS_ASSERT((maxHeMcs >= 7 && maxHeMcs <= 11) && (nss >= 1 && nss <= 8));
159 else if (maxHeMcs >= 9)
169 const uint16_t mask = ~(0x03 << ((nss - 1) * 2));
179 os <<
"HE Operation=[HE Operation Parameters|";
181 os <<
"][BSS Color|";
186 os <<
"[6 GHz Operation Info|";
iterator in a Buffer instance
uint32_t GetDistanceFrom(const Iterator &o) const
OptFieldWithPresenceInd< OpInfo6GHz > m_6GHzOpInfo
6 GHz Operation Information field
void Print(std::ostream &os) const override
Generate human-readable form of IE.
void SetMaxHeMcsPerNss(uint8_t nss, uint8_t maxHeMcs)
Set the Basic HE-MCS and NSS field in the HE Operation information element by specifying the pair (ns...
WifiInformationElementId ElementIdExt() const override
Get the wifi information element ID extension.
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
uint16_t m_basicHeMcsAndNssSet
Basic HE-MCS And NSS set (use setter to set value)
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
HeOperationParams m_heOpParams
HE Operation Parameters field.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
BssColorInfo m_bssColorInfo
BSS Color Information field.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
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.
void Serialize(Buffer::Iterator &start) const
Serialize the BSS Color Information field.
void Print(std::ostream &os) const
Print the content of the BSS Color Information field.
uint16_t Deserialize(Buffer::Iterator &start)
Deserialize the BSS Color Information field.
uint16_t GetSerializedSize() const
uint8_t m_erSuDisable
ER SU Disable.
void Print(std::ostream &os) const
Print the content of the HE Operation Parameters field.
void Serialize(Buffer::Iterator &start) const
Serialize the HE Operation Parameters field.
uint8_t m_vhOpPresent
VHT Operation Information Present (value 1 unsupported)
bool m_6GHzOpPresent
6 GHz Operation Information Present (do not set, it is set by the OptFieldWithPresenceInd)
uint8_t m_coHostedBss
Co-Hosted BSS (value 1 unsupported)
uint16_t GetSerializedSize() const
uint16_t Deserialize(Buffer::Iterator &start)
Deserialize the HE Operation Parameters field.
uint8_t m_defaultPeDuration
Default PE Duration.
uint8_t m_twtRequired
TWT Required.
uint16_t m_txopDurRtsThresh
TXOP Duration RTS Threshold.
6 GHz Operation Information field
void Print(std::ostream &os) const
Print the content of the 6 GHz Operation Information field.
uint16_t GetSerializedSize() const
uint16_t Deserialize(Buffer::Iterator &start)
Deserialize the 6 GHz Operation Information field.
void Serialize(Buffer::Iterator &start) const
Serialize the 6 GHz Operation Information field.