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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Ghada Badawy <gbadawy@gmail.com>
18 * Sébastien Deronne <sebastien.deronne@gmail.com>
19 */
20
21#ifndef VHT_CAPABILITIES_H
22#define VHT_CAPABILITIES_H
23
24#include "ns3/wifi-information-element.h"
25
26namespace ns3
27{
28
29/**
30 * \ingroup wifi
31 *
32 * The IEEE 802.11ac VHT Capabilities
33 */
35{
36 public:
38
39 // Implementations of pure virtual methods of WifiInformationElement
40 WifiInformationElementId ElementId() const override;
41 void Print(std::ostream& os) const override;
42
43 /**
44 * Set the VHT Capabilities Info field in the VHT Capabilities information element.
45 *
46 * \param ctrl the VHT Capabilities Info field in the VHT Capabilities information element
47 */
49 /**
50 * Set the MCS and NSS field in the VHT Capabilities information element.
51 *
52 * \param ctrl the MCS and NSS field in the VHT Capabilities information element
53 */
54 void SetSupportedMcsAndNssSet(uint64_t ctrl);
55
56 /**
57 * Return the VHT Capabilities Info field in the VHT Capabilities information element.
58 *
59 * \return the VHT Capabilities Info field in the VHT Capabilities information element
60 */
62 /**
63 * Return the MCS and NSS field in the VHT Capabilities information element.
64 *
65 * \return the MCS and NSS field in the VHT Capabilities information element
66 */
67 uint64_t GetSupportedMcsAndNssSet() const;
68
69 // Capabilities Info fields
70 /**
71 * Set the maximum MPDU length.
72 *
73 * \param length the maximum MPDU length (3895, 7991 or 11454)
74 */
75 void SetMaxMpduLength(uint16_t length);
76 /**
77 * Set the supported channel width set.
78 *
79 * \param channelWidthSet the supported channel width set
80 */
81 void SetSupportedChannelWidthSet(uint8_t channelWidthSet);
82 /**
83 * Set the receive LDPC.
84 *
85 * \param rxLdpc the receive LDPC
86 */
87 void SetRxLdpc(uint8_t rxLdpc);
88 /**
89 * Set the short guard interval 80 MHz.
90 *
91 * \param shortGuardInterval the short guard interval 80 MHz
92 */
93 void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval);
94 /**
95 * Set the short guard interval 160 MHz.
96 *
97 * \param shortGuardInterval the short guard interval 160 MHz
98 */
99 void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval);
100 /**
101 * Set the receive STBC.
102 *
103 * \param rxStbc the receive STBC
104 */
105 void SetRxStbc(uint8_t rxStbc);
106 /**
107 * Set the transmit STBC.
108 *
109 * \param txStbc the receive STBC
110 */
111 void SetTxStbc(uint8_t txStbc);
112 /**
113 * Set the maximum AMPDU length.
114 *
115 * \param maxAmpduLength 2^(13 + x) - 1, x in the range 0 to 7
116 */
117 void SetMaxAmpduLength(uint32_t maxAmpduLength);
118
119 /**
120 * Get the maximum MPDU length.
121 *
122 * \return the maximum MPDU length in bytes
123 */
124 uint16_t GetMaxMpduLength() const;
125 /**
126 * Get the supported channel width set.
127 *
128 * \returns the supported channel width set
129 */
130 uint8_t GetSupportedChannelWidthSet() const;
131 /**
132 * Get the receive LDPC.
133 *
134 * \returns the receive LDPC
135 */
136 uint8_t GetRxLdpc() const;
137 /**
138 * Get the receive STBC.
139 *
140 * \returns the receive STBC
141 */
142 uint8_t GetRxStbc() const;
143 /**
144 * Get the transmit STBC.
145 *
146 * \returns the transmit STBC
147 */
148 uint8_t GetTxStbc() const;
149
150 /**
151 * \param mcs Max MCS value (between 7 and 9)
152 * \param nss Spatial stream for which the Max MCS value is being set
153 */
154 void SetRxMcsMap(uint8_t mcs, uint8_t nss);
155 /**
156 * \param mcs Max MCS value (between 7 and 9)
157 * \param nss Spatial stream for which the Max MCS value is being set
158 */
159 void SetTxMcsMap(uint8_t mcs, uint8_t nss);
160 /**
161 * Set the receive highest supported LGI data rate.
162 *
163 * \param supportedDatarate receive highest supported LGI data rate
164 */
165 void SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate);
166 /**
167 * Set the transmit highest supported LGI data rate.
168 *
169 * \param supportedDatarate transmit highest supported LGI data rate
170 */
171 void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate);
172 /**
173 * Get the is MCS supported.
174 *
175 * \param mcs the MCS
176 * \param nss the NSS
177 * \returns the is MCS supported
178 */
179 bool IsSupportedMcs(uint8_t mcs, uint8_t nss) const;
180
181 /**
182 * Get the receive highest supported LGI data rate.
183 *
184 * \returns the receive highest supported LGI data rate.
185 */
186 uint16_t GetRxHighestSupportedLgiDataRate() const;
187
188 /**
189 * Returns true if transmit MCS is supported.
190 *
191 * \param mcs the MCS
192 * \returns whether transmit MCS is supported
193 */
194 bool IsSupportedTxMcs(uint8_t mcs) const;
195 /**
196 * Returns true if receive MCS is supported.
197 *
198 * \param mcs the MCS
199 * \returns whether receive MCS is supported
200 */
201 bool IsSupportedRxMcs(uint8_t mcs) const;
202
203 /**
204 * Return the maximum A-MPDU length.
205 *
206 * \return the maximum A-MPDU length in bytes
207 */
209
210 private:
211 uint16_t GetInformationFieldSize() const override;
212 void SerializeInformationField(Buffer::Iterator start) const override;
213 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
214
215 // Capabilities Info fields
216 uint8_t m_maxMpduLength; ///< maximum MPDU length
217 uint8_t m_supportedChannelWidthSet; ///< supported channel width set
218 uint8_t m_rxLdpc; ///< receive LDPC
219 uint8_t m_shortGuardIntervalFor80Mhz; ///< short guard interval for 80 MHz
220 uint8_t m_shortGuardIntervalFor160Mhz; ///< short guard interval for 160 MHz
221 uint8_t m_txStbc; ///< transmit STBC
222 uint8_t m_rxStbc; ///< receive STBC
223 uint8_t m_suBeamformerCapable; ///< SU beamformer capable
224 uint8_t m_suBeamformeeCapable; ///< SU beamformee capable
225 uint8_t m_beamformeeStsCapable; ///< beamformee STS capable
226 uint8_t m_numberOfSoundingDimensions; ///< number of sounding dimensions
227 uint8_t m_muBeamformerCapable; ///< MU beamformer capable
228 uint8_t m_muBeamformeeCapable; ///< MU beamformee capable
229 uint8_t m_vhtTxopPs; ///< VHT TXOP PS
230 uint8_t m_htcVhtCapable; ///< HTC VHT capable
231 uint8_t m_maxAmpduLengthExponent; ///< maximum A-MPDU length exponent
232 uint8_t m_vhtLinkAdaptationCapable; ///< VHT link adaptation capable
233 uint8_t m_rxAntennaPatternConsistency; ///< receive antenna pattern consistency
234 uint8_t m_txAntennaPatternConsistency; ///< transmit antenna pattern consistency
235
236 // MCS and NSS field information
237 std::vector<uint8_t> m_rxMcsMap; ///< receive MCS map
238 uint16_t m_rxHighestSupportedLongGuardIntervalDataRate; ///< receive highest supported long
239 ///< guard interval data rate
240 std::vector<uint8_t> m_txMcsMap; ///< transmit MCS map
241 uint16_t m_txHighestSupportedLongGuardIntervalDataRate; ///< transmit highest supported long
242 ///< guard interval data rate
243};
244
245} // namespace ns3
246
247#endif /* VHT_CAPABILITY_H */
iterator in a Buffer instance
Definition: buffer.h:100
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.