A Discrete-Event Network Simulator
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
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  */
27 namespace ns3 {
35 {
36 public:
37  VhtCapabilities ();
39  // Implementations of pure virtual methods of WifiInformationElement
41  uint8_t GetInformationFieldSize () const;
43  uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
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;
56  void SetVhtSupported (uint8_t vhtSupported);
63  void SetVhtCapabilitiesInfo (uint32_t ctrl);
69  void SetSupportedMcsAndNssSet (uint64_t ctrl);
76  uint32_t GetVhtCapabilitiesInfo () const;
82  uint64_t GetSupportedMcsAndNssSet () const;
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);
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;
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;
201  uint16_t GetRxHighestSupportedLgiDataRate () const;
209  bool IsSupportedTxMcs (uint8_t mcs) const;
216  bool IsSupportedRxMcs (uint8_t mcs) const;
223  uint32_t GetMaxAmpduLength (void) const;
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;
248  //MCS and NSS field information
249  std::vector<uint8_t> m_rxMcsMap;
251  std::vector<uint8_t> m_txMcsMap;
255  uint8_t m_vhtSupported;
256 };
266 std::ostream &operator << (std::ostream &os, const VhtCapabilities &vhtcapabilities);
268 } //namespace ns3
270 #endif /* VHT_CAPABILITY_H */
uint8_t m_numberOfSoundingDimensions
number of sounding dimensions
void SetTxStbc(uint8_t txStbc)
Set the transmit STBC.
Buffer::Iterator Serialize(Buffer::Iterator start) const
uint8_t m_shortGuardIntervalFor160Mhz
short guard interval for 160 MHz
void SetSupportedChannelWidthSet(uint8_t channelWidthSet)
Set the supported channel width set.
uint8_t m_rxLdpc
receive LDPC
uint8_t m_muBeamformeeCapable
MU beamformee capable.
def start()
Definition: core.py:1855
uint8_t GetTxStbc() const
Get the transmit STBC.
bool IsSupportedTxMcs(uint8_t mcs) const
Returns true if transmit MCS is supported.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
uint8_t m_maxAmpduLengthExponent
maximum A-MPDU length exponent
uint8_t m_htcVhtCapable
HTC VHT capable.
uint16_t m_rxHighestSupportedLongGuardIntervalDataRate
receive highest supported long guard interval data rate
uint32_t GetMaxAmpduLength(void) const
Return the maximum A-MPDU length.
uint8_t m_vhtLinkAdaptationCapable
VHT link adaptation capable.
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
uint16_t GetRxHighestSupportedLgiDataRate() const
Get the receive highest supported LGI data rate.
void SetSupportedMcsAndNssSet(uint64_t ctrl)
Set the MCS and NSS field in the VHT Capabilities information element.
std::vector< uint8_t > m_rxMcsMap
receive MCS map
iterator in a Buffer instance
Definition: buffer.h:98
uint8_t GetRxStbc() const
Get the receive STBC.
void SetVhtSupported(uint8_t vhtSupported)
Set the VHT supported field.
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
uint16_t GetSerializedSize() const
uint8_t m_txStbc
transmit STBC
std::vector< uint8_t > m_txMcsMap
transmit MCS map
The IEEE 802.11ac VHT Capabilities.
uint8_t m_rxAntennaPatternConsistency
receive antenna pattern consistency
uint8_t GetSupportedChannelWidthSet() const
Get the supported channel width set.
WifiInformationElementId ElementId() const
bool IsSupportedMcs(uint8_t mcs, uint8_t nss) const
Get the is MCS supported.
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
void SetRxStbc(uint8_t rxStbc)
Set the receive STBC.
uint8_t m_txAntennaPatternConsistency
transmit antenna pattern consistency
uint8_t m_shortGuardIntervalFor80Mhz
short guard interval for 80 MHz
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetShortGuardIntervalFor80Mhz(uint8_t shortGuardInterval)
Set the short guard interval 80 MHz.
void SetRxLdpc(uint8_t rxLdpc)
Set the receive LDPC.
void SetMaxMpduLength(uint16_t length)
Set the maximum MPDU length.
uint8_t m_suBeamformerCapable
SU beamformer capable.
uint8_t GetRxLdpc() const
Get the receive LDPC.
uint8_t m_beamformeeStsCapable
beamformee STS capable
void SetRxMcsMap(uint8_t mcs, uint8_t nss)
uint16_t m_txHighestSupportedLongGuardIntervalDataRate
transmit highest supported long guard interval data rate
uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
bool IsSupportedRxMcs(uint8_t mcs) const
Returns true if receive MCS is supported.
void SetShortGuardIntervalFor160Mhz(uint8_t shortGuardInterval)
Set the short guard interval 160 MHz.
uint32_t GetVhtCapabilitiesInfo() const
Return the VHT Capabilities Info field in the VHT Capabilities information element.
uint8_t m_vhtTxopPs
uint8_t m_supportedChannelWidthSet
supported channel width set
uint8_t m_muBeamformerCapable
MU beamformer capable.
uint16_t GetMaxMpduLength(void) const
Get the maximum MPDU length.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
uint8_t m_suBeamformeeCapable
SU beamformee capable.
void SetRxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the receive highest supported LGI data rate.
uint8_t m_maxMpduLength
maximum MPDU length
uint64_t GetSupportedMcsAndNssSet() const
Return the MCS and NSS field in the VHT Capabilities information element.
uint8_t m_rxStbc
receive STBC
void SetTxHighestSupportedLgiDataRate(uint16_t supportedDatarate)
Set the transmit highest supported LGI data rate.
void SetTxMcsMap(uint8_t mcs, uint8_t nss)
void SetVhtCapabilitiesInfo(uint32_t ctrl)
Set the VHT Capabilities Info field in the VHT Capabilities information element.
uint8_t m_vhtSupported
This is used to decide if this element should be added to the frame or not.