diff --git a/src/wifi/model/ap-wifi-mac.h b/src/wifi/model/ap-wifi-mac.h index e7c3313e4..8c1acd958 100644 --- a/src/wifi/model/ap-wifi-mac.h +++ b/src/wifi/model/ap-wifi-mac.h @@ -307,7 +307,7 @@ private: Ptr m_beaconJitter; //!< UniformRandomVariable used to randomize the time of the first beacon bool m_enableBeaconJitter; //!< Flag whether the first beacon should be generated at random time std::map m_staList; //!< Map of all stations currently associated to the AP with their association ID - //!< Maps MAC addresses of associated stations to their association ID + /// Maps MAC addresses of associated stations to their association ID std::unordered_map m_addressIdMap; uint16_t m_numNonErpStations; //!< Number of non-ERP stations currently associated to the AP uint16_t m_numNonHtStations; //!< Number of non-HT stations currently associated to the AP @@ -315,9 +315,13 @@ private: bool m_shortPreambleEnabled; //!< Flag whether short preamble is enabled in the BSS bool m_enableNonErpProtection; //!< Flag whether protection mechanism is used or not when non-ERP STAs are present within the BSS Time m_bsrLifetime; //!< Lifetime of Buffer Status Reports - //!< store value and timestamp for each Buffer Status Report - typedef struct { uint8_t value; Time timestamp; } bsrType; - //!< Per (MAC address, TID) buffer status reports + /// store value and timestamp for each Buffer Status Report + typedef struct + { + uint8_t value; //!< value of BSR + Time timestamp; //!< timestamp of BSR + } bsrType; + /// Per (MAC address, TID) buffer status reports std::unordered_map m_bufferStatus; }; diff --git a/src/wifi/model/block-ack-manager.h b/src/wifi/model/block-ack-manager.h index d4ad94240..a020b7af9 100644 --- a/src/wifi/model/block-ack-manager.h +++ b/src/wifi/model/block-ack-manager.h @@ -419,6 +419,7 @@ public: /** * \param recipient the recipient * \param tid the TID + * \return the BlockAckRequest header for the established BA agreement * * Get the BlockAckRequest header for the established BA agreement * (recipient,tid). diff --git a/src/wifi/model/block-ack-type.h b/src/wifi/model/block-ack-type.h index 1b843fc0e..07b21fb43 100644 --- a/src/wifi/model/block-ack-type.h +++ b/src/wifi/model/block-ack-type.h @@ -47,9 +47,23 @@ struct BlockAckType enum Variant m_variant; //!< Block Ack variant std::vector m_bitmapLen; //!< Length (bytes) of included bitmaps - /// Constructors + /** + * Default constructor for BlockAckType. + */ BlockAckType (); + /** + * Constructor for BlockAckType with given variant. + * + * \param v the Block Ack variant + */ BlockAckType (Variant v); + /** + * Constructor for BlockAckType with given variant + * and bitmap length. + * + * \param v the Block Ack variant + * \param l the length (bytes) of included bitmaps + */ BlockAckType (Variant v, std::vector l); }; @@ -74,9 +88,23 @@ struct BlockAckReqType uint8_t m_nSeqControls; //!< Number of included Starting Sequence Control fields. //!< This member is added for future support of Multi-TID BARs - /// Constructors + /** + * Default constructor for BlockAckReqType. + */ BlockAckReqType (); + /** + * Constructor for BlockAckReqType with given variant. + * + * \param v the Block Ack Request variant + */ BlockAckReqType (Variant v); + /** + * Constructor for BlockAckReqType with given variant + * and number of SSC fields. + * + * \param v the Block Ack Request variant + * \param nSeqControls the number of included Starting Sequence Control fields + */ BlockAckReqType (Variant v, uint8_t nSeqControls); }; diff --git a/src/wifi/model/ctrl-headers.h b/src/wifi/model/ctrl-headers.h index e47ce95c0..431193d00 100644 --- a/src/wifi/model/ctrl-headers.h +++ b/src/wifi/model/ctrl-headers.h @@ -453,6 +453,8 @@ public: /** * Reset the bitmap to 0. For Multi-STA Block Acks, reset the bitmap included * in the Per AID TID Info subfield identified by index. + * + * \param index the index of the Per AID TID Info subfield (Multi-STA Block Ack only) */ void ResetBitmap (std::size_t index = 0); @@ -588,6 +590,9 @@ public: /** * Copy assignment operator. * + * \param userInfo the User Info field to copy + * \return a reference to the copied object + * * Checks that the given User Info fields is included in the same type * of Trigger Frame. */ @@ -901,6 +906,9 @@ public: /** * Copy assignment operator. * + * \param trigger the Trigger frame to copy + * \return a reference to the copied object + * * Ensure that the type of this Trigger Frame is set to the type of the given * Trigger Frame before copying the User Info fields. */ diff --git a/src/wifi/model/he/he-frame-exchange-manager.h b/src/wifi/model/he/he-frame-exchange-manager.h index c704eacc2..63ccf6757 100644 --- a/src/wifi/model/he/he-frame-exchange-manager.h +++ b/src/wifi/model/he/he-frame-exchange-manager.h @@ -33,7 +33,13 @@ class ApWifiMac; class StaWifiMac; class CtrlTriggerHeader; +/** + * Map of PSDUs indexed by STA-ID + */ typedef std::unordered_map /* PSDU */> WifiPsduMap; +/** + * Map of const PSDUs indexed by STA-ID + */ typedef std::unordered_map /* PSDU */> WifiConstPsduMap; /** @@ -71,6 +77,7 @@ public: * * \param to the MAC address * \param psduMap the PSDU map + * \return the PSDU, if any, or a null pointer, otherwise */ static Ptr GetPsduTo (Mac48Address to, const WifiPsduMap& psduMap); diff --git a/src/wifi/model/he/he-ru.h b/src/wifi/model/he/he-ru.h index 26254f85b..ec9f980dd 100644 --- a/src/wifi/model/he/he-ru.h +++ b/src/wifi/model/he/he-ru.h @@ -153,7 +153,7 @@ public: /// map (bandwidth, number of tones) pairs to the group of subcarrier ranges typedef std::map > SubcarrierGroups; - //!< Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel) + /// Subcarrier groups for all RUs (with indices being applicable to primary 80 MHz channel) static const SubcarrierGroups m_heRuSubcarrierGroups; }; diff --git a/src/wifi/model/he/mu-snr-tag.h b/src/wifi/model/he/mu-snr-tag.h index 2a892b744..61bd00997 100644 --- a/src/wifi/model/he/mu-snr-tag.h +++ b/src/wifi/model/he/mu-snr-tag.h @@ -66,6 +66,7 @@ public: /** * Return true if the SNR value for the given STA-ID is present * + * \param staId the STA-ID * \return true if the SNR value for the given STA-ID is present */ bool IsPresent (uint16_t staId) const; diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.h b/src/wifi/model/ht/ht-frame-exchange-manager.h index 62e2e651c..30d17a7e5 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.h +++ b/src/wifi/model/ht/ht-frame-exchange-manager.h @@ -236,6 +236,7 @@ protected: * * \param txDuration the duration of the PSDU transmission * \param txParams the TX parameters used to send the PSDU + * \return the value for the Duration/ID field */ virtual Time GetPsduDurationId (Time txDuration, const WifiTxParameters& txParams) const; @@ -286,13 +287,15 @@ protected: * \param initialFrame true if the frame being transmitted is the initial frame * of the TXOP. This is used to determine whether the TXOP * limit can be exceeded + * \return true if frame is transmitted, false otherwise */ virtual bool SendMpduFromBaManager (Ptr edca, Time availableTime, bool initialFrame); /** - * TODO Transmit a data frame, if data is available and its trasmission plus the - * response fits within the given available time, if the latter is not - * Time::Min() and this is not the initial frame of a TXOP. + * Given a non-broadcast QoS data frame, prepare the PSDU to transmit by attempting + * A-MSDU and A-MPDU aggregation (if enabled), while making sure that the frame + * exchange (possibly including protection and acknowledgment) is completed within + * the given available time. * * \param peekedItem the given non-broadcast QoS data frame * \param availableTime the amount of time allowed for the frame exchange. Equals @@ -300,6 +303,7 @@ protected: * \param initialFrame true if the frame being transmitted is the initial frame * of the TXOP. This is used to determine whether the TXOP * limit can be exceeded + * \return true if frame is transmitted, false otherwise */ virtual bool SendDataFrame (Ptr peekedItem, Time availableTime, bool initialFrame); @@ -312,6 +316,8 @@ protected: * - MPDU aggregation is enabled and there is more than one packet in the queue OR * - the station is a VHT station * + * \param recipient address of the recipient. + * \param tid traffic ID. * \return true if a Block Ack agreement needs to be established, false otherwise. */ virtual bool NeedSetupBlockAck (Mac48Address recipient, uint8_t tid); diff --git a/src/wifi/model/ht/ht-phy.h b/src/wifi/model/ht/ht-phy.h index b682e25a9..4041aef33 100644 --- a/src/wifi/model/ht/ht-phy.h +++ b/src/wifi/model/ht/ht-phy.h @@ -508,7 +508,7 @@ protected: * * \param symbolDuration the symbol duration (in us) excluding guard interval * \param guardInterval the considered guard interval duration in nanoseconds - * \param usableSubarriers the number of usable subcarriers for data + * \param usableSubCarriers the number of usable subcarriers for data * \param numberOfBitsPerSubcarrier the number of data bits per subcarrier * \param codingRate the coding rate * \param nss the considered number of streams diff --git a/src/wifi/model/interference-helper.h b/src/wifi/model/interference-helper.h index 715ac8d97..724fa8946 100644 --- a/src/wifi/model/interference-helper.h +++ b/src/wifi/model/interference-helper.h @@ -101,7 +101,7 @@ public: * Update the received power (W) for all bands, i.e. add up the received power * to the current received power, for each band. * - * \param the received power (W) for all bands. + * \param rxPower the received power (W) for all bands. */ void UpdateRxPowerW (RxPowerWattPerChannelBand rxPower); diff --git a/src/wifi/model/mpdu-aggregator.h b/src/wifi/model/mpdu-aggregator.h index 6a0ae3e7c..0bfd28ca3 100644 --- a/src/wifi/model/mpdu-aggregator.h +++ b/src/wifi/model/mpdu-aggregator.h @@ -150,6 +150,7 @@ public: * * \param mpduSize size of the MPDU in bytes. * \param isSingle true if S-MPDU. + * \return the A-MPDU subframe header */ static AmpduSubframeHeader GetAmpduSubframeHeader (uint16_t mpduSize, bool isSingle); diff --git a/src/wifi/model/non-ht/dsss-phy.cc b/src/wifi/model/non-ht/dsss-phy.cc index 8353eee99..b2cc76943 100644 --- a/src/wifi/model/non-ht/dsss-phy.cc +++ b/src/wifi/model/non-ht/dsss-phy.cc @@ -56,9 +56,14 @@ const PhyEntity::ModulationLookupTable DsssPhy::m_dsssModulationLookupTable { }; /* *NS_CHECK_STYLE_ON* */ -// DSSS rates in bits per second +/// DSSS rates in bits per second static const std::array s_dsssRatesBpsList = {1000000, 2000000, 5500000, 11000000}; +/** + * Get the array of possible DSSS rates. + * + * \return the DSSS rates in bits per second + */ const std::array& GetDsssRatesBpsList (void) { return s_dsssRatesBpsList; diff --git a/src/wifi/model/non-ht/erp-ofdm-phy.cc b/src/wifi/model/non-ht/erp-ofdm-phy.cc index 0b9878d75..d37f43a55 100644 --- a/src/wifi/model/non-ht/erp-ofdm-phy.cc +++ b/src/wifi/model/non-ht/erp-ofdm-phy.cc @@ -49,13 +49,18 @@ const PhyEntity::ModulationLookupTable ErpOfdmPhy::m_erpOfdmModulationLookupTabl { "ErpOfdmRate54Mbps", { WIFI_CODE_RATE_3_4, 64 } } }; -// ERP OFDM rates in bits per second +/// ERP OFDM rates in bits per second static const std::array s_erpOfdmRatesBpsList = { 6000000, 9000000, 12000000, 18000000, 24000000, 36000000, 48000000, 54000000}; /* *NS_CHECK_STYLE_ON* */ +/** + * Get the array of possible ERP OFDM rates. + * + * \return the ERP OFDM rates in bits per second + */ const std::array& GetErpOfdmRatesBpsList (void) { return s_erpOfdmRatesBpsList; diff --git a/src/wifi/model/non-ht/ofdm-phy.cc b/src/wifi/model/non-ht/ofdm-phy.cc index e5ecf63df..2b2b367cd 100644 --- a/src/wifi/model/non-ht/ofdm-phy.cc +++ b/src/wifi/model/non-ht/ofdm-phy.cc @@ -72,7 +72,7 @@ const PhyEntity::ModulationLookupTable OfdmPhy::m_ofdmModulationLookupTable { { "OfdmRate13_5MbpsBW5MHz", { WIFI_CODE_RATE_3_4, 64 } } }; -// OFDM rates in bits per second +/// OFDM rates in bits per second for each bandwidth (MHz) const std::map > s_ofdmRatesBpsList = {{ 20, // MHz { 6000000, 9000000, 12000000, 18000000, @@ -86,6 +86,11 @@ const std::map > s_ofdmRatesBpsList = /* *NS_CHECK_STYLE_ON* */ +/** + * Get the array of possible OFDM rates for each bandwidth (MHz). + * + * \return the OFDM rates in bits per second + */ const std::map >& GetOfdmRatesBpsList (void) { return s_ofdmRatesBpsList; diff --git a/src/wifi/model/non-ht/ofdm-phy.h b/src/wifi/model/non-ht/ofdm-phy.h index 8a5654d56..650404998 100644 --- a/src/wifi/model/non-ht/ofdm-phy.h +++ b/src/wifi/model/non-ht/ofdm-phy.h @@ -411,7 +411,7 @@ protected: * * \param symbolDuration the symbol duration (in us) excluding guard interval * \param guardInterval the considered guard interval duration in nanoseconds - * \param usableSubarriers the number of usable subcarriers for data + * \param usableSubCarriers the number of usable subcarriers for data * \param numberOfBitsPerSubcarrier the number of data bits per subcarrier * \param codingRate the coding rate * diff --git a/src/wifi/model/phy-entity.h b/src/wifi/model/phy-entity.h index 759228c2e..9d530c9f4 100644 --- a/src/wifi/model/phy-entity.h +++ b/src/wifi/model/phy-entity.h @@ -728,14 +728,14 @@ protected: * Create an event using WifiPhy's InterferenceHelper class. * Wrapper used by child classes. * - * \copydoc InterferenceHelper::Add(Ptr, WifiTxVector, Time, RxPowerWattPerChannelBand, bool) + * \copydoc InterferenceHelper::Add */ Ptr CreateInterferenceEvent (Ptr ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand rxPower, bool isStartOfdmaRxing = false); /** * Update an event in WifiPhy's InterferenceHelper class. * Wrapper used by child classes. * - * \copydoc InterferenceHelper::UpdateEvent(Ptr, RxPowerWattPerChannelBand) + * \copydoc InterferenceHelper::UpdateEvent */ void UpdateInterferenceEvent (Ptr event, RxPowerWattPerChannelBand rxPower); /** diff --git a/src/wifi/model/qos-txop.h b/src/wifi/model/qos-txop.h index e850c8b7b..df5e7a44a 100644 --- a/src/wifi/model/qos-txop.h +++ b/src/wifi/model/qos-txop.h @@ -163,6 +163,7 @@ public: /** * \param recipient Address of recipient. * \param tid traffic ID. + * \return the BlockAckRequest to send * * Prepare a BlockAckRequest to be sent to recipient for Traffic ID * tid. The header for the BlockAckRequest is requested to the QosTxop diff --git a/src/wifi/model/qos-utils.cc b/src/wifi/model/qos-utils.cc index da235e98d..69bcaa158 100644 --- a/src/wifi/model/qos-utils.cc +++ b/src/wifi/model/qos-utils.cc @@ -183,12 +183,6 @@ QosUtilsIsOldPacket (uint16_t startingSeq, uint16_t seqNumber) return (distance >= 2048); } -/** - * \brief Extraction operator for TypeId - * \param [in] packet is the packet - * \param [in] hdr is Wifi MAC header - * \returns the TypeId of the MAC header - */ uint8_t GetTid (Ptr packet, const WifiMacHeader hdr) { diff --git a/src/wifi/model/qos-utils.h b/src/wifi/model/qos-utils.h index b28221ef8..f5d5b2bd2 100644 --- a/src/wifi/model/qos-utils.h +++ b/src/wifi/model/qos-utils.h @@ -38,6 +38,12 @@ typedef std::pair WifiAddressTidPair; //!< (MAC address, */ struct WifiAddressTidHash { + /** + * Functional operator for (MAC address, TID) hash computation. + * + * \param addressTidPair the (MAC address, TID) pair + * \return the hash + */ std::size_t operator() (const WifiAddressTidPair& addressTidPair) const; }; @@ -46,6 +52,12 @@ struct WifiAddressTidHash */ struct WifiAddressHash { + /** + * Functional operator for MAC address hash computation. + * + * \param address the MAC address + * \return the hash + */ std::size_t operator() (const Mac48Address& address) const; }; @@ -235,12 +247,11 @@ bool QosUtilsIsOldPacket (uint16_t startingSeq, uint16_t seqNumber); /** * \ingroup wifi - * Next function is useful to get traffic id of different packet types. + * This function is useful to get traffic id of different packet types. * * \param packet packet to check * \param hdr 802.11 header for packet to check - * - * Returns TID of different packet types + * \return the TID of different packet types */ uint8_t GetTid (Ptr packet, const WifiMacHeader hdr); diff --git a/src/wifi/model/rate-control/ideal-wifi-manager.h b/src/wifi/model/rate-control/ideal-wifi-manager.h index 4e6c32765..5e74913e9 100644 --- a/src/wifi/model/rate-control/ideal-wifi-manager.h +++ b/src/wifi/model/rate-control/ideal-wifi-manager.h @@ -77,6 +77,8 @@ private: /** * Reset the station, invoked if the maximum amount of retries has failed. + * + * \param station the station for which statistics should be reset */ void Reset (WifiRemoteStation *station) const; diff --git a/src/wifi/model/rate-control/minstrel-ht-wifi-manager.h b/src/wifi/model/rate-control/minstrel-ht-wifi-manager.h index 4cfd2d8d9..eab54d1e0 100644 --- a/src/wifi/model/rate-control/minstrel-ht-wifi-manager.h +++ b/src/wifi/model/rate-control/minstrel-ht-wifi-manager.h @@ -471,17 +471,6 @@ private: */ void UpdateRate (MinstrelHtWifiRemoteStation *station); - /** - * For managing rates from different groups, a global index for - * all rates in all groups is used. - * The group order is fixed by BW -> SGI -> streams. - * Following functions convert from groupId and rateId to - * global index and vice versa. - * - * \param index the index - * \returns the rate ID - */ - /** * Return the rateId inside a group, from the global index. * @@ -501,6 +490,10 @@ private: /** * Returns the global index corresponding to the groupId and rateId. * + * For managing rates from different groups, a global index for + * all rates in all groups is used. + * The group order is fixed by BW -> SGI -> streams. + * * \param groupId the group ID * \param rateId the rate ID * \returns the index diff --git a/src/wifi/model/rate-control/thompson-sampling-wifi-manager.h b/src/wifi/model/rate-control/thompson-sampling-wifi-manager.h index 104752624..9babd2eb1 100644 --- a/src/wifi/model/rate-control/thompson-sampling-wifi-manager.h +++ b/src/wifi/model/rate-control/thompson-sampling-wifi-manager.h @@ -102,6 +102,7 @@ private: * * \param st Remote STA. * \param mode The WifiMode. + * \return the guard interval in nanoseconds */ uint16_t GetModeGuardInterval (WifiRemoteStation *st, WifiMode mode) const; @@ -113,9 +114,9 @@ private: */ double SampleBetaVariable (uint64_t alpha, uint64_t beta) const; - Ptr m_gammaRandomVariable; //< Variable used to sample beta-distributed random variables + Ptr m_gammaRandomVariable; //!< Variable used to sample beta-distributed random variables - double m_decay; //< Exponential decay coefficient, Hz + double m_decay; //!< Exponential decay coefficient, Hz TracedValue m_currentRate; //!< Trace rate changes }; diff --git a/src/wifi/model/recipient-block-ack-agreement.h b/src/wifi/model/recipient-block-ack-agreement.h index 2b2995b94..ac5dbcafc 100644 --- a/src/wifi/model/recipient-block-ack-agreement.h +++ b/src/wifi/model/recipient-block-ack-agreement.h @@ -118,6 +118,13 @@ private: /// Comparison functor used to sort the buffered MPDUs struct Compare { + /** + * Functional operator for sorting the buffered MPDUs. + * + * \param a the key of first buffered MPDU (\see Key) + * \param b the key of second buffered MPDU (\see Key) + * \return true if first key is smaller than second + */ bool operator() (const Key& a, const Key& b) const; }; diff --git a/src/wifi/model/reference/error-rate-tables.h b/src/wifi/model/reference/error-rate-tables.h index 113cc83bc..5b1b05f53 100644 --- a/src/wifi/model/reference/error-rate-tables.h +++ b/src/wifi/model/reference/error-rate-tables.h @@ -28,14 +28,16 @@ namespace ns3 { -const uint16_t ERROR_TABLE_BCC_SMALL_FRAME_SIZE = 32; -const uint16_t ERROR_TABLE_BCC_LARGE_FRAME_SIZE = 1458; -const uint16_t ERROR_TABLE_LDPC_FRAME_SIZE = 1458; -const uint8_t ERROR_TABLE_BCC_MAX_NUM_MCS = 9; -const uint8_t ERROR_TABLE_LDPC_MAX_NUM_MCS = 11; +const uint16_t ERROR_TABLE_BCC_SMALL_FRAME_SIZE = 32; //!< reference size (bytes) of small frames for BCC +const uint16_t ERROR_TABLE_BCC_LARGE_FRAME_SIZE = 1458; //!< reference size (bytes) of large frames for BCC +const uint16_t ERROR_TABLE_LDPC_FRAME_SIZE = 1458; //!< reference size (bytes) for LDPC +const uint8_t ERROR_TABLE_BCC_MAX_NUM_MCS = 9; //!< maximum number of MCSs for BCC +const uint8_t ERROR_TABLE_LDPC_MAX_NUM_MCS = 11; //!< maximum number of MCSs for LDPC +/// Table of SNR (dB) and PER pairs typedef std::vector > SnrPerTable; +/// AWGN error table for BCC with reference size of 32 bytes static const SnrPerTable AwgnErrorTableBcc32 [ERROR_TABLE_BCC_MAX_NUM_MCS + 1] = { // MCS-0 { @@ -113,6 +115,7 @@ static const SnrPerTable AwgnErrorTableBcc32 [ERROR_TABLE_BCC_MAX_NUM_MCS + 1] = }, }; +/// AWGN error table for BCC with reference size of 1458 bytes static const SnrPerTable AwgnErrorTableBcc1458 [ERROR_TABLE_BCC_MAX_NUM_MCS + 1] = { // MCS-0 { @@ -179,6 +182,7 @@ static const SnrPerTable AwgnErrorTableBcc1458 [ERROR_TABLE_BCC_MAX_NUM_MCS + 1] }, }; +/// AWGN error table for LDPC with reference size of 1458 bytes static const SnrPerTable AwgnErrorTableLdpc1458 [ERROR_TABLE_LDPC_MAX_NUM_MCS + 1] = { // MCS-0 { diff --git a/src/wifi/model/spectrum-wifi-phy.h b/src/wifi/model/spectrum-wifi-phy.h index 381f22f32..07f4c3dbe 100644 --- a/src/wifi/model/spectrum-wifi-phy.h +++ b/src/wifi/model/spectrum-wifi-phy.h @@ -193,7 +193,7 @@ private: Ptr m_antenna; //!< antenna model mutable Ptr m_rxSpectrumModel; //!< receive spectrum model - ///< Map a spectrum band associated with an RU to the RU specification + /// Map a spectrum band associated with an RU to the RU specification typedef std::map RuBand; std::map m_ruBands; /**< For each channel width, store all the distinct spectrum diff --git a/src/wifi/model/supported-rates.h b/src/wifi/model/supported-rates.h index a7b698d93..4dd4a8fb6 100644 --- a/src/wifi/model/supported-rates.h +++ b/src/wifi/model/supported-rates.h @@ -97,8 +97,12 @@ class SupportedRates : public WifiInformationElement public: SupportedRates (); - /// type conversion operator - SupportedRates (const SupportedRates &); + /** + * Type conversion operator + * + * \param rates the reference const SupportedRates + */ + SupportedRates (const SupportedRates & rates); // Implementations of pure virtual methods of WifiInformationElement WifiInformationElementId ElementId () const; @@ -108,7 +112,7 @@ public: uint8_t length); /** - * assignment operator + * Assignment operator * * \param rates the rates to assign * \returns the assigned value diff --git a/src/wifi/model/table-based-error-rate-model.cc b/src/wifi/model/table-based-error-rate-model.cc index 0be5e472c..e0f877199 100644 --- a/src/wifi/model/table-based-error-rate-model.cc +++ b/src/wifi/model/table-based-error-rate-model.cc @@ -33,8 +33,8 @@ namespace ns3 { -static const double SNR_PRECISION = 2; -static const double TABLED_BASED_ERROR_MODEL_PRECISION = 1e-5; +static const double SNR_PRECISION = 2; //!< precision for SNR +static const double TABLED_BASED_ERROR_MODEL_PRECISION = 1e-5; //!< precision for PER NS_OBJECT_ENSURE_REGISTERED (TableBasedErrorRateModel); diff --git a/src/wifi/model/vht/vht-capabilities.cc b/src/wifi/model/vht/vht-capabilities.cc index 8b75ea2e4..da7d21295 100644 --- a/src/wifi/model/vht/vht-capabilities.cc +++ b/src/wifi/model/vht/vht-capabilities.cc @@ -416,9 +416,9 @@ VhtCapabilities::GetRxHighestSupportedLgiDataRate () const } std::ostream & -operator << (std::ostream &os, const VhtCapabilities &VhtCapabilities) +operator << (std::ostream &os, const VhtCapabilities &vhtCapabilities) { - os << VhtCapabilities.GetVhtCapabilitiesInfo () << "|" << VhtCapabilities.GetSupportedMcsAndNssSet (); + os << vhtCapabilities.GetVhtCapabilitiesInfo () << "|" << vhtCapabilities.GetSupportedMcsAndNssSet (); return os; } diff --git a/src/wifi/model/vht/vht-capabilities.h b/src/wifi/model/vht/vht-capabilities.h index bd871fd41..71605f3f6 100644 --- a/src/wifi/model/vht/vht-capabilities.h +++ b/src/wifi/model/vht/vht-capabilities.h @@ -259,11 +259,11 @@ private: * output stream output operator * * \param os the output stream - * \param VhtCapabilities the VHT capabilities + * \param vhtCapabilities the VHT capabilities * * \returns output stream */ -std::ostream &operator << (std::ostream &os, const VhtCapabilities &vhtcapabilities); +std::ostream &operator << (std::ostream &os, const VhtCapabilities &vhtCapabilities); } //namespace ns3 diff --git a/src/wifi/model/wifi-acknowledgment.h b/src/wifi/model/wifi-acknowledgment.h index 612ef4a2b..b456e1f61 100644 --- a/src/wifi/model/wifi-acknowledgment.h +++ b/src/wifi/model/wifi-acknowledgment.h @@ -226,11 +226,11 @@ struct WifiDlMuBarBaSequence : public WifiAcknowledgment BlockAckType baType; //!< BlockAck type }; - ///< Set of stations replying with an Ack frame (no more than one) + /// Set of stations replying with an Ack frame (no more than one) std::map stationsReplyingWithNormalAck; - ///< Set of stations replying with a BlockAck frame (no more than one) + /// Set of stations replying with a BlockAck frame (no more than one) std::map stationsReplyingWithBlockAck; - ///< Set of stations receiving a BlockAckReq frame and replying with a BlockAck frame + /// Set of stations receiving a BlockAckReq frame and replying with a BlockAck frame std::map stationsSendBlockAckReqTo; }; @@ -258,7 +258,7 @@ struct WifiDlMuTfMuBar : public WifiAcknowledgment BlockAckType baType; //!< BlockAck type }; - ///< Set of stations replying with a BlockAck frame + /// Set of stations replying with a BlockAck frame std::map stationsReplyingWithBlockAck; std::list barTypes; //!< BAR types uint16_t ulLength; //!< the UL Length field of the MU-BAR Trigger Frame @@ -290,7 +290,7 @@ struct WifiDlMuAggregateTf : public WifiAcknowledgment BlockAckType baType; //!< BlockAck type }; - ///< Set of stations replying with a BlockAck frame + /// Set of stations replying with a BlockAck frame std::map stationsReplyingWithBlockAck; uint16_t ulLength; //!< the UL Length field of the MU-BAR Trigger Frames }; @@ -310,7 +310,7 @@ struct WifiUlMuMultiStaBa : public WifiAcknowledgment bool CheckQosAckPolicy (Mac48Address receiver, uint8_t tid, WifiMacHeader::QosAckPolicy ackPolicy) const override; void Print (std::ostream &os) const override; - ///< Map (originator, tid) pairs to the their index in baType + /// Map (originator, tid) pairs to the their index in baType std::map, std::size_t> stationsReceivingMultiStaBa; BlockAckType baType; //!< BlockAck type WifiTxVector tbPpduTxVector; //!< TXVECTOR for a TB PPDU diff --git a/src/wifi/model/wifi-mac-queue-item.h b/src/wifi/model/wifi-mac-queue-item.h index e93dd0695..221f4c078 100644 --- a/src/wifi/model/wifi-mac-queue-item.h +++ b/src/wifi/model/wifi-mac-queue-item.h @@ -161,6 +161,8 @@ public: * of the items in the queue. The list is empty if the item is not stored in * a queue. The list contains multiple iterators in case of A-MSDU that is not * stored in the Block Ack Manager retransmit queue. + * + * \return the list of iterators pointing to the positions of the items in the queue */ const std::list& GetQueueIteratorPairs (void) const; diff --git a/src/wifi/model/wifi-mac-queue.cc b/src/wifi/model/wifi-mac-queue.cc index 7b6ecd7b5..d7c4afdc0 100644 --- a/src/wifi/model/wifi-mac-queue.cc +++ b/src/wifi/model/wifi-mac-queue.cc @@ -75,7 +75,7 @@ WifiMacQueue::~WifiMacQueue () m_nQueuedBytes.clear (); } -static std::list> g_emptyWifiMacQueue; +static std::list> g_emptyWifiMacQueue; //!< empty Wi-Fi MAC queue const WifiMacQueue::ConstIterator WifiMacQueue::EMPTY = g_emptyWifiMacQueue.end (); diff --git a/src/wifi/model/wifi-mac-queue.h b/src/wifi/model/wifi-mac-queue.h index a673a74f4..45d8a999b 100644 --- a/src/wifi/model/wifi-mac-queue.h +++ b/src/wifi/model/wifi-mac-queue.h @@ -373,9 +373,9 @@ private: DropPolicy m_dropPolicy; //!< Drop behavior of queue mutable bool m_expiredPacketsPresent; //!< True if expired packets are in the queue - //!< Per (MAC address, TID) pair queued packets + /// Per (MAC address, TID) pair queued packets std::unordered_map m_nQueuedPackets; - //!< Per (MAC address, TID) pair queued bytes + /// Per (MAC address, TID) pair queued bytes std::unordered_map m_nQueuedBytes; /// Traced callback: fired when a packet is dropped due to lifetime expiration diff --git a/src/wifi/model/wifi-phy-common.h b/src/wifi/model/wifi-phy-common.h index d3dea58de..f5aaac31d 100644 --- a/src/wifi/model/wifi-phy-common.h +++ b/src/wifi/model/wifi-phy-common.h @@ -49,11 +49,11 @@ namespace ns3 { * enum if pybindgen is upgraded to support Callback */ typedef uint16_t WifiCodeRate; -const uint16_t WIFI_CODE_RATE_UNDEFINED = 0; -const uint16_t WIFI_CODE_RATE_1_2 = 1; -const uint16_t WIFI_CODE_RATE_2_3 = 2; -const uint16_t WIFI_CODE_RATE_3_4 = 3; -const uint16_t WIFI_CODE_RATE_5_6 = 4; +const uint16_t WIFI_CODE_RATE_UNDEFINED = 0; //!< undefined coding rate +const uint16_t WIFI_CODE_RATE_1_2 = 1; //!< 1/2 coding rate +const uint16_t WIFI_CODE_RATE_2_3 = 2; //!< 2/3 coding rate +const uint16_t WIFI_CODE_RATE_3_4 = 3; //!< 3/4 coding rate +const uint16_t WIFI_CODE_RATE_5_6 = 4; //!< 5/6 coding rate /** * \ingroup wifi diff --git a/src/wifi/model/wifi-phy.h b/src/wifi/model/wifi-phy.h index 7d34e3ef8..842bd8fb9 100644 --- a/src/wifi/model/wifi-phy.h +++ b/src/wifi/model/wifi-phy.h @@ -1098,7 +1098,7 @@ public: protected: virtual void DoDispose (void); - /* + /** * Reset data upon end of TX or RX */ void Reset (void); @@ -1130,7 +1130,7 @@ protected: * HE TB PPDU solicited by the AP. * * \param ppdu the PPDU that is being received - * \param the channel width (in MHz) used for RSSI measurement + * \return the channel width (in MHz) used for RSSI measurement */ uint16_t GetMeasurementChannelWidth (const Ptr ppdu) const; diff --git a/src/wifi/model/wifi-psdu.h b/src/wifi/model/wifi-psdu.h index 27272707d..1309697ad 100644 --- a/src/wifi/model/wifi-psdu.h +++ b/src/wifi/model/wifi-psdu.h @@ -125,13 +125,14 @@ public: /** * \brief Get a copy of the i-th A-MPDU subframe (includes subframe header, MPDU, and possibly padding) + * \param i the index in the list of A-MPDU subframes * \return the i-th A-MPDU subframe. */ Ptr GetAmpduSubframe (std::size_t i) const; /** * \brief Return the size of the i-th A-MPDU subframe. - * + * \param i the index in the list of A-MPDU subframes * \return the size of the i-th A-MPDU subframe. */ std::size_t GetAmpduSubframeSize (std::size_t i) const; diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index 4edf45790..ba68286c1 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -1069,6 +1069,10 @@ private: * If the given TXVECTOR is used for a MU transmission, return the STAID of * the station with the given address if we are an AP or our own STAID if we * are a STA associated with some AP. Otherwise, return SU_STA_ID. + * + * \param address the address of the station + * \param txVector the TXVECTOR used for a MU transmission + * \return the STA-ID of the station */ uint16_t GetStaId (Mac48Address address, const WifiTxVector& txVector) const; diff --git a/src/wifi/model/wifi-standards.h b/src/wifi/model/wifi-standards.h index 92dce88f5..203c8d7e4 100644 --- a/src/wifi/model/wifi-standards.h +++ b/src/wifi/model/wifi-standards.h @@ -189,9 +189,9 @@ inline std::ostream& operator<< (std::ostream& os, WifiStandard standard) */ struct WifiStandardInfo { - WifiPhyStandard phyStandard; - WifiPhyBand phyBand; - WifiMacStandard macStandard; + WifiPhyStandard phyStandard; //!< the PHY standard + WifiPhyBand phyBand; //!< the PHY band + WifiMacStandard macStandard; //!< the MAC standard }; /** diff --git a/src/wifi/model/wifi-tx-parameters.h b/src/wifi/model/wifi-tx-parameters.h index 80b1a97d3..edfa96d96 100644 --- a/src/wifi/model/wifi-tx-parameters.h +++ b/src/wifi/model/wifi-tx-parameters.h @@ -45,11 +45,17 @@ class WifiTxParameters { public: WifiTxParameters (); + /** + * Copy constructor. + * + * \param txParams the WifiTxParameters to copy + */ WifiTxParameters (const WifiTxParameters& txParams); /** * Copy assignment operator. * \param txParams the TX parameters to assign to this object + * \return the reference to this object */ WifiTxParameters& operator= (const WifiTxParameters& txParams); diff --git a/src/wifi/model/wifi-tx-timer.h b/src/wifi/model/wifi-tx-timer.h index b27b01f46..b19ee4c12 100644 --- a/src/wifi/model/wifi-tx-timer.h +++ b/src/wifi/model/wifi-tx-timer.h @@ -201,11 +201,11 @@ private: Ptr m_endRxEvent; //!< event to schedule upon RXSTART.indication bool m_rescheduled; //!< whether the timer has been already rescheduled - //!< the MPDU response timeout callback + /// the MPDU response timeout callback mutable MpduResponseTimeout m_mpduResponseTimeoutCallback; - //!< the PSDU response timeout callback + /// the PSDU response timeout callback mutable PsduResponseTimeout m_psduResponseTimeoutCallback; - //!< the PSDU map response timeout callback + /// the PSDU map response timeout callback mutable PsduMapResponseTimeout m_psduMapResponseTimeoutCallback; };