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 
44 {
45 public:
46  HtCapabilities ();
52  void SetHtSupported (uint8_t htsupported);
53 
59  void SetHtCapabilitiesInfo (uint16_t ctrl);
65  void SetAmpduParameters (uint8_t ctrl);
72  void SetSupportedMcsSet (uint64_t ctrl1, uint64_t ctrl2);
78  void SetExtendedHtCapabilities (uint16_t ctrl);
84  void SetTxBfCapabilities (uint32_t ctrl);
90  void SetAntennaSelectionCapabilities (uint8_t ctrl);
91 
97  void SetLdpc (uint8_t ldpc);
103  void SetSupportedChannelWidth (uint8_t supportedchannelwidth);
109  void SetGreenfield (uint8_t greenfield);
115  void SetShortGuardInterval20 (uint8_t shortguardinterval);
121  void SetShortGuardInterval40 (uint8_t shortguardinterval);
127  void SetMaxAmsduLength (uint8_t maxamsdulength);
133  void SetLSigProtectionSupport (uint8_t lsigprotection);
134 
140  void SetMaxAmpduLength (uint8_t maxampdulength);
141 
147  void SetRxMcsBitmask (uint8_t index);
153  void SetRxHighestSupportedDataRate (uint16_t maxsupportedrate);
159  void SetTxMcsSetDefined (uint8_t txmcssetdefined);
165  void SetTxRxMcsSetUnequal (uint8_t txrxmcssetunequal);
171  void SetTxMaxNSpatialStreams (uint8_t maxtxspatialstreams);
177  void SetTxUnequalModulation (uint8_t txunequalmodulation);
178 
184  uint16_t GetHtCapabilitiesInfo (void) const;
190  uint8_t GetAmpduParameters (void) const;
196  uint64_t GetSupportedMcsSet1 (void) const;
202  uint64_t GetSupportedMcsSet2 (void) const;
208  uint16_t GetExtendedHtCapabilities (void) const;
214  uint32_t GetTxBfCapabilities (void) const;
220  uint8_t GetAntennaSelectionCapabilities (void) const;
221 
227  uint8_t GetLdpc (void) const;
233  uint8_t GetSupportedChannelWidth (void) const;
239  uint8_t GetGreenfield (void) const;
245  uint8_t GetShortGuardInterval20 (void) const;
251  uint8_t GetShortGuardInterval40 (void) const;
257  uint8_t GetMaxAmsduLength (void) const;
263  uint8_t GetLSigProtectionSupport (void) const;
264 
270  uint8_t GetMaxAmpduLength (void) const;
276  uint8_t GetMinMpduStartSpace (void) const;
277 
283  uint8_t* GetRxMcsBitmask ();
291  bool IsSupportedMcs (uint8_t mcs) const;
297  uint8_t GetRxHighestSupportedAntennas (void) const;
303  uint16_t GetRxHighestSupportedDataRate (void) const;
309  uint8_t GetTxMcsSetDefined (void) const;
315  uint8_t GetTxRxMcsSetUnequal (void) const;
321  uint8_t GetTxMaxNSpatialStreams (void) const;
327  uint8_t GetTxUnequalModulation (void) const;
328 
340  uint8_t GetInformationFieldSize () const;
356  uint8_t length);
374  uint16_t GetSerializedSize () const;
375 
376 
377 private:
378  //HT Capabilties Info field
379  uint8_t m_ldpc;
381  uint8_t m_smPowerSave;
382  uint8_t m_greenField;
385  uint8_t m_txStbc;
386  uint8_t m_rxStbc;
389  uint8_t m_dssMode40;
390  uint8_t m_psmpSupport;
393 
394  //A-MPDU Parameters field
397  uint8_t m_ampduReserved;
398 
399  //Supported MCS Set field
407  uint32_t m_reservedMcsSet3;
409 
410  //HT Extended Capabilties field
411  uint8_t m_pco;
414  uint8_t m_mcsFeedback;
415  uint8_t m_htcSupport;
418 
419  //Transmit Beamforming Capabilities field
423  uint8_t m_rxNdpCapable;
424  uint8_t m_txNdpCapable;
426  uint8_t m_calibration;
439  uint8_t m_reservedTxBf;
440 
441  //ASEL Capabilities field
447  uint8_t m_rxASelCapable;
449  uint8_t m_reservedASel;
450 
452  uint8_t m_htSupported;
453 };
454 
455 std::ostream &operator << (std::ostream &os, const HtCapabilities &htcapabilities);
456 std::istream &operator >> (std::istream &is, HtCapabilities &htcapabilities);
457 
459 
460 } //namespace ns3
461 
462 #endif /* HT_CAPABILITY_H */
uint8_t m_psmpSupport
PSMP support.
uint8_t GetMaxAmsduLength(void) const
Return the maximum AMSDU length.
uint8_t m_rxMcsBitmask[MAX_SUPPORTED_MCS]
receive MCS bitmask
uint8_t m_dssMode40
DSS mode 40.
uint8_t m_maxAmpduLength
maximum AMPDU length
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
Definition: angles.cc:48
uint8_t m_reservedTxBf
reserved transmit BF
uint8_t m_mcsFeedback
MCS feedback.
void SetTxMcsSetDefined(uint8_t txmcssetdefined)
Set the transmit MCS set defined.
uint8_t GetTxRxMcsSetUnequal(void) const
Return the transmit / receive MCS set unequal.
uint8_t GetMinMpduStartSpace(void) const
Return the minimum MPDU start space.
uint8_t m_rxStaggeredSoundingCapable
receive staggered sounding capable
uint32_t m_reservedMcsSet3
reserved MCS set 3
uint8_t GetLSigProtectionSupport(void) const
Return the LSIG protection support.
void SetGreenfield(uint8_t greenfield)
Set the green field.
void SetTxBfCapabilities(uint32_t ctrl)
Set the Transmit Beamforming (TxBF) Capabilties 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
void SetHtSupported(uint8_t htsupported)
Set the HT Supported field in the HT Supported information element.
uint8_t m_reservedExtendedCapabilities2
reserver extended capabilities 2
uint64_t GetSupportedMcsSet2(void) const
Return the last 64 bytes of the Supported MCS Set field in the HT Capabilities information element...
void SetRxMcsBitmask(uint8_t index)
Set the receive MCS bitmask.
def start()
Definition: core.py:1790
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
uint8_t GetSupportedChannelWidth(void) const
Return the supported channel width.
uint8_t m_shortGuardInterval40
short guard interval 40
void SetAmpduParameters(uint8_t ctrl)
Set the A-MPDU Parameters field in the HT Capabilities information element.
uint8_t GetShortGuardInterval40(void) const
Return the short guard interval 40 value.
uint8_t m_txSoundingPpdusCapable
sounding PPDUS capable
uint8_t m_fortyMhzIntolerant
40 Mhz intolerant
iterator in a Buffer instance
Definition: buffer.h:98
uint8_t GetTxUnequalModulation(void) const
Return the transmit unequal modulation.
uint8_t m_txMcsSetDefined
transmit MCS set defined
uint8_t m_rxNdpCapable
receive NDP capable
void SetLSigProtectionSupport(uint8_t lsigprotection)
Set the LSIG protection support.
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 m_txStaggeredSoundingCapable
transmit staggered soundign capable
void SetShortGuardInterval20(uint8_t shortguardinterval)
Set the short guard interval 20 field.
uint8_t GetGreenfield(void) const
Return the green field.
uint8_t m_txMaxNSpatialStreams
transmit maximum number spatial streams
uint8_t m_csiNBfAntennasSupported
CSI NBF antenna supported.
uint64_t GetSupportedMcsSet1(void) const
Return the first 64 bytes of the Supported MCS Set field in the HT Capabilities information element...
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
void SetMaxAmsduLength(uint8_t maxamsdulength)
Set the maximum AMSDU length.
uint8_t m_greenField
green field
uint8_t m_antennaSelectionCapability
antenna selection capability
uint32_t GetTxBfCapabilities(void) const
Return the Transmit Beamforming (TxBF) Capabilties field in the HT Capabilities information element...
uint8_t GetShortGuardInterval20(void) const
Return the short guard interval 20 value.
void SetMaxAmpduLength(uint8_t maxampdulength)
Set the maximum AMPDU length.
uint8_t m_reservedMcsSet1
reserved MCS set 1
uint16_t GetRxHighestSupportedDataRate(void) const
Return the receive highest supported data rate.
uint8_t m_reservedMcsSet2
reserved MCS set 2
uint8_t m_channelEstimationCapability
channel estimation capability
uint8_t GetTxMaxNSpatialStreams(void) const
Return the transmit maximum spatial streams.
WifiInformationElementId ElementId() const
Return the element ID.
uint8_t GetTxMcsSetDefined(void) const
Return the transmit MCS set defined.
uint8_t m_reservedASel
reserved a sel
uint8_t m_htDelayedBlockAck
HT delayed block ack.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
void SetRxHighestSupportedDataRate(uint16_t maxsupportedrate)
Set the receive highest supported data rate.
uint8_t m_smPowerSave
SM power save.
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
bool IsSupportedMcs(uint8_t mcs) const
Return the is MCS supported flag.
uint8_t m_maxAmsduLength
maximum AMSDU length
uint8_t GetAmpduParameters(void) const
Return the A-MPDU Parameters field in the HT Capabilities information element.
uint8_t m_ampduReserved
AMPDU reserved.
uint8_t m_htcSupport
HTS support.
uint8_t m_txRxMcsSetUnequal
transmit / receive MCS set unequal
void SerializeInformationField(Buffer::Iterator start) const
Serialize the information field.
uint8_t m_rxASelCapable
receive a sel capable
void SetTxUnequalModulation(uint8_t txunequalmodulation)
Set the transmit unequal modulation.
void SetSupportedMcsSet(uint64_t ctrl1, uint64_t ctrl2)
Set the Supported MCS Set field in the HT Capabilities information element.
void SetExtendedHtCapabilities(uint16_t ctrl)
Set the Extended HT Capabilties field in the HT Capabilities information element. ...
uint8_t GetInformationFieldSize() const
Return the information field size.
void SetAntennaSelectionCapabilities(uint8_t ctrl)
Set the the Antenna Selection (ASEL) Capabilties field in the HT Capabilities information element...
uint8_t GetLdpc(void) const
Return LDPC.
void SetHtCapabilitiesInfo(uint16_t ctrl)
Set the HT Capabilties Info field in the HT Capabilities information element.
uint8_t m_rxStbc
receive STBC
uint16_t GetHtCapabilitiesInfo(void) const
Return the HT Capabilties Info field in the HT Capabilities information element.
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 a sel capable
uint8_t m_minMpduStartSpace
minimum MPDU start space
uint8_t m_explicitCsiFeedbackCapable
explicit CSI feedback capable
uint8_t m_ldpc
LDPC.
void SetLdpc(uint8_t ldpc)
Set the LDPC field.
void SetTxRxMcsSetUnequal(uint8_t txrxmcssetunequal)
Set the transmit / receive MCS set unequal.
uint8_t m_csiMaxNRowsBfSupported
CSI maximum number rows BF supported.
uint8_t * GetRxMcsBitmask()
Return the receive MCS bitmask.
uint8_t m_pcoTransitionTime
PCO trnsition time.
uint8_t m_txUnequalModulation
transmit unequal modulation
uint8_t GetRxHighestSupportedAntennas(void) const
Return the receive highest supported antennas.
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.
void SetTxMaxNSpatialStreams(uint8_t maxtxspatialstreams)
Set the transmit maximum N spatial streams.
uint8_t DeserializeInformationField(Buffer::Iterator start, uint8_t length)
Return the information field.
uint16_t GetSerializedSize() const
Return the serialized size of this HT capability information element.
uint8_t m_shortGuardInterval20
short guard interval 20
uint8_t m_txNdpCapable
transmit NDP capable
uint8_t m_reservedExtendedCapabilities
reserved extended capabilities
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 HT STA...
void SetShortGuardInterval40(uint8_t shortguardinterval)
Set the short guard interval 40 field.
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type.
uint8_t GetAntennaSelectionCapabilities(void) const
Return the Antenna Selection (ASEL) Capabilties field in the HT Capabilities information element...
uint8_t m_lsigProtectionSupport
LSIG protection support.
void SetSupportedChannelWidth(uint8_t supportedchannelwidth)
Set the supported channel width field.
uint8_t m_calibration
calibration
uint8_t m_reverzeDirectionResponder
reverse direction responder
uint8_t GetMaxAmpduLength(void) const
Return the maximum AMPDU length.
uint8_t m_explicitNoncompressedBfFeedbackCapable
eplicit non complressed BF feedback capable
uint8_t m_explicitCompressedSteeringCapable
explicit compressed steeering capable
uint8_t m_antennaIndicesFeedbackBasedTxASelCapable
antenna indices feedback absed transmit a sel capable
uint16_t GetExtendedHtCapabilities(void) const
Return the Extended HT Capabilties field in the HT Capabilities information element.