/usr/include/ns3.27/ns3/ht-capabilities.h is in libns3-dev 3.27+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors: Ghada Badawy <gbadawy@gmail.com>
* Sébastien Deronne <sebastien.deronne@gmail.com>
*/
#ifndef HT_CAPABILITIES_H
#define HT_CAPABILITIES_H
#include "wifi-information-element.h"
/**
* This defines the maximum number of supported MCSs that a STA is
* allowed to have. Currently this number is set for IEEE 802.11n
*/
#define MAX_SUPPORTED_MCS (77)
namespace ns3 {
/**
* \brief The HT Capabilities Information Element
* \ingroup wifi
*
* This class knows how to serialise and deserialise the HT Capabilities Information Element
*
* \see attribute_HtCapabilities
*/
class HtCapabilities : public WifiInformationElement
{
public:
HtCapabilities ();
/**
* Set the HT Supported field in the HT Supported information element.
*
* \param htsupported the HT Supported Info field in the HT Supported information element
*/
void SetHtSupported (uint8_t htsupported);
/**
* Set the HT Capabilties Info field in the HT Capabilities information element.
*
* \param ctrl the HT Capabilties Info field in the HT Capabilities information element
*/
void SetHtCapabilitiesInfo (uint16_t ctrl);
/**
* Set the A-MPDU Parameters field in the HT Capabilities information element.
*
* \param ctrl the A-MPDU Parameters field in the HT Capabilities information element
*/
void SetAmpduParameters (uint8_t ctrl);
/**
* Set the Supported MCS Set field in the HT Capabilities information element.
*
* \param ctrl1 the first 64 bytes of the Supported MCS Set field in the HT Capabilities information element
* \param ctrl2 the last 64 bytes of the Supported MCS Set field in the HT Capabilities information element
*/
void SetSupportedMcsSet (uint64_t ctrl1, uint64_t ctrl2);
/**
* Set the Extended HT Capabilties field in the HT Capabilities information element.
*
* \param ctrl the Extended HT Capabilties field in the HT Capabilities information element
*/
void SetExtendedHtCapabilities (uint16_t ctrl);
/**
* Set the Transmit Beamforming (TxBF) Capabilties field in the HT Capabilities information element.
*
* \param ctrl the Transmit Beamforming (TxBF) Capabilties field in the HT Capabilities information element
*/
void SetTxBfCapabilities (uint32_t ctrl);
/**
* Set the the Antenna Selection (ASEL) Capabilties field in the HT Capabilities information element.
*
* \param ctrl the Antenna Selection (ASEL) Capabilties field in the HT Capabilities information element
*/
void SetAntennaSelectionCapabilities (uint8_t ctrl);
/**
* Set the LDPC field.
*
* \param ldpc
*/
void SetLdpc (uint8_t ldpc);
/**
* Set the supported channel width field.
*
* \param supportedchannelwidth
*/
void SetSupportedChannelWidth (uint8_t supportedchannelwidth);
/**
* Set the green field.
*
* \param greenfield
*/
void SetGreenfield (uint8_t greenfield);
/**
* Set the short guard interval 20 field.
*
* \param shortguardinterval
*/
void SetShortGuardInterval20 (uint8_t shortguardinterval);
/**
* Set the short guard interval 40 field.
*
* \param shortguardinterval
*/
void SetShortGuardInterval40 (uint8_t shortguardinterval);
/**
* Set the maximum AMSDU length.
*
* \param maxamsdulength
*/
void SetMaxAmsduLength (uint8_t maxamsdulength);
/**
* Set the LSIG protection support.
*
* \param lsigprotection
*/
void SetLSigProtectionSupport (uint8_t lsigprotection);
/**
* Set the maximum AMPDU length.
*
* \param maxampdulength
*/
void SetMaxAmpduLength (uint8_t maxampdulength);
/**
* Set the receive MCS bitmask.
*
* \param index
*/
void SetRxMcsBitmask (uint8_t index);
/**
* Set the receive highest supported data rate.
*
* \param maxsupportedrate
*/
void SetRxHighestSupportedDataRate (uint16_t maxsupportedrate);
/**
* Set the transmit MCS set defined.
*
* \param txmcssetdefined
*/
void SetTxMcsSetDefined (uint8_t txmcssetdefined);
/**
* Set the transmit / receive MCS set unequal.
*
* \param txrxmcssetunequal
*/
void SetTxRxMcsSetUnequal (uint8_t txrxmcssetunequal);
/**
* Set the transmit maximum N spatial streams.
*
* \param maxtxspatialstreams
*/
void SetTxMaxNSpatialStreams (uint8_t maxtxspatialstreams);
/**
* Set the transmit unequal modulation.
*
* \param txunequalmodulation
*/
void SetTxUnequalModulation (uint8_t txunequalmodulation);
/**
* Return the HT Capabilties Info field in the HT Capabilities information element.
*
* \return the HT Capabilties Info field in the HT Capabilities information element
*/
uint16_t GetHtCapabilitiesInfo (void) const;
/**
* Return the A-MPDU Parameters field in the HT Capabilities information element.
*
* \return the A-MPDU Parameters field in the HT Capabilities information element
*/
uint8_t GetAmpduParameters (void) const;
/**
* Return the first 64 bytes of the Supported MCS Set field in the HT Capabilities information element.
*
* \return the first 64 bytes of the Supported MCS Set field in the HT Capabilities information element
*/
uint64_t GetSupportedMcsSet1 (void) const;
/**
* Return the last 64 bytes of the Supported MCS Set field in the HT Capabilities information element.
*
* \return the last 64 bytes of the Supported MCS Set field in the HT Capabilities information element
*/
uint64_t GetSupportedMcsSet2 (void) const;
/**
* Return the Extended HT Capabilties field in the HT Capabilities information element.
*
* \return the Extended HT Capabilties field in the HT Capabilities information element
*/
uint16_t GetExtendedHtCapabilities (void) const;
/**
* Return the Transmit Beamforming (TxBF) Capabilties field in the HT Capabilities information element.
*
* \return the Transmit Beamforming (TxBF) Capabilties field in the HT Capabilities information element
*/
uint32_t GetTxBfCapabilities (void) const;
/**
* Return the Antenna Selection (ASEL) Capabilties field in the HT Capabilities information element.
*
* \return the Antenna Selection (ASEL) Capabilties field in the HT Capabilities information element
*/
uint8_t GetAntennaSelectionCapabilities (void) const;
/**
* Return LDPC.
*
* \return the LDPC value
*/
uint8_t GetLdpc (void) const;
/**
* Return the supported channel width.
*
* \return the supported chanel width
*/
uint8_t GetSupportedChannelWidth (void) const;
/**
* Return the green field.
*
* \return the green field
*/
uint8_t GetGreenfield (void) const;
/**
* Return the short guard interval 20 value.
*
* \return the short guard interval 20 value
*/
uint8_t GetShortGuardInterval20 (void) const;
/**
* Return the short guard interval 40 value.
*
* \return the short guard interval 40 value
*/
uint8_t GetShortGuardInterval40 (void) const;
/**
* Return the maximum AMSDU length.
*
* \return the maximum AMSDU length
*/
uint8_t GetMaxAmsduLength (void) const;
/**
* Return the LSIG protection support.
*
* \return the LSIG protection support
*/
uint8_t GetLSigProtectionSupport (void) const;
/**
* Return the maximum AMPDU length.
*
* \return the maximum AMPDU length
*/
uint8_t GetMaxAmpduLength (void) const;
/**
* Return the minimum MPDU start space.
*
* \return the minimum MPDU start space
*/
uint8_t GetMinMpduStartSpace (void) const;
/**
* Return the receive MCS bitmask.
*
* \return the receive MCS bitmask
*/
uint8_t* GetRxMcsBitmask ();
/**
* Return the is MCS supported flag.
*
* \param mcs is MCS supported flag
*
* \return true if successful
*/
bool IsSupportedMcs (uint8_t mcs) const;
/**
* Return the receive highest supported antennas.
*
* \return the receive highest supported antennas
*/
uint8_t GetRxHighestSupportedAntennas (void) const;
/**
* Return the receive highest supported data rate.
*
* \return the receive highest supported data rate
*/
uint16_t GetRxHighestSupportedDataRate (void) const;
/**
* Return the transmit MCS set defined.
*
* \return the transmit MCS set defined
*/
uint8_t GetTxMcsSetDefined (void) const;
/**
* Return the transmit / receive MCS set unequal.
*
* \return the transmit / receive MCS set unequal
*/
uint8_t GetTxRxMcsSetUnequal (void) const;
/**
* Return the transmit maximum spatial streams.
*
* \return the transmit maximum spatial streams
*/
uint8_t GetTxMaxNSpatialStreams (void) const;
/**
* Return the transmit unequal modulation.
*
* \return the transmit unequal modulation
*/
uint8_t GetTxUnequalModulation (void) const;
/**
* Return the element ID.
*
* \return the element ID
*/
WifiInformationElementId ElementId () const;
/**
* Return the information field size.
*
* \return the information field size
*/
uint8_t GetInformationFieldSize () const;
/**
* Serialize the information field.
*
* \param start the information field
*/
void SerializeInformationField (Buffer::Iterator start) const;
/**
* Return the information field.
*
* \param start field
* \param length field length
*
* \return the information field
*/
uint8_t DeserializeInformationField (Buffer::Iterator start,
uint8_t length);
/**
* This information element is a bit special in that it is only
* included if the STA is an HT STA. To support this we
* override the Serialize and GetSerializedSize methods of
* WifiInformationElement.
*
* \param start
*
* \return an iterator
*/
Buffer::Iterator Serialize (Buffer::Iterator start) const;
/**
* Return the serialized size of this HT capability
* information element.
*
* \return the serialized size of this HT capability information element
*/
uint16_t GetSerializedSize () const;
private:
//HT Capabilties Info field
uint8_t m_ldpc; ///< LDPC
uint8_t m_supportedChannelWidth; ///< supported channel width
uint8_t m_smPowerSave; ///< SM power save
uint8_t m_greenField; ///< green field
uint8_t m_shortGuardInterval20; ///< short guard interval 20
uint8_t m_shortGuardInterval40; ///< short guard interval 40
uint8_t m_txStbc; ///< transmit STBC
uint8_t m_rxStbc; ///< receive STBC
uint8_t m_htDelayedBlockAck; ///< HT delayed block ack
uint8_t m_maxAmsduLength; ///< maximum AMSDU length
uint8_t m_dssMode40; ///< DSS mode 40
uint8_t m_psmpSupport; ///< PSMP support
uint8_t m_fortyMhzIntolerant; ///< 40 Mhz intolerant
uint8_t m_lsigProtectionSupport; ///< LSIG protection support
//A-MPDU Parameters field
uint8_t m_maxAmpduLength; ///< maximum AMPDU length
uint8_t m_minMpduStartSpace; ///< minimum MPDU start space
uint8_t m_ampduReserved; ///< AMPDU reserved
//Supported MCS Set field
uint8_t m_reservedMcsSet1; ///< reserved MCS set 1
uint16_t m_rxHighestSupportedDataRate; ///< receive highest supported data rate
uint8_t m_reservedMcsSet2; ///< reserved MCS set 2
uint8_t m_txMcsSetDefined; ///< transmit MCS set defined
uint8_t m_txRxMcsSetUnequal; ///< transmit / receive MCS set unequal
uint8_t m_txMaxNSpatialStreams; ///< transmit maximum number spatial streams
uint8_t m_txUnequalModulation; ///< transmit unequal modulation
uint32_t m_reservedMcsSet3; ///< reserved MCS set 3
uint8_t m_rxMcsBitmask[MAX_SUPPORTED_MCS]; ///< receive MCS bitmask
//HT Extended Capabilties field
uint8_t m_pco; ///< PCO
uint8_t m_pcoTransitionTime; ///< PCO trnsition time
uint8_t m_reservedExtendedCapabilities; ///< reserved extended capabilities
uint8_t m_mcsFeedback; ///< MCS feedback
uint8_t m_htcSupport; ///< HTS support
uint8_t m_reverzeDirectionResponder; ///< reverse direction responder
uint8_t m_reservedExtendedCapabilities2; ///< reserver extended capabilities 2
//Transmit Beamforming Capabilities field
uint8_t m_implicitRxBfCapable; ///< implicit receive BF capable
uint8_t m_rxStaggeredSoundingCapable; ///< receive staggered sounding capable
uint8_t m_txStaggeredSoundingCapable; ///< transmit staggered soundign capable
uint8_t m_rxNdpCapable; ///< receive NDP capable
uint8_t m_txNdpCapable; ///< transmit NDP capable
uint8_t m_implicitTxBfCapable; ///< implicit transmit BF capable
uint8_t m_calibration; ///< calibration
uint8_t m_explicitCsiTxBfCapable; ///< explicit CSI transmit BF capable
uint8_t m_explicitNoncompressedSteeringCapable; ///< explicit non compressed steeering capable
uint8_t m_explicitCompressedSteeringCapable; ///< explicit compressed steeering capable
uint8_t m_explicitTxBfCsiFeedback; ///< explicit transmit BF CSI feedback
uint8_t m_explicitNoncompressedBfFeedbackCapable; ///< eplicit non complressed BF feedback capable
uint8_t m_explicitCompressedBfFeedbackCapable; ///< explicit compressed BF feedback capable
uint8_t m_minimalGrouping; ///< minimal grouping
uint8_t m_csiNBfAntennasSupported; ///< CSI NBF antenna supported
uint8_t m_noncompressedSteeringNBfAntennasSupported; ///< non compressed steering NBF antenna supported
uint8_t m_compressedSteeringNBfAntennasSupported; ///< compressed steering NBF antenna supported
uint8_t m_csiMaxNRowsBfSupported; ///< CSI maximum number rows BF supported
uint8_t m_channelEstimationCapability; ///< channel estimation capability
uint8_t m_reservedTxBf; ///< reserved transmit BF
//ASEL Capabilities field
uint8_t m_antennaSelectionCapability; ///< antenna selection capability
uint8_t m_explicitCsiFeedbackBasedTxASelCapable; ///< explicit CSI feedback based transmit a sel capable
uint8_t m_antennaIndicesFeedbackBasedTxASelCapable; ///< antenna indices feedback absed transmit a sel capable
uint8_t m_explicitCsiFeedbackCapable; ///< explicit CSI feedback capable
uint8_t m_antennaIndicesFeedbackCapable; ///< antenna indices feedback capable
uint8_t m_rxASelCapable; ///< receive a sel capable
uint8_t m_txSoundingPpdusCapable; ///< sounding PPDUS capable
uint8_t m_reservedASel; ///< reserved a sel
/// This is used to decide whether this element should be added to the frame or not
uint8_t m_htSupported;
};
std::ostream &operator << (std::ostream &os, const HtCapabilities &htcapabilities);
std::istream &operator >> (std::istream &is, HtCapabilities &htcapabilities);
ATTRIBUTE_HELPER_HEADER (HtCapabilities);
} //namespace ns3
#endif /* HT_CAPABILITY_H */
|