A Discrete-Event Network Simulator
API
vht-capabilities.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Ghada Badawy <gbadawy@gmail.com>
19  * Sébastien Deronne <sebastien.deronne@gmail.com>
20  */
21 
22 #ifndef VHT_CAPABILITIES_H
23 #define VHT_CAPABILITIES_H
24 
25 #include "ns3/wifi-information-element.h"
26 
27 namespace ns3 {
28 
35 {
36 public:
37  VhtCapabilities ();
38 
39  // Implementations of pure virtual methods of WifiInformationElement
40  WifiInformationElementId ElementId () const override;
41  uint8_t GetInformationFieldSize () const override;
42  void SerializeInformationField (Buffer::Iterator start) const override;
43  uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length) override;
44  /* This information element is a bit special in that it is only
45  included if the STA is an VHT STA. To support this we
46  override the Serialize and GetSerializedSize methods of
47  WifiInformationElement. */
49  uint16_t GetSerializedSize () const override;
50 
56  void SetVhtSupported (uint8_t vhtSupported);
57 
63  void SetVhtCapabilitiesInfo (uint32_t ctrl);
69  void SetSupportedMcsAndNssSet (uint64_t ctrl);
70 
76  uint32_t GetVhtCapabilitiesInfo () const;
82  uint64_t GetSupportedMcsAndNssSet () const;
83 
84  //Capabilities Info fields
90  void SetMaxMpduLength (uint16_t length);
96  void SetSupportedChannelWidthSet (uint8_t channelWidthSet);
102  void SetRxLdpc (uint8_t rxLdpc);
108  void SetShortGuardIntervalFor80Mhz (uint8_t shortGuardInterval);
114  void SetShortGuardIntervalFor160Mhz (uint8_t shortGuardInterval);
120  void SetRxStbc (uint8_t rxStbc);
126  void SetTxStbc (uint8_t txStbc);
132  void SetMaxAmpduLength (uint32_t maxAmpduLength);
133 
139  uint16_t GetMaxMpduLength (void) const;
145  uint8_t GetSupportedChannelWidthSet () const;
151  uint8_t GetRxLdpc () const;
157  uint8_t GetRxStbc () const;
163  uint8_t GetTxStbc () const;
164 
169  void SetRxMcsMap (uint8_t mcs, uint8_t nss);
174  void SetTxMcsMap (uint8_t mcs, uint8_t nss);
180  void SetRxHighestSupportedLgiDataRate (uint16_t supportedDatarate);
186  void SetTxHighestSupportedLgiDataRate (uint16_t supportedDatarate);
194  bool IsSupportedMcs (uint8_t mcs, uint8_t nss) const;
195 
201  uint16_t GetRxHighestSupportedLgiDataRate () const;
202 
209  bool IsSupportedTxMcs (uint8_t mcs) const;
216  bool IsSupportedRxMcs (uint8_t mcs) const;
217 
223  uint32_t GetMaxAmpduLength (void) const;
224 
225 
226 private:
227  //Capabilities Info fields
228  uint8_t m_maxMpduLength;
230  uint8_t m_rxLdpc;
233  uint8_t m_txStbc;
234  uint8_t m_rxStbc;
241  uint8_t m_vhtTxopPs;
242  uint8_t m_htcVhtCapable;
247 
248  //MCS and NSS field information
249  std::vector<uint8_t> m_rxMcsMap;
251  std::vector<uint8_t> m_txMcsMap;
253 
255  uint8_t m_vhtSupported;
256 };
257 
266 std::ostream &operator << (std::ostream &os, const VhtCapabilities &vhtCapabilities);
267 
268 } //namespace ns3
269 
270 #endif /* VHT_CAPABILITY_H */
ns3::VhtCapabilities::m_txMcsMap
std::vector< uint8_t > m_txMcsMap
transmit MCS map
Definition: vht-capabilities.h:251
ns3::VhtCapabilities::m_rxAntennaPatternConsistency
uint8_t m_rxAntennaPatternConsistency
receive antenna pattern consistency
Definition: vht-capabilities.h:245
ns3::VhtCapabilities::DeserializeInformationField
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition: vht-capabilities.cc:111
ns3::VhtCapabilities
The IEEE 802.11ac VHT Capabilities.
Definition: vht-capabilities.h:35
ns3::VhtCapabilities::m_vhtLinkAdaptationCapable
uint8_t m_vhtLinkAdaptationCapable
VHT link adaptation capable.
Definition: vht-capabilities.h:244
ns3::VhtCapabilities::SetVhtCapabilitiesInfo
void SetVhtCapabilitiesInfo(uint32_t ctrl)
Set the VHT Capabilities Info field in the VHT Capabilities information element.
Definition: vht-capabilities.cc:123
ns3::VhtCapabilities::m_muBeamformeeCapable
uint8_t m_muBeamformeeCapable
MU beamformee capable.
Definition: vht-capabilities.h:240
ns3::VhtCapabilities::m_suBeamformeeCapable
uint8_t m_suBeamformeeCapable
SU beamformee capable.
Definition: vht-capabilities.h:236
ns3::VhtCapabilities::m_txHighestSupportedLongGuardIntervalDataRate
uint16_t m_txHighestSupportedLongGuardIntervalDataRate
transmit highest supported long guard interval data rate
Definition: vht-capabilities.h:252
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::VhtCapabilities::IsSupportedTxMcs
bool IsSupportedTxMcs(uint8_t mcs) const
Returns true if transmit MCS is supported.
Definition: vht-capabilities.cc:296
ns3::VhtCapabilities::SetSupportedChannelWidthSet
void SetSupportedChannelWidthSet(uint8_t channelWidthSet)
Set the supported channel width set.
Definition: vht-capabilities.cc:230
ns3::VhtCapabilities::m_shortGuardIntervalFor80Mhz
uint8_t m_shortGuardIntervalFor80Mhz
short guard interval for 80 MHz
Definition: vht-capabilities.h:231
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standard.
Definition: wifi-information-element.h:234
ns3::VhtCapabilities::SetRxMcsMap
void SetRxMcsMap(uint8_t mcs, uint8_t nss)
Definition: vht-capabilities.cc:280
ns3::VhtCapabilities::SetRxStbc
void SetRxStbc(uint8_t rxStbc)
Set the receive STBC.
Definition: vht-capabilities.cc:254
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition: wifi-information-element.h:40
ns3::VhtCapabilities::m_supportedChannelWidthSet
uint8_t m_supportedChannelWidthSet
supported channel width set
Definition: vht-capabilities.h:229
ns3::VhtCapabilities::m_txAntennaPatternConsistency
uint8_t m_txAntennaPatternConsistency
transmit antenna pattern consistency
Definition: vht-capabilities.h:246
ns3::VhtCapabilities::SetRxLdpc
void SetRxLdpc(uint8_t rxLdpc)
Set the receive LDPC.
Definition: vht-capabilities.cc:236
ns3::VhtCapabilities::GetTxStbc
uint8_t GetTxStbc() const
Get the transmit STBC.
Definition: vht-capabilities.cc:382
ns3::VhtCapabilities::m_muBeamformerCapable
uint8_t m_muBeamformerCapable
MU beamformer capable.
Definition: vht-capabilities.h:239
visualizer.core.start
def start()
Definition: core.py:1855
ns3::VhtCapabilities::m_rxHighestSupportedLongGuardIntervalDataRate
uint16_t m_rxHighestSupportedLongGuardIntervalDataRate
receive highest supported long guard interval data rate
Definition: vht-capabilities.h:250
ns3::VhtCapabilities::SetShortGuardIntervalFor80Mhz
void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval)
Set the short guard interval 80 MHz.
Definition: vht-capabilities.cc:242
ns3::VhtCapabilities::m_txStbc
uint8_t m_txStbc
transmit STBC
Definition: vht-capabilities.h:233
ns3::VhtCapabilities::GetInformationFieldSize
uint8_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition: vht-capabilities.cc:72
ns3::VhtCapabilities::m_suBeamformerCapable
uint8_t m_suBeamformerCapable
SU beamformer capable.
Definition: vht-capabilities.h:235
ns3::VhtCapabilities::m_beamformeeStsCapable
uint8_t m_beamformeeStsCapable
beamformee STS capable
Definition: vht-capabilities.h:237
ns3::VhtCapabilities::GetMaxMpduLength
uint16_t GetMaxMpduLength(void) const
Get the maximum MPDU length.
Definition: vht-capabilities.cc:346
ns3::VhtCapabilities::SetMaxAmpduLength
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
Definition: vht-capabilities.cc:266
ns3::VhtCapabilities::GetRxHighestSupportedLgiDataRate
uint16_t GetRxHighestSupportedLgiDataRate() const
Get the receive highest supported LGI data rate.
Definition: vht-capabilities.cc:413
ns3::VhtCapabilities::m_htcVhtCapable
uint8_t m_htcVhtCapable
HTC VHT capable.
Definition: vht-capabilities.h:242
ns3::VhtCapabilities::SetTxMcsMap
void SetTxMcsMap(uint8_t mcs, uint8_t nss)
Definition: vht-capabilities.cc:288
ns3::VhtCapabilities::ElementId
WifiInformationElementId ElementId() const override
Definition: vht-capabilities.cc:60
ns3::VhtCapabilities::GetVhtCapabilitiesInfo
uint32_t GetVhtCapabilitiesInfo() const
Return the VHT Capabilities Info field in the VHT Capabilities information element.
Definition: vht-capabilities.cc:147
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition: buffer.h:99
ns3::VhtCapabilities::SetVhtSupported
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported field.
Definition: vht-capabilities.cc:66
ns3::VhtCapabilities::SetTxHighestSupportedLgiDataRate
void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the transmit highest supported LGI data rate.
Definition: vht-capabilities.cc:340
ns3::VhtCapabilities::m_numberOfSoundingDimensions
uint8_t m_numberOfSoundingDimensions
number of sounding dimensions
Definition: vht-capabilities.h:238
ns3::VhtCapabilities::GetRxStbc
uint8_t GetRxStbc() const
Get the receive STBC.
Definition: vht-capabilities.cc:376
ns3::VhtCapabilities::m_rxStbc
uint8_t m_rxStbc
receive STBC
Definition: vht-capabilities.h:234
ns3::VhtCapabilities::IsSupportedRxMcs
bool IsSupportedRxMcs(uint8_t mcs) const
Returns true if receive MCS is supported.
Definition: vht-capabilities.cc:315
ns3::VhtCapabilities::m_rxLdpc
uint8_t m_rxLdpc
receive LDPC
Definition: vht-capabilities.h:230
ns3::VhtCapabilities::GetSupportedChannelWidthSet
uint8_t GetSupportedChannelWidthSet() const
Get the supported channel width set.
Definition: vht-capabilities.cc:364
ns3::VhtCapabilities::SetSupportedMcsAndNssSet
void SetSupportedMcsAndNssSet(uint64_t ctrl)
Set the MCS and NSS field in the VHT Capabilities information element.
Definition: vht-capabilities.cc:173
ns3::VhtCapabilities::IsSupportedMcs
bool IsSupportedMcs(uint8_t mcs, uint8_t nss) const
Get the is MCS supported.
Definition: vht-capabilities.cc:394
ns3::VhtCapabilities::m_vhtTxopPs
uint8_t m_vhtTxopPs
VHT TXOP PS.
Definition: vht-capabilities.h:241
ns3::VhtCapabilities::m_rxMcsMap
std::vector< uint8_t > m_rxMcsMap
receive MCS map
Definition: vht-capabilities.h:249
ns3::VhtCapabilities::m_maxAmpduLengthExponent
uint8_t m_maxAmpduLengthExponent
maximum A-MPDU length exponent
Definition: vht-capabilities.h:243
ns3::VhtCapabilities::GetRxLdpc
uint8_t GetRxLdpc() const
Get the receive LDPC.
Definition: vht-capabilities.cc:370
ns3::VhtCapabilities::m_shortGuardIntervalFor160Mhz
uint8_t m_shortGuardIntervalFor160Mhz
short guard interval for 160 MHz
Definition: vht-capabilities.h:232
ns3::VhtCapabilities::SetRxHighestSupportedLgiDataRate
void SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the receive highest supported LGI data rate.
Definition: vht-capabilities.cc:334
ns3::VhtCapabilities::m_maxMpduLength
uint8_t m_maxMpduLength
maximum MPDU length
Definition: vht-capabilities.h:228
ns3::VhtCapabilities::VhtCapabilities
VhtCapabilities()
Definition: vht-capabilities.cc:26
ns3::VhtCapabilities::SetShortGuardIntervalFor160Mhz
void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval)
Set the short guard interval 160 MHz.
Definition: vht-capabilities.cc:248
ns3::VhtCapabilities::SetMaxMpduLength
void SetMaxMpduLength(uint16_t length)
Set the maximum MPDU length.
Definition: vht-capabilities.cc:211
ns3::VhtCapabilities::SetTxStbc
void SetTxStbc(uint8_t txStbc)
Set the transmit STBC.
Definition: vht-capabilities.cc:260
ns3::VhtCapabilities::GetMaxAmpduLength
uint32_t GetMaxAmpduLength(void) const
Return the maximum A-MPDU length.
Definition: vht-capabilities.cc:388
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition: angles.cc:137
ns3::VhtCapabilities::GetSerializedSize
uint16_t GetSerializedSize() const override
Get the size of the serialized IE including Element ID and length fields.
Definition: vht-capabilities.cc:90
ns3::VhtCapabilities::Serialize
Buffer::Iterator Serialize(Buffer::Iterator start) const override
Serialize entire IE including Element ID and length fields.
Definition: vht-capabilities.cc:80
ns3::VhtCapabilities::SerializeInformationField
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition: vht-capabilities.cc:100
ns3::VhtCapabilities::m_vhtSupported
uint8_t m_vhtSupported
This is used to decide if this element should be added to the frame or not.
Definition: vht-capabilities.h:255
ns3::VhtCapabilities::GetSupportedMcsAndNssSet
uint64_t GetSupportedMcsAndNssSet() const
Return the MCS and NSS field in the VHT Capabilities information element.
Definition: vht-capabilities.cc:191