A Discrete-Event Network Simulator
API
ht-capabilities.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013
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 HT_CAPABILITIES_H
23 #define HT_CAPABILITIES_H
24 
26 
31 #define MAX_SUPPORTED_MCS (77)
32 
33 namespace ns3 {
34 
42 {
43 public:
44  HtCapabilities ();
45 
46  // Implementations of pure virtual methods of WifiInformationElement
48  uint8_t GetInformationFieldSize () const;
51  uint8_t length);
52  /* This information element is a bit special in that it is only
53  included if the STA is an HT STA. To support this we
54  override the Serialize and GetSerializedSize methods of
55  WifiInformationElement. */
57  uint16_t GetSerializedSize () const;
58 
64  void SetHtSupported (uint8_t htSupported);
65 
71  void SetHtCapabilitiesInfo (uint16_t ctrl);
77  void SetAmpduParameters (uint8_t ctrl);
84  void SetSupportedMcsSet (uint64_t ctrl1, uint64_t ctrl2);
90  void SetExtendedHtCapabilities (uint16_t ctrl);
96  void SetTxBfCapabilities (uint32_t ctrl);
102  void SetAntennaSelectionCapabilities (uint8_t ctrl);
103 
109  void SetLdpc (uint8_t ldpc);
115  void SetSupportedChannelWidth (uint8_t supportedChannelWidth);
121  void SetGreenfield (uint8_t greenfield);
127  void SetShortGuardInterval20 (uint8_t shortGuardInterval);
133  void SetShortGuardInterval40 (uint8_t shortGuardInterval);
139  void SetMaxAmsduLength (uint16_t maxAmsduLength);
145  void SetLSigProtectionSupport (uint8_t lSigProtection);
146 
152  void SetMaxAmpduLength (uint32_t maxAmpduLength);
153 
159  void SetRxMcsBitmask (uint8_t index);
165  void SetRxHighestSupportedDataRate (uint16_t maxSupportedRate);
171  void SetTxMcsSetDefined (uint8_t txMcsSetDefined);
177  void SetTxRxMcsSetUnequal (uint8_t txRxMcsSetUnequal);
183  void SetTxMaxNSpatialStreams (uint8_t maxTxSpatialStreams);
189  void SetTxUnequalModulation (uint8_t txUnequalModulation);
190 
196  uint16_t GetHtCapabilitiesInfo (void) const;
202  uint8_t GetAmpduParameters (void) const;
208  uint64_t GetSupportedMcsSet1 (void) const;
214  uint64_t GetSupportedMcsSet2 (void) const;
220  uint16_t GetExtendedHtCapabilities (void) const;
226  uint32_t GetTxBfCapabilities (void) const;
232  uint8_t GetAntennaSelectionCapabilities (void) const;
233 
239  uint8_t GetLdpc (void) const;
245  uint8_t GetSupportedChannelWidth (void) const;
251  uint8_t GetGreenfield (void) const;
257  uint8_t GetShortGuardInterval20 (void) const;
263  uint16_t GetMaxAmsduLength (void) const;
269  uint32_t GetMaxAmpduLength (void) const;
277  bool IsSupportedMcs (uint8_t mcs) const;
283  uint8_t GetRxHighestSupportedAntennas (void) const;
284 
285 
286 private:
287  //HT Capabilities Info field
288  uint8_t m_ldpc;
290  uint8_t m_smPowerSave;
291  uint8_t m_greenField;
294  uint8_t m_txStbc;
295  uint8_t m_rxStbc;
298  uint8_t m_dssMode40;
299  uint8_t m_psmpSupport;
302 
303  //A-MPDU Parameters field
306  uint8_t m_ampduReserved;
307 
308  //Supported MCS Set field
316  uint32_t m_reservedMcsSet3;
318 
319  //HT Extended Capabilities field
320  uint8_t m_pco;
323  uint8_t m_mcsFeedback;
324  uint8_t m_htcSupport;
327 
328  //Transmit Beamforming Capabilities field
332  uint8_t m_rxNdpCapable;
333  uint8_t m_txNdpCapable;
335  uint8_t m_calibration;
348  uint8_t m_reservedTxBf;
349 
350  //ASEL Capabilities field
356  uint8_t m_rxASelCapable;
358  uint8_t m_reservedASel;
359 
361  uint8_t m_htSupported;
362 };
363 
372 std::ostream &operator << (std::ostream &os, const HtCapabilities &htcapabilities);
373 
374 } //namespace ns3
375 
376 #endif /* HT_CAPABILITY_H */
uint8_t m_psmpSupport
PSMP support.
uint8_t m_rxMcsBitmask[MAX_SUPPORTED_MCS]
receive MCS bitmask
uint8_t GetGreenfield(void) const
Return the Greenfield field.
uint8_t m_dssMode40
DSS mode 40.
uint32_t GetTxBfCapabilities(void) const
Return the Transmit Beamforming (TxBF) Capabilities field in the HT Capabilities information element...
void SetTxMcsSetDefined(uint8_t txMcsSetDefined)
Set the transmit MCS set defined.
Buffer::Iterator Serialize(Buffer::Iterator start) const
uint8_t m_reservedTxBf
reserved transmit BF
uint8_t m_mcsFeedback
MCS feedback.
uint8_t m_rxStaggeredSoundingCapable
receive staggered sounding capable
uint32_t m_reservedMcsSet3
reserved MCS set 3
void SetGreenfield(uint8_t greenfield)
Set the Greenfield field.
void SetTxBfCapabilities(uint32_t ctrl)
Set the Transmit Beamforming (TxBF) Capabilities field in the HT Capabilities information element...
uint8_t m_explicitNoncompressedSteeringCapable
explicit non compressed steeering capable
uint8_t m_supportedChannelWidth
supported channel width
#define MAX_SUPPORTED_MCS
This defines the maximum number of supported MCSs that a STA is allowed to have.
uint8_t m_antennaIndicesFeedbackCapable
antenna indices feedback capable
uint64_t GetSupportedMcsSet2(void) const
Return the last 64 bytes of the Supported MCS Set field in the HT Capabilities information element...
WifiInformationElementId ElementId() const
uint8_t m_reservedExtendedCapabilities2
reserver extended capabilities 2
void SetShortGuardInterval40(uint8_t shortGuardInterval)
Set the short guard interval 40 field.
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
def start()
Definition: core.py:1855
void SetLSigProtectionSupport(uint8_t lSigProtection)
Set the LSIG protection support.
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
uint8_t GetAntennaSelectionCapabilities(void) const
Return the Antenna Selection (ASEL) Capabilities field in the HT Capabilities information element...
uint8_t m_reverseDirectionResponder
reverse direction responder
uint8_t GetSupportedChannelWidth(void) const
Return the supported channel width.
uint8_t m_shortGuardInterval40
short guard interval 40 MHz
void SetAmpduParameters(uint8_t ctrl)
Set the A-MPDU Parameters field in the HT Capabilities information element.
uint8_t m_txSoundingPpdusCapable
sounding PPDUS capable
uint8_t m_fortyMhzIntolerant
40 MHz intolerant
iterator in a Buffer instance
Definition: buffer.h:98
void SetMaxAmpduLength(uint32_t maxAmpduLength)
Set the maximum AMPDU length.
uint8_t m_txMcsSetDefined
transmit MCS set defined
uint8_t m_rxNdpCapable
receive NDP capable
Information element, as defined in 802.11-2007 standardThe IEEE 802.11 standard includes the notion o...
uint8_t m_txStbc
transmit STBC
uint8_t GetRxHighestSupportedAntennas(void) const
Return the receive highest supported antennas.
uint8_t m_txStaggeredSoundingCapable
transmit staggered sounding capable
bool IsSupportedMcs(uint8_t mcs) const
Return the is MCS supported flag.
uint8_t GetLdpc(void) const
Return LDPC.
uint8_t GetAmpduParameters(void) const
Return the A-MPDU Parameters field in the HT Capabilities information element.
uint8_t m_txMaxNSpatialStreams
transmit maximum number spatial streams
uint8_t m_csiNBfAntennasSupported
CSI NBF antenna supported.
uint8_t m_htSupported
This is used to decide whether this element should be added to the frame or not.
uint16_t m_rxHighestSupportedDataRate
receive highest supported data rate
uint8_t m_implicitTxBfCapable
implicit transmit BF capable
uint8_t m_greenField
Greenfield.
uint8_t m_antennaSelectionCapability
antenna selection capability
void SetTxRxMcsSetUnequal(uint8_t txRxMcsSetUnequal)
Set the transmit / receive MCS set unequal.
uint8_t m_reservedMcsSet1
reserved MCS set 1
uint8_t m_reservedMcsSet2
reserved MCS set 2
uint8_t m_channelEstimationCapability
channel estimation capability
void SetRxHighestSupportedDataRate(uint16_t maxSupportedRate)
Set the receive highest supported data rate.
uint8_t m_reservedASel
reserved ASEL
uint8_t m_htDelayedBlockAck
HT delayed block ack.
void SerializeInformationField(Buffer::Iterator start) const
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) ...
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
uint8_t m_smPowerSave
SM power save.
uint16_t GetSerializedSize() const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t m_implicitRxBfCapable
implicit receive BF capable
uint8_t m_explicitCompressedBfFeedbackCapable
explicit compressed BF feedback capable
uint8_t m_maxAmsduLength
maximum A-MSDU length
uint8_t m_ampduReserved
A-MPDU reserved.
uint8_t m_htcSupport
HTC support.
uint8_t m_txRxMcsSetUnequal
transmit / receive MCS set unequal
void SetTxUnequalModulation(uint8_t txUnequalModulation)
Set the transmit unequal modulation.
uint8_t m_rxASelCapable
receive antenna selection capable
void SetSupportedMcsSet(uint64_t ctrl1, uint64_t ctrl2)
Set the Supported MCS Set field in the HT Capabilities information element.
uint16_t GetMaxAmsduLength(void) const
Return the maximum A-MSDU length.
void SetExtendedHtCapabilities(uint16_t ctrl)
Set the Extended HT Capabilities field in the HT Capabilities information element.
void SetMaxAmsduLength(uint16_t maxAmsduLength)
Set the maximum AMSDU length.
void SetAntennaSelectionCapabilities(uint8_t ctrl)
Set the the Antenna Selection (ASEL) Capabilities field in the HT Capabilities information element...
void SetHtCapabilitiesInfo(uint16_t ctrl)
Set the HT Capabilities Info field in the HT Capabilities information element.
uint8_t m_rxStbc
receive STBC
uint64_t GetSupportedMcsSet1(void) const
Return the first 64 bytes of the Supported MCS Set field in the HT Capabilities information element...
uint32_t GetMaxAmpduLength(void) const
Return the maximum A-MPDU length.
uint8_t m_noncompressedSteeringNBfAntennasSupported
non compressed steering NBF antenna supported
uint8_t m_explicitCsiTxBfCapable
explicit CSI transmit BF capable
uint8_t m_compressedSteeringNBfAntennasSupported
compressed steering NBF antenna supported
uint8_t m_explicitCsiFeedbackBasedTxASelCapable
explicit CSI feedback based transmit antenna selection capable
void SetSupportedChannelWidth(uint8_t supportedChannelWidth)
Set the supported channel width field.
uint8_t m_minMpduStartSpace
minimum MPDU start space
uint8_t m_explicitCsiFeedbackCapable
explicit CSI feedback capable
uint8_t m_maxAmpduLengthExponent
maximum A-MPDU length
uint8_t GetShortGuardInterval20(void) const
Return the short guard interval 20 value.
uint8_t m_ldpc
LDPC.
void SetLdpc(uint8_t ldpc)
Set the LDPC field.
void SetShortGuardInterval20(uint8_t shortGuardInterval)
Set the short guard interval 20 field.
uint8_t m_csiMaxNRowsBfSupported
CSI maximum number rows BF supported.
uint8_t m_pcoTransitionTime
PCO transition time.
uint8_t m_txUnequalModulation
transmit unequal modulation
uint8_t GetInformationFieldSize() const
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
uint8_t m_explicitTxBfCsiFeedback
explicit transmit BF CSI feedback
uint8_t m_minimalGrouping
minimal grouping
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
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) ...
void SetTxMaxNSpatialStreams(uint8_t maxTxSpatialStreams)
Set the transmit maximum N spatial streams.
uint8_t m_shortGuardInterval20
short guard interval 20 MHz
uint8_t m_txNdpCapable
transmit NDP capable
uint8_t m_reservedExtendedCapabilities
reserved extended capabilities
uint16_t GetHtCapabilitiesInfo(void) const
Return the HT Capabilities Info field in the HT Capabilities information element. ...
uint16_t GetExtendedHtCapabilities(void) const
Return the Extended HT Capabilities field in the HT Capabilities information element.
uint8_t m_lsigProtectionSupport
L-SIG protection support.
uint8_t m_calibration
calibration
uint8_t m_explicitNoncompressedBfFeedbackCapable
explicit non compressed BF feedback capable
uint8_t m_explicitCompressedSteeringCapable
explicit compressed steeering capable
uint8_t m_antennaIndicesFeedbackBasedTxASelCapable
antenna indices feedback based transmit antenna selection capable
void SetHtSupported(uint8_t htSupported)
Set the HT supported field.