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/buffer.h"
27 
28 namespace ns3 {
29 
36 {
37 public:
38  VhtCapabilities ();
44  void SetVhtSupported (uint8_t vhtsupported);
45 
57  uint8_t GetInformationFieldSize () const;
71  uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length);
72 
78  void SetVhtCapabilitiesInfo (uint32_t ctrl);
84  void SetSupportedMcsAndNssSet (uint64_t ctrl);
85 
91  uint32_t GetVhtCapabilitiesInfo () const;
97  uint64_t GetSupportedMcsAndNssSet () const;
98 
99  //Capabilities Info fields
105  void SetMaxMpduLength (uint8_t length);
111  void SetSupportedChannelWidthSet (uint8_t channelwidthset);
117  void SetRxLdpc (uint8_t rxldpc);
123  void SetShortGuardIntervalFor80Mhz (uint8_t shortguardinterval);
129  void SetShortGuardIntervalFor160Mhz (uint8_t shortguardinterval);
135  void SetRxStbc (uint8_t rxstbc);
141  void SetTxStbc (uint8_t txstbc);
147  void SetMaxAmpduLengthExponent (uint8_t exponent);
148 
154  uint8_t GetMaxMpduLength () const;
160  uint8_t GetSupportedChannelWidthSet () const;
166  uint8_t GetRxLdpc () const;
172  uint8_t GetShortGuardIntervalFor80Mhz () const;
178  uint8_t GetShortGuardIntervalFor160Mhz () const;
184  uint8_t GetRxStbc () const;
190  uint8_t GetTxStbc () const;
196  uint8_t GetMaxAmpduLengthExponent () const;
197 
198  // MCS and NSS field information
199  // For each value of NSS ranging from 1 to 8, we need to encode two bits.
200  // The value 0 indicates that the maximum MCS for that spatial stream is 7.
201  // The value 1 indicates that the maximum MCS for that spatial stream is 8.
202  // The value 2 indicates that the maximum MCS for that spatial stream is 9.
203  //
204  // The maps may be set all at once by passing in a 16-bit field corresponding
205  // to the above, or incrementally for each NSS separately, where the
206  // MCS value must be in the range 7-9.
210  void SetRxMcsMap (uint16_t map);
215  void SetRxMcsMap (uint8_t mcs, uint8_t nss);
219  void SetTxMcsMap (uint16_t map);
224  void SetTxMcsMap (uint8_t mcs, uint8_t nss);
230  void SetRxHighestSupportedLgiDataRate (uint16_t supporteddatarate);
236  void SetTxHighestSupportedLgiDataRate (uint16_t supporteddatarate);
244  bool IsSupportedMcs (uint8_t mcs, uint8_t Nss) const;
245 
251  uint16_t GetRxMcsMap () const;
257  uint16_t GetTxMcsMap () const;
263  uint16_t GetRxHighestSupportedLgiDataRate () const;
269  uint16_t GetTxHighestSupportedLgiDataRate () const;
270 
277  bool IsSupportedTxMcs (uint8_t mcs) const;
284  bool IsSupportedRxMcs (uint8_t mcs) const;
285 
301  uint16_t GetSerializedSize () const;
302 
303 
304 private:
305  //Capabilities Info fields
306  uint16_t m_maxMpduLength;
308  uint8_t m_rxLdpc;
311  uint8_t m_txStbc;
312  uint8_t m_rxStbc;
319  uint8_t m_vhtTxopPs;
320  uint8_t m_htcVhtCapable;
325 
326  //MCS and NSS field information
327  std::vector<uint8_t> m_rxMcsMap;
329  std::vector<uint8_t> m_txMcsMap;
331 
333  uint8_t m_vhtSupported;
334 };
335 
336 std::ostream &operator << (std::ostream &os, const VhtCapabilities &vhtcapabilities);
337 std::istream &operator >> (std::istream &is, VhtCapabilities &vhtcapabilities);
338 
340 
341 } //namespace ns3
342 
343 #endif /* VHT_CAPABILITY_H */
uint8_t m_numberOfSoundingDimensions
number of sounding dimensions
uint32_t GetVhtCapabilitiesInfo() const
Return the VHT Capabilties Info field in the VHT Capabilities information element.
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
Definition: angles.cc:48
void SetShortGuardIntervalFor80Mhz(uint8_t shortguardinterval)
Set the short guard interval 80 Mhz.
bool IsSupportedTxMcs(uint8_t mcs) const
Get the is transmit MCS supported.
uint8_t m_shortGuardIntervalFor160Mhz
short guard interval 160 MHz
uint16_t GetTxMcsMap() const
Get the transmit MCS map.
uint16_t GetTxHighestSupportedLgiDataRate() const
Get the transmit highest supported LGI data rate.
uint8_t GetSupportedChannelWidthSet() const
Get the supported channel width set.
uint8_t m_rxLdpc
receive LDPC
void SetTxMcsMap(uint16_t map)
uint8_t m_muBeamformeeCapable
MU beam formee capable.
void SetMaxMpduLength(uint8_t length)
Set the maximum MPDU length.
def start()
Definition: core.py:1790
uint8_t m_maxAmpduLengthExponent
maximum AMPDU length exponent
uint8_t m_htcVhtCapable
HTC VHT capable.
uint16_t m_rxHighestSupportedLongGuardIntervalDataRate
receive highest supported long guard interval data rate
uint8_t GetMaxMpduLength() const
Get the maximum MPDU length.
uint8_t GetShortGuardIntervalFor160Mhz() const
Get the short guard interval 80 MHz.
void SetVhtSupported(uint8_t vhtsupported)
Set the VHT supported field.
void SetRxLdpc(uint8_t rxldpc)
Set the receive LDPC.
uint8_t m_vhtLinkAdaptationCapable
VHT link adaptation capable.
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Deserialize the information field.
void SetSupportedMcsAndNssSet(uint64_t ctrl)
Set the MCS and NSS field in the VHT Capabilities information element.
uint8_t GetRxStbc() const
Get the receive STBC.
std::vector< uint8_t > m_rxMcsMap
receive MCS map
void SetShortGuardIntervalFor160Mhz(uint8_t shortguardinterval)
Set the short guard interval 160 Mhz.
iterator in a Buffer instance
Definition: buffer.h:98
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
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
void SetTxHighestSupportedLgiDataRate(uint16_t supporteddatarate)
Set the transmit highest supported LGI data rate.
uint16_t GetRxMcsMap() const
Get the receive MCS map.
void SetSupportedChannelWidthSet(uint8_t channelwidthset)
Set the supported channel width set.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
uint8_t m_txAntennaPatternConsistency
transmit antenna pattern consistency
uint8_t m_shortGuardIntervalFor80Mhz
short guard interval 80 MHz
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t GetInformationFieldSize() const
Return the information field size.
uint8_t m_suBeamformerCapable
SU beam former capable.
void SetRxStbc(uint8_t rxstbc)
Set the receive STBC.
uint8_t GetMaxAmpduLengthExponent() const
Get the maximum AMPDU length exponent.
uint8_t GetShortGuardIntervalFor80Mhz() const
Get the short guard interval 80 MHz.
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an VHT STA...
uint8_t m_beamformeeStsCapable
beam formee STS capable
uint16_t m_txHighestSupportedLongGuardIntervalDataRate
transmit highest supported long guard interval data rate
void SetRxHighestSupportedLgiDataRate(uint16_t supporteddatarate)
Set the receive highest supported LGI data rate.
void SetRxMcsMap(uint16_t map)
uint16_t GetSerializedSize() const
Get the serialized size.
uint8_t m_vhtTxopPs
VHT TXOP PS.
uint64_t GetSupportedMcsAndNssSet() const
Return the MCS and NSS field in the VHT Capabilities information element.
uint8_t m_muBeamformerCapable
MU beam former capable.
bool IsSupportedRxMcs(uint8_t mcs) const
Get the is receive MCS supported.
bool IsSupportedMcs(uint8_t mcs, uint8_t Nss) const
Get the is MCS supported.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
uint8_t m_suBeamformeeCapable
SU beam formee capable.
WifiInformationElementId ElementId() const
Return the element ID.
uint8_t GetTxStbc() const
Get the transmit STBC.
uint8_t GetRxLdpc() const
Get the receive LDPC.
uint16_t m_supportedChannelWidthSet
supported channel width set
uint16_t m_maxMpduLength
maximum MPDU length
uint16_t GetRxHighestSupportedLgiDataRate() const
Get the receive highest supported LGI data rate.
void SerializeInformationField(Buffer::Iterator start) const
Serialize the information field.
uint8_t m_rxStbc
receive STBC
void SetTxStbc(uint8_t txstbc)
Set the transmit STBC.
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type.
void SetVhtCapabilitiesInfo(uint32_t ctrl)
Set the VHT Capabilties 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.
void SetMaxAmpduLengthExponent(uint8_t exponent)
Set the maximum AMPDU length exponent.