A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
vht-capabilities.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Ghada Badawy <gbadawy@gmail.com>
7 * Sébastien Deronne <sebastien.deronne@gmail.com>
8 */
9
10#ifndef VHT_CAPABILITIES_H
11#define VHT_CAPABILITIES_H
12
13#include "ns3/wifi-information-element.h"
14
15namespace ns3
16{
17
18/**
19 * \ingroup wifi
20 *
21 * The IEEE 802.11ac VHT Capabilities
22 */
24{
25 public:
27
28 // Implementations of pure virtual methods of WifiInformationElement
29 WifiInformationElementId ElementId() const override;
30 void Print(std::ostream& os) const override;
31
32 /**
33 * Set the VHT Capabilities Info field in the VHT Capabilities information element.
34 *
35 * \param ctrl the VHT Capabilities Info field in the VHT Capabilities information element
36 */
38 /**
39 * Set the MCS and NSS field in the VHT Capabilities information element.
40 *
41 * \param ctrl the MCS and NSS field in the VHT Capabilities information element
42 */
43 void SetSupportedMcsAndNssSet(uint64_t ctrl);
44
45 /**
46 * Return the VHT Capabilities Info field in the VHT Capabilities information element.
47 *
48 * \return the VHT Capabilities Info field in the VHT Capabilities information element
49 */
51 /**
52 * Return the MCS and NSS field in the VHT Capabilities information element.
53 *
54 * \return the MCS and NSS field in the VHT Capabilities information element
55 */
56 uint64_t GetSupportedMcsAndNssSet() const;
57
58 // Capabilities Info fields
59 /**
60 * Set the maximum MPDU length.
61 *
62 * \param length the maximum MPDU length (3895, 7991 or 11454)
63 */
64 void SetMaxMpduLength(uint16_t length);
65 /**
66 * Set the supported channel width set.
67 *
68 * \param channelWidthSet the supported channel width set
69 */
70 void SetSupportedChannelWidthSet(uint8_t channelWidthSet);
71 /**
72 * Set the receive LDPC.
73 *
74 * \param rxLdpc the receive LDPC
75 */
76 void SetRxLdpc(uint8_t rxLdpc);
77 /**
78 * Set the short guard interval 80 MHz.
79 *
80 * \param shortGuardInterval the short guard interval 80 MHz
81 */
82 void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval);
83 /**
84 * Set the short guard interval 160 MHz.
85 *
86 * \param shortGuardInterval the short guard interval 160 MHz
87 */
88 void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval);
89 /**
90 * Set the receive STBC.
91 *
92 * \param rxStbc the receive STBC
93 */
94 void SetRxStbc(uint8_t rxStbc);
95 /**
96 * Set the transmit STBC.
97 *
98 * \param txStbc the receive STBC
99 */
100 void SetTxStbc(uint8_t txStbc);
101 /**
102 * Set the maximum AMPDU length.
103 *
104 * \param maxAmpduLength 2^(13 + x) - 1, x in the range 0 to 7
105 */
106 void SetMaxAmpduLength(uint32_t maxAmpduLength);
107
108 /**
109 * Get the maximum MPDU length.
110 *
111 * \return the maximum MPDU length in bytes
112 */
113 uint16_t GetMaxMpduLength() const;
114 /**
115 * Get the supported channel width set.
116 *
117 * \returns the supported channel width set
118 */
119 uint8_t GetSupportedChannelWidthSet() const;
120 /**
121 * Get the receive LDPC.
122 *
123 * \returns the receive LDPC
124 */
125 uint8_t GetRxLdpc() const;
126 /**
127 * Get the receive STBC.
128 *
129 * \returns the receive STBC
130 */
131 uint8_t GetRxStbc() const;
132 /**
133 * Get the transmit STBC.
134 *
135 * \returns the transmit STBC
136 */
137 uint8_t GetTxStbc() const;
138
139 /**
140 * \param mcs Max MCS value (between 7 and 9)
141 * \param nss Spatial stream for which the Max MCS value is being set
142 */
143 void SetRxMcsMap(uint8_t mcs, uint8_t nss);
144 /**
145 * \param mcs Max MCS value (between 7 and 9)
146 * \param nss Spatial stream for which the Max MCS value is being set
147 */
148 void SetTxMcsMap(uint8_t mcs, uint8_t nss);
149 /**
150 * Set the receive highest supported LGI data rate.
151 *
152 * \param supportedDatarate receive highest supported LGI data rate
153 */
154 void SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate);
155 /**
156 * Set the transmit highest supported LGI data rate.
157 *
158 * \param supportedDatarate transmit highest supported LGI data rate
159 */
160 void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate);
161 /**
162 * Get the is MCS supported.
163 *
164 * \param mcs the MCS
165 * \param nss the NSS
166 * \returns the is MCS supported
167 */
168 bool IsSupportedMcs(uint8_t mcs, uint8_t nss) const;
169
170 /**
171 * Get the receive highest supported LGI data rate.
172 *
173 * \returns the receive highest supported LGI data rate.
174 */
175 uint16_t GetRxHighestSupportedLgiDataRate() const;
176
177 /**
178 * Returns true if transmit MCS is supported.
179 *
180 * \param mcs the MCS
181 * \returns whether transmit MCS is supported
182 */
183 bool IsSupportedTxMcs(uint8_t mcs) const;
184 /**
185 * Returns true if receive MCS is supported.
186 *
187 * \param mcs the MCS
188 * \returns whether receive MCS is supported
189 */
190 bool IsSupportedRxMcs(uint8_t mcs) const;
191
192 /**
193 * Return the maximum A-MPDU length.
194 *
195 * \return the maximum A-MPDU length in bytes
196 */
198
199 private:
200 uint16_t GetInformationFieldSize() const override;
201 void SerializeInformationField(Buffer::Iterator start) const override;
202 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
203
204 // Capabilities Info fields
205 uint8_t m_maxMpduLength; ///< maximum MPDU length
206 uint8_t m_supportedChannelWidthSet; ///< supported channel width set
207 uint8_t m_rxLdpc; ///< receive LDPC
208 uint8_t m_shortGuardIntervalFor80Mhz; ///< short guard interval for 80 MHz
209 uint8_t m_shortGuardIntervalFor160Mhz; ///< short guard interval for 160 MHz
210 uint8_t m_txStbc; ///< transmit STBC
211 uint8_t m_rxStbc; ///< receive STBC
212 uint8_t m_suBeamformerCapable; ///< SU beamformer capable
213 uint8_t m_suBeamformeeCapable; ///< SU beamformee capable
214 uint8_t m_beamformeeStsCapable; ///< beamformee STS capable
215 uint8_t m_numberOfSoundingDimensions; ///< number of sounding dimensions
216 uint8_t m_muBeamformerCapable; ///< MU beamformer capable
217 uint8_t m_muBeamformeeCapable; ///< MU beamformee capable
218 uint8_t m_vhtTxopPs; ///< VHT TXOP PS
219 uint8_t m_htcVhtCapable; ///< HTC VHT capable
220 uint8_t m_maxAmpduLengthExponent; ///< maximum A-MPDU length exponent
221 uint8_t m_vhtLinkAdaptationCapable; ///< VHT link adaptation capable
222 uint8_t m_rxAntennaPatternConsistency; ///< receive antenna pattern consistency
223 uint8_t m_txAntennaPatternConsistency; ///< transmit antenna pattern consistency
224
225 // MCS and NSS field information
226 std::vector<uint8_t> m_rxMcsMap; ///< receive MCS map
227 uint16_t m_rxHighestSupportedLongGuardIntervalDataRate; ///< receive highest supported long
228 ///< guard interval data rate
229 std::vector<uint8_t> m_txMcsMap; ///< transmit MCS map
230 uint16_t m_txHighestSupportedLongGuardIntervalDataRate; ///< transmit highest supported long
231 ///< guard interval data rate
232};
233
234} // namespace ns3
235
236#endif /* VHT_CAPABILITY_H */
iterator in a Buffer instance
Definition buffer.h:89
The IEEE 802.11ac VHT Capabilities.
uint8_t m_htcVhtCapable
HTC VHT capable.
void SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the receive highest supported LGI data rate.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
void SetVhtCapabilitiesInfo(uint32_t ctrl)
Set the VHT Capabilities Info field in the VHT Capabilities information element.
bool IsSupportedMcs(uint8_t mcs, uint8_t nss) const
Get the is MCS supported.
void SetSupportedChannelWidthSet(uint8_t channelWidthSet)
Set the supported channel width set.
void SetMaxMpduLength(uint16_t length)
Set the maximum MPDU length.
uint32_t GetMaxAmpduLength() const
Return the maximum A-MPDU length.
uint8_t m_shortGuardIntervalFor80Mhz
short guard interval for 80 MHz
uint8_t GetSupportedChannelWidthSet() const
Get the supported channel width set.
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)
uint8_t m_vhtLinkAdaptationCapable
VHT link adaptation capable.
void SetRxLdpc(uint8_t rxLdpc)
Set the receive LDPC.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
void SetTxStbc(uint8_t txStbc)
Set the transmit STBC.
uint8_t GetRxStbc() const
Get the receive STBC.
uint8_t m_muBeamformerCapable
MU beamformer capable.
bool IsSupportedTxMcs(uint8_t mcs) const
Returns true if transmit MCS is supported.
void SetTxMcsMap(uint8_t mcs, uint8_t nss)
uint8_t m_muBeamformeeCapable
MU beamformee capable.
void Print(std::ostream &os) const override
Generate human-readable form of IE.
uint8_t m_vhtTxopPs
VHT TXOP PS.
void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval)
Set the short guard interval 80 MHz.
uint8_t m_txStbc
transmit STBC
std::vector< uint8_t > m_txMcsMap
transmit MCS map
bool IsSupportedRxMcs(uint8_t mcs) const
Returns true if receive MCS is supported.
uint8_t m_suBeamformerCapable
SU beamformer capable.
uint8_t m_rxStbc
receive STBC
uint8_t m_maxMpduLength
maximum MPDU length
uint16_t GetMaxMpduLength() const
Get the maximum MPDU length.
uint16_t m_txHighestSupportedLongGuardIntervalDataRate
transmit highest supported long guard interval data rate
uint8_t GetTxStbc() const
Get the transmit STBC.
uint16_t GetRxHighestSupportedLgiDataRate() const
Get the receive highest supported LGI data rate.
uint16_t m_rxHighestSupportedLongGuardIntervalDataRate
receive highest supported long guard interval data rate
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint8_t m_supportedChannelWidthSet
supported channel width set
uint8_t m_shortGuardIntervalFor160Mhz
short guard interval for 160 MHz
std::vector< uint8_t > m_rxMcsMap
receive MCS map
uint8_t m_suBeamformeeCapable
SU beamformee capable.
uint8_t m_beamformeeStsCapable
beamformee STS capable
uint64_t GetSupportedMcsAndNssSet() const
Return the MCS and NSS field in the VHT Capabilities information element.
void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the transmit highest supported LGI data rate.
uint32_t GetVhtCapabilitiesInfo() const
Return the VHT Capabilities Info field in the VHT Capabilities information element.
uint8_t m_rxAntennaPatternConsistency
receive antenna pattern consistency
uint8_t m_rxLdpc
receive LDPC
void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval)
Set the short guard interval 160 MHz.
uint8_t m_txAntennaPatternConsistency
transmit antenna pattern consistency
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
uint8_t m_numberOfSoundingDimensions
number of sounding dimensions
void SetSupportedMcsAndNssSet(uint64_t ctrl)
Set the MCS and NSS field in the VHT Capabilities information element.
void SetRxMcsMap(uint8_t mcs, uint8_t nss)
uint8_t m_maxAmpduLengthExponent
maximum A-MPDU length exponent
uint8_t GetRxLdpc() const
Get the receive LDPC.
void SetRxStbc(uint8_t rxStbc)
Set the receive STBC.
Information element, as defined in 802.11-2007 standard.
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.