From fa6e4a0317d4fe3af61f46e002e188eda0f99d64 Mon Sep 17 00:00:00 2001 From: Robert Ammon Date: Sat, 19 Aug 2017 08:43:14 -0700 Subject: [PATCH] wifi: Additional Doxygen fixes --- src/wifi/examples/test-interference-helper.cc | 5 +- src/wifi/helper/ht-wifi-mac-helper.h | 3 + src/wifi/helper/qos-wifi-mac-helper.h | 1 + src/wifi/helper/spectrum-wifi-helper.h | 1 + src/wifi/helper/yans-wifi-helper.h | 1 + src/wifi/model/ampdu-tag.h | 4 +- src/wifi/model/block-ack-agreement.h | 1 + src/wifi/model/block-ack-manager.h | 27 +++- src/wifi/model/ctrl-headers.h | 4 +- src/wifi/model/dca-txop.h | 4 + src/wifi/model/dcf-state.h | 1 + src/wifi/model/edca-txop-n.h | 4 +- src/wifi/model/he-capabilities.h | 5 +- src/wifi/model/interference-helper.h | 7 +- src/wifi/model/mac-low.h | 4 +- src/wifi/model/mac-rx-middle.h | 1 + src/wifi/model/minstrel-ht-wifi-manager.h | 144 +++++++++++++++--- src/wifi/model/minstrel-wifi-manager.h | 7 +- src/wifi/model/mpdu-aggregator.h | 11 +- src/wifi/model/mpdu-standard-aggregator.h | 11 +- .../model/originator-block-ack-agreement.h | 1 + src/wifi/model/regular-wifi-mac.h | 9 +- src/wifi/model/ssid.h | 25 +++ src/wifi/model/supported-rates.h | 38 ++++- .../model/wifi-information-element-vector.h | 35 ++++- src/wifi/model/wifi-information-element.h | 4 +- src/wifi/model/wifi-mac-header.cc | 2 + src/wifi/model/wifi-mac.h | 4 +- src/wifi/model/wifi-mode.h | 3 + src/wifi/model/wifi-remote-station-manager.h | 5 +- .../model/wifi-spectrum-signal-parameters.h | 2 + src/wifi/test/dcf-manager-test.cc | 1 + 32 files changed, 317 insertions(+), 58 deletions(-) diff --git a/src/wifi/examples/test-interference-helper.cc b/src/wifi/examples/test-interference-helper.cc index 215eced05..7f34476ff 100644 --- a/src/wifi/examples/test-interference-helper.cc +++ b/src/wifi/examples/test-interference-helper.cc @@ -97,7 +97,10 @@ public: void Run (struct InterferenceExperiment::Input input); private: - /// Function triggered when a packet is dropped + /** + * Function triggered when a packet is dropped + * \param packet the packet that was dropped + */ void PacketDropped(Ptr packet); /// Send A function void SendA (void) const; diff --git a/src/wifi/helper/ht-wifi-mac-helper.h b/src/wifi/helper/ht-wifi-mac-helper.h index 7a5c94ed6..19e2de0aa 100644 --- a/src/wifi/helper/ht-wifi-mac-helper.h +++ b/src/wifi/helper/ht-wifi-mac-helper.h @@ -53,11 +53,14 @@ public: /** * Create a mac helper in a default working state. + * \returns a default HtWifiMacHelper */ static HtWifiMacHelper Default (void); /** * Converts a HT MCS value into a DataRate value + * \param mcs the HT MCS + * \returns a DataRate value for the HT MCS */ static StringValue DataRateForMcs (int mcs); }; diff --git a/src/wifi/helper/qos-wifi-mac-helper.h b/src/wifi/helper/qos-wifi-mac-helper.h index bf61b42ae..717c104c8 100644 --- a/src/wifi/helper/qos-wifi-mac-helper.h +++ b/src/wifi/helper/qos-wifi-mac-helper.h @@ -53,6 +53,7 @@ public: /** * Create a mac helper in a default working state. + * \returns a default QosWifiMacHelper */ static QosWifiMacHelper Default (void); diff --git a/src/wifi/helper/spectrum-wifi-helper.h b/src/wifi/helper/spectrum-wifi-helper.h index a61e3c120..4442c950e 100644 --- a/src/wifi/helper/spectrum-wifi-helper.h +++ b/src/wifi/helper/spectrum-wifi-helper.h @@ -45,6 +45,7 @@ public: /** * Create a phy helper in a default working state. + * \returns a default SpectrumWifPhyHelper */ static SpectrumWifiPhyHelper Default (void); diff --git a/src/wifi/helper/yans-wifi-helper.h b/src/wifi/helper/yans-wifi-helper.h index 6ea625c4d..f7d1dcce6 100644 --- a/src/wifi/helper/yans-wifi-helper.h +++ b/src/wifi/helper/yans-wifi-helper.h @@ -168,6 +168,7 @@ public: /** * Create a phy helper in a default working state. + * \returns a default YansWifiPhyHelper */ static YansWifiPhyHelper Default (void); diff --git a/src/wifi/model/ampdu-tag.h b/src/wifi/model/ampdu-tag.h index 0d3f59426..02598b26f 100644 --- a/src/wifi/model/ampdu-tag.h +++ b/src/wifi/model/ampdu-tag.h @@ -48,7 +48,9 @@ public: */ AmpduTag (); /** - * Set m_ampdu to 1. + * \param supported the A-MPDU supported flag + * + * Set the A-MPDU supported flag. */ void SetAmpdu (bool supported); /** diff --git a/src/wifi/model/block-ack-agreement.h b/src/wifi/model/block-ack-agreement.h index 881d59924..d46476a44 100644 --- a/src/wifi/model/block-ack-agreement.h +++ b/src/wifi/model/block-ack-agreement.h @@ -31,6 +31,7 @@ namespace ns3 { */ class BlockAckAgreement { + /// Provide access to MacLow class friend class MacLow; diff --git a/src/wifi/model/block-ack-manager.h b/src/wifi/model/block-ack-manager.h index 7ad8a7e41..783808092 100644 --- a/src/wifi/model/block-ack-manager.h +++ b/src/wifi/model/block-ack-manager.h @@ -72,8 +72,12 @@ class BlockAckManager : public Object private: /// type conversion operator BlockAckManager (const BlockAckManager&); - /// assignment operator - BlockAckManager& operator= (const BlockAckManager&); + /** + * assignment operator + * \param block BlockAckManager to assign + * \returns the assigned BlockAckManager + */ + BlockAckManager& operator= (const BlockAckManager& block); public: @@ -322,8 +326,8 @@ public: void SetUnblockDestinationCallback (Callback callback); /** - * \param recipient - * \param tid + * \param recipient the destination address + * \param tid the Traffic ID * \param startingSeq * * \return true if there are packets in the queue that could be sent under block ACK, @@ -336,8 +340,8 @@ public: */ bool SwitchToBlockAckIfNeeded (Mac48Address recipient, uint8_t tid, uint16_t startingSeq); /** - * \param recipient - * \param tid + * \param recipient the destination address + * \param tid the Traffic ID * * \return the sequence number of the next retry packet for a specific agreement * @@ -348,10 +352,19 @@ public: uint16_t GetSeqNumOfNextRetryPacket (Mac48Address recipient, uint8_t tid) const; /** * Checks if the packet already exists in the retransmit queue or not if it does then it doesn't add it again + * + * \param currentSeq the current sequence + * \param recipient the destination address + * \param tid the Traffic ID + * \returns true if the packet already exists */ bool AlreadyExists (uint16_t currentSeq, Mac48Address recipient, uint8_t tid) const; /** * Remove a packet after you peek in the queue and get it + * \param tid the Traffic ID + * \param recipient the destination address + * \param seqnumber sequence number + * \returns true if a packet was removed */ bool RemovePacket (uint8_t tid, Mac48Address recipient, uint16_t seqnumber); /** @@ -373,7 +386,7 @@ public: * * \param tid Traffic ID * \param seqNumber sequence number - * \param recipient mac address + * \param recipient MAC address * * \returns true if BAR retransmission needed */ diff --git a/src/wifi/model/ctrl-headers.h b/src/wifi/model/ctrl-headers.h index c3d1b2287..d8435c917 100644 --- a/src/wifi/model/ctrl-headers.h +++ b/src/wifi/model/ctrl-headers.h @@ -408,8 +408,8 @@ private: union { - uint16_t m_bitmap[64]; - uint64_t m_compressedBitmap; + uint16_t m_bitmap[64]; ///< the block ack bitmap + uint64_t m_compressedBitmap; ///< the compressed block ack bitmap } bitmap; ///< bitmap union type }; diff --git a/src/wifi/model/dca-txop.h b/src/wifi/model/dca-txop.h index a61540c21..ed45a0409 100644 --- a/src/wifi/model/dca-txop.h +++ b/src/wifi/model/dca-txop.h @@ -58,7 +58,9 @@ class CtrlBAckResponseHeader; class DcaTxop : public Object { public: + /// allow DcfListener class access friend class DcfListener; + /// allow MacLowTransmissionListener class access friend class MacLowTransmissionListener; DcaTxop (); @@ -247,6 +249,7 @@ public: virtual void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr); /** * Event handler when a Block ACK timeout has occurred. + * \param nMpdus the number of MPDUs sent in the A-MPDU transmission that results in a Block ACK timeout. */ virtual void MissedBlockAck (uint8_t nMpdus); @@ -290,6 +293,7 @@ public: protected: + ///< DcfState associated class friend class DcfState; virtual void DoDispose (void); diff --git a/src/wifi/model/dcf-state.h b/src/wifi/model/dcf-state.h index 79f881ca7..7a89418b1 100644 --- a/src/wifi/model/dcf-state.h +++ b/src/wifi/model/dcf-state.h @@ -144,6 +144,7 @@ public: protected: + /// DcfManager associated class friend class DcfManager; // Inherited from ns3::Object diff --git a/src/wifi/model/edca-txop-n.h b/src/wifi/model/edca-txop-n.h index 1408eb9ac..52599d89d 100644 --- a/src/wifi/model/edca-txop-n.h +++ b/src/wifi/model/edca-txop-n.h @@ -68,7 +68,7 @@ enum TypeOfStation class EdcaTxopN : public DcaTxop { public: - // Allow test cases to access private members + /// Allow test cases to access private members friend class ::AmpduAggregationTest; std::map m_aMpduEnabled; //!< list containing flags whether A-MPDU is enabled for a given destination address @@ -200,6 +200,7 @@ public: void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr); /** * Event handler when a Block ACK timeout has occurred. + * \param nMpdus number of MPDUs sent in the A-MPDU transmission that results in a Block ACK timeout. */ void MissedBlockAck (uint8_t nMpdus); /** @@ -424,6 +425,7 @@ public: private: + /// allow AggregationCapableTransmissionListener class access friend class AggregationCapableTransmissionListener; /** diff --git a/src/wifi/model/he-capabilities.h b/src/wifi/model/he-capabilities.h index aea41bf48..0961933ac 100644 --- a/src/wifi/model/he-capabilities.h +++ b/src/wifi/model/he-capabilities.h @@ -40,7 +40,10 @@ public: * \param hesupported the HE supported indicator */ void SetHeSupported (uint8_t hesupported); - + /** + * Get the wifi information element ID + * \returns the wifi information element ID + */ WifiInformationElementId ElementId () const; /** * Get information field size diff --git a/src/wifi/model/interference-helper.h b/src/wifi/model/interference-helper.h index bcabe3e95..333a6f5eb 100644 --- a/src/wifi/model/interference-helper.h +++ b/src/wifi/model/interference-helper.h @@ -327,7 +327,12 @@ private: double m_firstPower; ///< first power bool m_rxing; ///< flag whether it is in receiving state - /// Returns a const_iterator to the first nichange, which is later than moment + /** + * Returns a const iterator to the first nichange, which is later than moment + * + * \param moment time to check from + * \returns an iterator to the list of NiChanges + */ NiChanges::const_iterator GetPosition (Time moment); /** * Add NiChange to the list at the appropriate position. diff --git a/src/wifi/model/mac-low.h b/src/wifi/model/mac-low.h index 4c622b990..58f7a1ddd 100644 --- a/src/wifi/model/mac-low.h +++ b/src/wifi/model/mac-low.h @@ -212,6 +212,7 @@ public: private: friend std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters ¶ms); uint32_t m_nextSize; //!< the next size + /// wait ack enumerated type enum { ACK_NONE, @@ -243,8 +244,9 @@ std::ostream &operator << (std::ostream &os, const MacLowTransmissionParameters class MacLow : public Object { public: - // Allow test cases to access private members + /// Allow test cases to access private members friend class ::TwoLevelAggregationTest; + /// Allow test cases to access private members friend class ::AmpduAggregationTest; /** * typedef for a callback for MacLowRx diff --git a/src/wifi/model/mac-rx-middle.h b/src/wifi/model/mac-rx-middle.h index 9c84a908c..afee9cf3d 100644 --- a/src/wifi/model/mac-rx-middle.h +++ b/src/wifi/model/mac-rx-middle.h @@ -63,6 +63,7 @@ public: private: + /// allow MacRxMiddleTest associated class access friend class MacRxMiddleTest; /** * Look up for OriginatorRxStatus associated with the sender address diff --git a/src/wifi/model/minstrel-ht-wifi-manager.h b/src/wifi/model/minstrel-ht-wifi-manager.h index 8082df36f..7d2a4846e 100644 --- a/src/wifi/model/minstrel-ht-wifi-manager.h +++ b/src/wifi/model/minstrel-ht-wifi-manager.h @@ -46,8 +46,8 @@ typedef std::vector > TxTime; struct McsGroup { uint8_t streams; ///< streams - uint8_t sgi; ///< SQI - uint8_t chWidth; ///< channel width + uint8_t sgi; ///< short guard interval (0 or 1) + uint8_t chWidth; ///< channel width (MHz) bool isVht; ///< is VHT? bool isSupported; ///< is supported? @@ -260,37 +260,105 @@ private: */ void DoDisposeStation (WifiRemoteStation *station); - /// Check the validity of a combination of number of streams, chWidth and mode. + /** + * Check the validity of a combination of number of streams, chWidth and mode. + * + * \param phy pointer to the wifi phy + * \param streams the number of streams + * \param chWidth the channel width (MHz) + * \param mode the wifi mode + * \returns true if the combination is valid + */ bool IsValidMcs (Ptr phy, uint8_t streams, uint8_t chWidth, WifiMode mode); - /// Estimates the TxTime of a frame with a given mode and group (stream, guard interval and channel width). + /** + * Estimates the TxTime of a frame with a given mode and group (stream, guard interval and channel width). + * + * \param phy pointer to the wifi phy + * \param streams the number of streams + * \param sgi short guard interval enabled (0 or 1) + * \param chWidth the channel width (MHz) + * \param mode the wifi mode + * \returns the transmit time + */ Time CalculateMpduTxDuration (Ptr phy, uint8_t streams, uint8_t sgi, uint8_t chWidth, WifiMode mode); - /// Estimates the TxTime of a frame with a given mode and group (stream, guard interval and channel width). + /** + * Estimates the TxTime of a frame with a given mode and group (stream, guard interval and channel width). + * + * \param phy pointer to the wifi phy + * \param streams the number of streams + * \param sgi short guard interval enabled (0 or 1) + * \param chWidth the channel width (MHz) + * \param mode the wifi mode + * \returns the transmit time + */ Time CalculateFirstMpduTxDuration (Ptr phy, uint8_t streams, uint8_t sgi, uint8_t chWidth, WifiMode mode); - /// Obtain the TXtime saved in the group information. + /** + * Obtain the TXtime saved in the group information. + * + * \param groupId the group ID + * \param mode the wifi mode + * \returns the transmit time + */ Time GetMpduTxTime (uint32_t groupId, WifiMode mode) const; - /// Save a TxTime to the vector of groups. + /** + * Save a TxTime to the vector of groups. + * + * \param groupId the group ID + * \param mode the wifi mode + * \param t the transmit time + */ void AddMpduTxTime (uint32_t groupId, WifiMode mode, Time t); - /// Obtain the TXtime saved in the group information. + /** + * Obtain the TXtime saved in the group information. + * + * \param groupId the group ID + * \param mode the wifi mode + * \returns the transmit time + */ Time GetFirstMpduTxTime (uint32_t groupId, WifiMode mode) const; - /// Save a TxTime to the vector of groups. + /** + * Save a TxTime to the vector of groups. + * + * \param groupId the group ID + * \param mode the wifi mode + * \param t the transmit time + */ void AddFirstMpduTxTime (uint32_t groupId, WifiMode mode, Time t); - /// Update the number of retries and reset accordingly. + /** + * Update the number of retries and reset accordingly. + * \param station the wifi remote station + */ void UpdateRetry (MinstrelHtWifiRemoteStation *station); - /// Update the number of sample count variables. + /** + * Update the number of sample count variables. + * + * \param station the wifi remote station + * \param nSuccessfulMpdus + * \param nFailedMpdus + */ void UpdatePacketCounters (MinstrelHtWifiRemoteStation *station, uint8_t nSuccessfulMpdus, uint8_t nFailedMpdus); - /// Getting the next sample from Sample Table. + /** + * Getting the next sample from Sample Table. + * + * \param station the wifi remote station + * \returns the next sample + */ uint32_t GetNextSample (MinstrelHtWifiRemoteStation *station); - /// Set the next sample from Sample Table. + /** + * Set the next sample from Sample Table. + * + * \param station the wifi remote station + */ void SetNextSample (MinstrelHtWifiRemoteStation *station); /** @@ -456,7 +524,12 @@ private: * \returns the rate ID */ - /// Return the rateId inside a group, from the global index. + /** + * Return the rateId inside a group, from the global index. + * + * \param index the index + * \returns the rate ID + */ uint32_t GetRateId (uint32_t index); /** @@ -476,22 +549,53 @@ private: */ uint32_t GetIndex (uint32_t groupId, uint32_t rateId); - /// Returns the groupId of a HT MCS with the given number of streams, if using sgi and the channel width used. + /** + * Returns the groupId of a HT MCS with the given number of streams, if using sgi and the channel width used. + * + * \param txstreams the number of streams + * \param sgi short guard interval enabled (0 or 1) + * \param chWidth the channel width (MHz) + * \returns the HT group ID + */ uint32_t GetHtGroupId (uint8_t txstreams, uint8_t sgi, uint8_t chWidth); - /// Returns the groupId of a VHT MCS with the given number of streams, if using sgi and the channel width used. + /** + * Returns the groupId of a VHT MCS with the given number of streams, if using sgi and the channel width used. + * + * \param txstreams the number of streams + * \param sgi short guard interval enabled (0 or 1) + * \param chWidth the channel width (MHz) + * \returns the VHT group ID + */ uint32_t GetVhtGroupId (uint8_t txstreams, uint8_t sgi, uint8_t chWidth); - /// Returns the lowest global index of the rates supported by the station. + /** + * Returns the lowest global index of the rates supported by the station. + * + * \param station the minstrel HT wifi remote station + * \returns the lowest global index + */ uint32_t GetLowestIndex (MinstrelHtWifiRemoteStation *station); - /// Returns the lowest global index of the rates supported by in the group. + /** + * Returns the lowest global index of the rates supported by in the group. + * + * \param station the minstrel HT wifi remote station + * \param groupId the group ID + * \returns the lowest global index + */ uint32_t GetLowestIndex (MinstrelHtWifiRemoteStation *station, uint32_t groupId); - /// Returns a list of only the VHT MCS supported by the device. + /** + * Returns a list of only the VHT MCS supported by the device. + * \returns the list of the VHT MCS supported + */ WifiModeList GetVhtDeviceMcsList (void) const; - /// Returns a list of only the HT MCS supported by the device. + /** + * Returns a list of only the HT MCS supported by the device. + * \returns the list of the HT MCS supported + */ WifiModeList GetHtDeviceMcsList (void) const; Time m_updateStats; //!< How frequent do we calculate the stats (1/10 seconds). diff --git a/src/wifi/model/minstrel-wifi-manager.h b/src/wifi/model/minstrel-wifi-manager.h index e72ee4822..015dea390 100644 --- a/src/wifi/model/minstrel-wifi-manager.h +++ b/src/wifi/model/minstrel-wifi-manager.h @@ -275,7 +275,12 @@ private: bool IsLowLatency (void) const; - /// for estimating the TxTime of a packet with a given mode + /** + * for estimating the TxTime of a packet with a given mode + * + * \param mode Wi-Fi mode + * \returns the transmission time + */ Time GetCalcTxTime (WifiMode mode) const; /** * Add transmission time for the given mode to an internal list. diff --git a/src/wifi/model/mpdu-aggregator.h b/src/wifi/model/mpdu-aggregator.h index 0a839405e..cc0ffea2e 100644 --- a/src/wifi/model/mpdu-aggregator.h +++ b/src/wifi/model/mpdu-aggregator.h @@ -76,10 +76,17 @@ public: */ virtual bool Aggregate (Ptr packet, Ptr aggregatedPacket) const = 0; /** - * This method performs a VHT/HE single MPDU aggregation. - */ + * \param packet the packet we want to insert into aggregatedPacket. + * \param aggregatedPacket packet that will contain the packet of size packetSize, if aggregation is possible. + * + * This method performs a VHT/HE single MPDU aggregation. + */ virtual void AggregateSingleMpdu (Ptr packet, Ptr aggregatedPacket) const = 0; /** + * \param packet the packet we want to insert into aggregatedPacket. + * \param last true if it is the last packet. + * \param isSingleMpdu true if it is a single MPDU + * * Adds A-MPDU subframe header and padding to each MPDU that is part of an A-MPDU before it is sent. */ virtual void AddHeaderAndPad (Ptr packet, bool last, bool isSingleMpdu) const = 0; diff --git a/src/wifi/model/mpdu-standard-aggregator.h b/src/wifi/model/mpdu-standard-aggregator.h index 6071909c5..d49b11c6a 100644 --- a/src/wifi/model/mpdu-standard-aggregator.h +++ b/src/wifi/model/mpdu-standard-aggregator.h @@ -67,10 +67,17 @@ public: */ bool Aggregate (Ptr packet, Ptr aggregatedPacket) const; /** - * This method performs a VHT/HE single MPDU aggregation. - */ + * \param packet the packet we want to insert into aggregatedPacket. + * \param aggregatedPacket packet that will contain the packet of size packetSize, if aggregation is possible. + * + * This method performs a VHT/HE single MPDU aggregation. + */ void AggregateSingleMpdu (Ptr packet, Ptr aggregatedPacket) const; /** + * \param packet the packet we want to insert into aggregatedPacket. + * \param last true if it is the last packet. + * \param isSingleMpdu true if it is a single MPDU + * * Adds A-MPDU subframe header and padding to each MPDU that is part of an A-MPDU before it is sent. */ void AddHeaderAndPad (Ptr packet, bool last, bool isSingleMpdu) const; diff --git a/src/wifi/model/originator-block-ack-agreement.h b/src/wifi/model/originator-block-ack-agreement.h index 0de9b6124..46ad71d5b 100644 --- a/src/wifi/model/originator-block-ack-agreement.h +++ b/src/wifi/model/originator-block-ack-agreement.h @@ -32,6 +32,7 @@ namespace ns3 { */ class OriginatorBlockAckAgreement : public BlockAckAgreement { + /// allow BlockAckManager class access friend class BlockAckManager; diff --git a/src/wifi/model/regular-wifi-mac.h b/src/wifi/model/regular-wifi-mac.h index ac467d072..5608d5c9f 100644 --- a/src/wifi/model/regular-wifi-mac.h +++ b/src/wifi/model/regular-wifi-mac.h @@ -569,8 +569,13 @@ protected: private: /// type conversion operator RegularWifiMac (const RegularWifiMac &); - /// assignment operator - RegularWifiMac & operator= (const RegularWifiMac &); + /** + * assignment operator + * + * \param mac the RegularWifiMac to assign + * \returns the assigned value + */ + RegularWifiMac & operator= (const RegularWifiMac & mac); /** * This method is a private utility invoked to configure the channel diff --git a/src/wifi/model/ssid.h b/src/wifi/model/ssid.h index a06dbec2e..6007701a8 100644 --- a/src/wifi/model/ssid.h +++ b/src/wifi/model/ssid.h @@ -75,9 +75,34 @@ public: */ char* PeekString (void) const; + /** + * Get the ElementID. + * + * \returns the element ID + */ WifiInformationElementId ElementId () const; + + /** + * Get the information field size. + * + * \returns the information field size + */ uint8_t GetInformationFieldSize () const; + + /** + * Get the information field size. + * + * \param start the information field iterator + */ void SerializeInformationField (Buffer::Iterator start) const; + + /** + * Get the information field size. + * + * \param start the information field iterator + * \param length the size of the information field + * \returns the size of the field read + */ uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length); diff --git a/src/wifi/model/supported-rates.h b/src/wifi/model/supported-rates.h index 06d1e8acb..22cbaf86c 100644 --- a/src/wifi/model/supported-rates.h +++ b/src/wifi/model/supported-rates.h @@ -79,8 +79,8 @@ public: * Deserialize information field. * * \param start the iterator - * \param length the field length - * \returns the information field + * \param length the field length (bytes) + * \returns length of the information field deserialized (bytes) */ uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length); @@ -133,8 +133,13 @@ public: /// type conversion operator SupportedRates (const SupportedRates &); - /// assignment operator - SupportedRates& operator= (const SupportedRates&); + /** + * assignment operator + * + * \param rates the rates to assign + * \returns the assigned value + */ + SupportedRates& operator= (const SupportedRates& rates); /** * This defines the maximum number of supported rates that a STA is @@ -207,14 +212,35 @@ public: * \return the rate */ uint32_t GetRate (uint8_t i) const; - + /** + * Get the ElementID. + * + * \returns the element ID + */ WifiInformationElementId ElementId () const; + /** + * Get the information field size. + * + * \returns the information field size + */ uint8_t GetInformationFieldSize () const; + /** + * Get the information field size. + * + * \param start the information field iterator + */ void SerializeInformationField (Buffer::Iterator start) const; + /** + * Get the information field size. + * + * \param start the information field iterator + * \param length the size of the information field (bytes) + * \returns the size of the field read (bytes) + */ uint8_t DeserializeInformationField (Buffer::Iterator start, uint8_t length); - /* + /** * We support the Extended Supported Rates Information Element * through the ExtendedSupportedRatesIE object which is declared * above. We allow this class to be a friend so that it can access diff --git a/src/wifi/model/wifi-information-element-vector.h b/src/wifi/model/wifi-information-element-vector.h index 3001fb8b1..db733578c 100644 --- a/src/wifi/model/wifi-information-element-vector.h +++ b/src/wifi/model/wifi-information-element-vector.h @@ -68,17 +68,37 @@ public: * \return deserialized bytes */ virtual uint32_t DeserializeSingleIe (Buffer::Iterator start); - /// Set maximum size to control overflow of the max packet length + /** + * Set maximum size to control overflow of the max packet length + * + * \param size the maximum size to set (bytes) + */ void SetMaxSize (uint16_t size); /// As soon as this is a vector, we define an Iterator typedef std::vector >::iterator Iterator; - /// Returns Begin of the vector + /** + * Returns Begin of the vector + * \returns the begin of the vector + */ Iterator Begin (); - /// Returns End of the vector + /** + * Returns End of the vector + * \returns the end of the vector + */ Iterator End (); - /// add an IE, if maxSize has exceeded, returns false + /** + * add an IE, if maxSize has exceeded, returns false + * + * \param element wifi information element to add + * \returns true is added + */ bool AddInformationElement (Ptr element); - /// vector of pointers to information elements is the body of IeVector + /** + * vector of pointers to information elements is the body of IeVector + * + * \param id the element id to find + * \returns the information element + */ Ptr FindFirst (WifiInformationElementId id) const; /** @@ -97,7 +117,10 @@ protected: * typedef for a vector of WifiInformationElements. */ typedef std::vector > IE_VECTOR; - /// Current number of bytes + /** + * Current number of bytes + * \returns the number of bytes + */ uint32_t GetSize () const; IE_VECTOR m_elements; //!< Information element vector /// Size in bytes (actually, max packet length) diff --git a/src/wifi/model/wifi-information-element.h b/src/wifi/model/wifi-information-element.h index 77caa3d2f..44dd1d586 100644 --- a/src/wifi/model/wifi-information-element.h +++ b/src/wifi/model/wifi-information-element.h @@ -269,7 +269,9 @@ public: uint16_t GetSerializedSize () const; // Each subclass must implement these pure virtual functions: - /// Own unique Element ID + /** + * \returns Own unique Element ID + */ virtual WifiInformationElementId ElementId () const = 0; /** * Length of serialized information (i.e., the length of the body diff --git a/src/wifi/model/wifi-mac-header.cc b/src/wifi/model/wifi-mac-header.cc index 135544072..7f57ff940 100644 --- a/src/wifi/model/wifi-mac-header.cc +++ b/src/wifi/model/wifi-mac-header.cc @@ -27,6 +27,7 @@ namespace ns3 { NS_OBJECT_ENSURE_REGISTERED (WifiMacHeader); +/// type enumeration enum { TYPE_MGT = 0, @@ -34,6 +35,7 @@ enum TYPE_DATA = 2 }; +/// subtype enumeration enum { //Reserved: 0 - 6 diff --git a/src/wifi/model/wifi-mac.h b/src/wifi/model/wifi-mac.h index adc0a43e8..c3758631a 100644 --- a/src/wifi/model/wifi-mac.h +++ b/src/wifi/model/wifi-mac.h @@ -201,11 +201,11 @@ public: */ virtual void SetWifiPhy (Ptr phy) = 0; /** - * return current attached WifiPhy device + * \return currently attached WifiPhy device */ virtual Ptr GetWifiPhy (void) const = 0; /** - * remove current attached WifiPhy device from this MAC. + * remove currently attached WifiPhy device from this MAC. */ virtual void ResetWifiPhy (void) = 0; /** diff --git a/src/wifi/model/wifi-mode.h b/src/wifi/model/wifi-mode.h index 628050e5b..e97aec095 100644 --- a/src/wifi/model/wifi-mode.h +++ b/src/wifi/model/wifi-mode.h @@ -222,7 +222,9 @@ public: private: + /// allow WifiModeFactory class access friend class WifiModeFactory; + /// allow WifiPhyTag class access friend class WifiPhyTag; // access the UID-based constructor /** * Create a WifiMode from a given unique ID. @@ -299,6 +301,7 @@ public: private: + /// allow WifiMode class access friend class WifiMode; friend std::istream & operator >> (std::istream &is, WifiMode &mode); diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index bd25f7327..fb31579a8 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -57,7 +57,10 @@ public: void NotifyTxSuccess (uint32_t retryCounter); /// Updates average frame error rate when final data or RTS has failed. void NotifyTxFailed (); - /// Return frame error rate (probability that frame is corrupted due to transmission error). + /** + * Return frame error rate (probability that frame is corrupted due to transmission error). + * \returns the frame error rate + */ double GetFrameErrorRate () const; private: /** diff --git a/src/wifi/model/wifi-spectrum-signal-parameters.h b/src/wifi/model/wifi-spectrum-signal-parameters.h index a523ba185..fc99ba9c6 100644 --- a/src/wifi/model/wifi-spectrum-signal-parameters.h +++ b/src/wifi/model/wifi-spectrum-signal-parameters.h @@ -46,6 +46,8 @@ struct WifiSpectrumSignalParameters : public SpectrumSignalParameters /** * copy constructor + * + * \param p the wifi spectrum signal parameters */ WifiSpectrumSignalParameters (const WifiSpectrumSignalParameters& p); diff --git a/src/wifi/test/dcf-manager-test.cc b/src/wifi/test/dcf-manager-test.cc index 1a8afe29d..f4ddeabac 100644 --- a/src/wifi/test/dcf-manager-test.cc +++ b/src/wifi/test/dcf-manager-test.cc @@ -52,6 +52,7 @@ public: private: + /// allow DcfManagerTest class access friend class DcfManagerTest; typedef std::pair ExpectedGrant; //!< the expected grant typedef