From c9cdd4cf661038422021326bec3e6aa457580925 Mon Sep 17 00:00:00 2001 From: Rediet Date: Thu, 19 Mar 2020 12:13:13 +0100 Subject: [PATCH] wifi: Correct typos and improve doxy (part 3) Logging system outputs have not been modified (to avoid breaking any parsing scripts). In this commit, helpers are covered --- src/wifi/helper/athstats-helper.cc | 4 +- src/wifi/helper/athstats-helper.h | 60 +++++++++---------- src/wifi/helper/spectrum-wifi-helper.h | 6 +- src/wifi/helper/wifi-helper.cc | 12 ++-- src/wifi/helper/wifi-helper.h | 34 +++++------ src/wifi/helper/wifi-mac-helper.h | 2 +- .../helper/wifi-radio-energy-model-helper.cc | 2 +- .../helper/wifi-radio-energy-model-helper.h | 6 +- src/wifi/helper/yans-wifi-helper.h | 20 +++---- 9 files changed, 72 insertions(+), 74 deletions(-) diff --git a/src/wifi/helper/athstats-helper.cc b/src/wifi/helper/athstats-helper.cc index c85f1cdcf..a003095c2 100644 --- a/src/wifi/helper/athstats-helper.cc +++ b/src/wifi/helper/athstats-helper.cc @@ -264,8 +264,8 @@ AthstatsWifiTraceSink::WriteStats () //I know C strings are ugly but that's the quickest way to use exactly the same format as in madwifi char str[200]; snprintf (str, 200, "%8u %8u %7u %7u %7u %6u %6u %6u %7u %4u %3uM\n", - (unsigned int) m_txCount, // /proc/net/dev transmitted packets to which we should subtract mgmt frames - (unsigned int) m_rxCount, // /proc/net/dev received packets but subracts mgmt frames from it + (unsigned int) m_txCount, // /proc/net/dev transmitted packets to which we should subtract management frames + (unsigned int) m_rxCount, // /proc/net/dev received packets but subtracts management frames from it (unsigned int) 0, // ast_tx_altrate (unsigned int) m_shortRetryCount, // ast_tx_shortretry (unsigned int) m_longRetryCount, // ast_tx_longretry diff --git a/src/wifi/helper/athstats-helper.h b/src/wifi/helper/athstats-helper.h index faecf674e..b28fa52a5 100644 --- a/src/wifi/helper/athstats-helper.h +++ b/src/wifi/helper/athstats-helper.h @@ -106,7 +106,7 @@ public: /** * function to be called when the net device transmits a packet * - * @param context + * @param context the calling context * @param p the packet being transmitted */ void DevTxTrace (std::string context, Ptr p); @@ -114,7 +114,7 @@ public: /** * function to be called when the net device receives a packet * - * @param context + * @param context the calling context * @param p the packet being received */ void DevRxTrace (std::string context, Ptr p); @@ -123,7 +123,7 @@ public: * Function to be called when a RTS frame transmission by the considered * device has failed * - * @param context + * @param context the calling context * @param address the MAC address of the remote station */ void TxRtsFailedTrace (std::string context, Mac48Address address); @@ -132,7 +132,7 @@ public: * Function to be called when a data frame transmission by the considered * device has failed * - * @param context + * @param context the calling context * @param address the MAC address of the remote station */ void TxDataFailedTrace (std::string context, Mac48Address address); @@ -141,7 +141,7 @@ public: * Function to be called when the transmission of a RTS frame has * exceeded the retry limit * - * @param context + * @param context the calling context * @param address the MAC address of the remote station */ void TxFinalRtsFailedTrace (std::string context, Mac48Address address); @@ -150,7 +150,7 @@ public: * Function to be called when the transmission of a data frame has * exceeded the retry limit * - * @param context + * @param context the calling context * @param address the MAC address of the remote station */ void TxFinalDataFailedTrace (std::string context, Mac48Address address); @@ -159,11 +159,11 @@ public: * Function to be called when the PHY layer of the considered * device receives a frame * - * @param context - * @param packet - * @param snr - * @param mode - * @param preamble + * @param context the calling context + * @param packet the packet + * @param snr the SNR in linear scale + * @param mode the WifiMode + * @param preamble the wifi preamble */ void PhyRxOkTrace (std::string context, Ptr packet, double snr, WifiMode mode, WifiPreamble preamble); @@ -172,9 +172,9 @@ public: * layer of the considered device resulted in an error due to a failure in the CRC check of * the frame * - * @param context - * @param packet - * @param snr + * @param context the calling context + * @param packet the packet + * @param snr the SNR in linear scale */ void PhyRxErrorTrace (std::string context, Ptr packet, double snr); @@ -182,11 +182,11 @@ public: * Function to be called when a frame is being transmitted by the * PHY layer of the considered device * - * @param context - * @param packet - * @param mode - * @param preamble - * @param txPower + * @param context the calling context + * @param packet the packet + * @param mode the WifiMode + * @param preamble the wifi preamble + * @param txPower the transmit power level */ void PhyTxTrace (std::string context, Ptr packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower); @@ -194,10 +194,10 @@ public: * Function to be called when the PHY layer of the considered device * changes state * - * @param context - * @param start - * @param duration - * @param state + * @param context the calling context + * @param start the time at which the state changed + * @param duration the duration of the state + * @param state the PHY layer state */ void PhyStateTrace (std::string context, Time start, Time duration, WifiPhyState state); @@ -215,14 +215,14 @@ private: /// Reset counters function void ResetCounters (); - uint32_t m_txCount; ///< transmit count - uint32_t m_rxCount; ///< receive count - uint32_t m_shortRetryCount; ///< short retry count - uint32_t m_longRetryCount; ///< long retry count + uint32_t m_txCount; ///< transmit count + uint32_t m_rxCount; ///< receive count + uint32_t m_shortRetryCount; ///< short retry count + uint32_t m_longRetryCount; ///< long retry count uint32_t m_exceededRetryCount; ///< exceeded retry count - uint32_t m_phyRxOkCount; ///< phy receive ok count - uint32_t m_phyRxErrorCount; ///< phy receive error count - uint32_t m_phyTxCount; ///< phy transmit count + uint32_t m_phyRxOkCount; ///< PHY receive OK count + uint32_t m_phyRxErrorCount; ///< PHY receive error count + uint32_t m_phyTxCount; ///< PHY transmit count std::ofstream *m_writer; ///< output stream diff --git a/src/wifi/helper/spectrum-wifi-helper.h b/src/wifi/helper/spectrum-wifi-helper.h index 4442c950e..c1a48239c 100644 --- a/src/wifi/helper/spectrum-wifi-helper.h +++ b/src/wifi/helper/spectrum-wifi-helper.h @@ -30,7 +30,7 @@ class SpectrumChannel; /** * \brief Make it easy to create and manage PHY objects for the spectrum model. * - * The Pcap and ascii traces generated by the EnableAscii and EnablePcap methods defined + * The Pcap and ASCII traces generated by the EnableAscii and EnablePcap methods defined * in this class correspond to PHY-level traces and come to us via WifiPhyHelper * */ @@ -38,13 +38,13 @@ class SpectrumWifiPhyHelper : public WifiPhyHelper { public: /** - * Create a phy helper without any parameter set. The user must set + * Create a PHY helper without any parameter set. The user must set * them all to be able to call Install later. */ SpectrumWifiPhyHelper (); /** - * Create a phy helper in a default working state. + * Create a PHY helper in a default working state. * \returns a default SpectrumWifPhyHelper */ static SpectrumWifiPhyHelper Default (void); diff --git a/src/wifi/helper/wifi-helper.cc b/src/wifi/helper/wifi-helper.cc index 4580fc06c..36aaf8fa7 100644 --- a/src/wifi/helper/wifi-helper.cc +++ b/src/wifi/helper/wifi-helper.cc @@ -46,7 +46,7 @@ namespace ns3 { NS_LOG_COMPONENT_DEFINE ("WifiHelper"); /** - * ASCII trace Phy transmit sink with context + * ASCII trace PHY transmit sink with context * \param stream the output stream * \param context the context name * \param p the packet @@ -68,7 +68,7 @@ AsciiPhyTransmitSinkWithContext ( } /** - * ASCII trace Phy transmit sink without context + * ASCII trace PHY transmit sink without context * \param stream the output stream * \param p the packet * \param mode the wifi mode @@ -88,7 +88,7 @@ AsciiPhyTransmitSinkWithoutContext ( } /** - * ASCII trace Phy receive sink with context + * ASCII trace PHY receive sink with context * \param stream the output stream * \param context the context name * \param p the packet @@ -110,7 +110,7 @@ AsciiPhyReceiveSinkWithContext ( } /** - * ASCII trace Phy receive sink without context + * ASCII trace PHY receive sink without context * \param stream the output stream * \param p the packet * \param snr the SNR @@ -578,7 +578,7 @@ WifiPhyHelper::EnableAsciiInternal ( Ptr nd, bool explicitFilename) { - //All of the ascii enable functions vector through here including the ones + //All of the ASCII enable functions vector through here including the ones //that are wandering through all of devices on perhaps all of the nodes in //the system. We can only deal with devices of type WifiNetDevice. Ptr device = nd->GetObject (); @@ -618,7 +618,7 @@ WifiPhyHelper::EnableAsciiInternal ( } Ptr theStream = asciiTraceHelper.CreateFileStream (filename); - //We could go poking through the phy and the state looking for the + //We could go poking through the PHY and the state looking for the //correct trace source, but we can let Config deal with that with //some search cost. Since this is presumably happening at topology //creation time, it doesn't seem much of a price to pay. diff --git a/src/wifi/helper/wifi-helper.h b/src/wifi/helper/wifi-helper.h index 3d5ef995a..6ba73d1ca 100644 --- a/src/wifi/helper/wifi-helper.h +++ b/src/wifi/helper/wifi-helper.h @@ -208,7 +208,7 @@ protected: * \param txVector the TXVECTOR * \param aMpdu the A-MPDU information * - * Handle tx pcap. + * Handle TX pcap. */ static void PcapSniffTxEvent (Ptr file, Ptr packet, @@ -221,9 +221,9 @@ protected: * \param channelFreqMhz the channel frequency * \param txVector the TXVECTOR * \param aMpdu the A-MPDU information - * \param signalNoise the rx signal and noise information + * \param signalNoise the RX signal and noise information * - * Handle rx pcap. + * Handle RX pcap. */ static void PcapSniffRxEvent (Ptr file, Ptr packet, @@ -240,14 +240,14 @@ protected: private: /** - * Get the radiotap header. + * Get the Radiotap header. * * \param packet the packet * \param channelFreqMhz the channel frequency * \param txVector the TXVECTOR * \param aMpdu the A-MPDU information * - * \returns the radiotap header + * \returns the Radiotap header */ static RadiotapHeader GetRadiotapHeader (Ptr packet, uint16_t channelFreqMhz, @@ -271,13 +271,13 @@ private: bool explicitFilename); /** - * \brief Enable ascii trace output on the indicated net device. + * \brief Enable ASCII trace output on the indicated net device. * * NetDevice-specific implementation mechanism for hooking the trace and * writing to the trace file. * - * \param stream The output stream object to use when logging ascii traces. - * \param prefix Filename prefix to use for ascii trace files. + * \param stream The output stream object to use when logging ASCII traces. + * \param prefix Filename prefix to use for ASCII trace files. * \param nd Net device for which you want to enable tracing. * \param explicitFilename Treat the prefix as an explicit filename if true */ @@ -415,7 +415,7 @@ public: /** * \param f the select queue callback * - * Set the select queue callback to set on the netdevice queue interface aggregated + * Set the select queue callback to set on the NetDevice queue interface aggregated * to the WifiNetDevice, in case RegularWifiMac with QoS enabled is used */ void SetSelectQueueCallback (SelectQueueCallback f); @@ -456,13 +456,13 @@ public: virtual NetDeviceContainer Install (const WifiPhyHelper &phy, const WifiMacHelper &mac, std::string nodeName) const; /** - * \param standard the phy standard to configure during installation + * \param standard the PHY standard to configure during installation * * This method sets standards-compliant defaults for WifiMac - * parameters such as sifs time, slot time, timeout values, etc., + * parameters such as SIFS time, slot time, timeout values, etc., * based on the standard selected. It results in * WifiMac::ConfigureStandard(standard) being called on each - * installed mac object. + * installed MAC object. * * The default standard of 802.11a will be applied if SetStandard() * is not called. @@ -488,7 +488,7 @@ public: /** * Assign a fixed random variable stream number to the random variables - * used by the Phy and Mac aspects of the Wifi models. Each device in + * used by the PHY and MAC aspects of the Wifi models. Each device in * container c has fixed stream numbers assigned to its random variables. * The Wifi channel (e.g. propagation loss model) is excluded. * Return the number of streams (possibly zero) that @@ -504,11 +504,11 @@ public: protected: - ObjectFactory m_stationManager; ///< station manager - ObjectFactory m_ackPolicySelector[4]; ///< ack policy selector for all ACs - WifiPhyStandard m_standard; ///< wifi standard + ObjectFactory m_stationManager; ///< station manager + ObjectFactory m_ackPolicySelector[4]; ///< ack policy selector for all ACs + WifiPhyStandard m_standard; ///< wifi standard SelectQueueCallback m_selectQueueCallback; ///< select queue callback - ObjectFactory m_obssPdAlgorithm; ///< OBSS PD algorithm + ObjectFactory m_obssPdAlgorithm; ///< OBSS_PD algorithm }; } //namespace ns3 diff --git a/src/wifi/helper/wifi-mac-helper.h b/src/wifi/helper/wifi-mac-helper.h index e652cc556..1a28aa2fd 100644 --- a/src/wifi/helper/wifi-mac-helper.h +++ b/src/wifi/helper/wifi-mac-helper.h @@ -84,7 +84,7 @@ public: * \param v10 the value of the attribute to set * * All the attributes specified in this method should exist - * in the requested mac. + * in the requested MAC. */ virtual void SetType (std::string type, std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), diff --git a/src/wifi/helper/wifi-radio-energy-model-helper.cc b/src/wifi/helper/wifi-radio-energy-model-helper.cc index 472fa30f4..8f806da53 100644 --- a/src/wifi/helper/wifi-radio-energy-model-helper.cc +++ b/src/wifi/helper/wifi-radio-energy-model-helper.cc @@ -128,7 +128,7 @@ WifiRadioEnergyModelHelper::DoInstall (Ptr device, source->AppendDeviceEnergyModel (model); // set energy source pointer model->SetEnergySource (source); - // create and register energy model phy listener + // create and register energy model PHY listener wifiPhy->RegisterListener (model->GetPhyListener ()); // if (m_txCurrentModel.GetTypeId ().GetUid ()) diff --git a/src/wifi/helper/wifi-radio-energy-model-helper.h b/src/wifi/helper/wifi-radio-energy-model-helper.h index 46279f95d..182e4b675 100644 --- a/src/wifi/helper/wifi-radio-energy-model-helper.h +++ b/src/wifi/helper/wifi-radio-energy-model-helper.h @@ -59,16 +59,14 @@ public: * * Sets the callback to be invoked when energy is depleted. */ - void SetDepletionCallback ( - WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback); + void SetDepletionCallback (WifiRadioEnergyModel::WifiRadioEnergyDepletionCallback callback); /** * \param callback Callback function for energy recharged handling. * * Sets the callback to be invoked when energy is recharged. */ - void SetRechargedCallback ( - WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback callback); + void SetRechargedCallback (WifiRadioEnergyModel::WifiRadioEnergyRechargedCallback callback); /** * \param name the name of the model to set diff --git a/src/wifi/helper/yans-wifi-helper.h b/src/wifi/helper/yans-wifi-helper.h index f7d1dcce6..fa29c3f0e 100644 --- a/src/wifi/helper/yans-wifi-helper.h +++ b/src/wifi/helper/yans-wifi-helper.h @@ -27,10 +27,10 @@ namespace ns3 { /** - * \brief manage and create wifi channel objects for the yans model. + * \brief manage and create wifi channel objects for the YANS model. * * The intent of this class is to make it easy to create a channel object - * which implements the yans channel model. The yans channel model is described + * which implements the YANS channel model. The YANS channel model is described * in "Yet Another Network Simulator", http://cutebugs.net/files/wns2-yans.pdf */ class YansWifiChannelHelper @@ -72,10 +72,10 @@ public: * * Add a propagation loss model to the set of currently-configured loss models. * This method is additive to allow you to construct complex propagation loss models - * such as a log distance + jakes model, etc. + * such as a log distance + Jakes model, etc. * * The order in which PropagationLossModels are added may be significant. Some - * propagation models are dependent of the "txPower" (eg. Nakagami model), and + * propagation models are dependent of the "txPower" (e.g. Nakagami model), and * are therefore not commutative. The final receive power (excluding receiver * gains) are calculated in the order the models are added. */ @@ -148,12 +148,12 @@ private: /** - * \brief Make it easy to create and manage PHY objects for the yans model. + * \brief Make it easy to create and manage PHY objects for the YANS model. * - * The yans PHY model is described in "Yet Another Network Simulator", + * The YANS PHY model is described in "Yet Another Network Simulator", * http://cutebugs.net/files/wns2-yans.pdf * - * The Pcap and ascii traces generated by the EnableAscii and EnablePcap methods defined + * The Pcap and ASCII traces generated by the EnableAscii and EnablePcap methods defined * in this class correspond to PHY-level traces and come to us via WifiPhyHelper * */ @@ -161,13 +161,13 @@ class YansWifiPhyHelper : public WifiPhyHelper { public: /** - * Create a phy helper without any parameter set. The user must set + * Create a PHY helper without any parameter set. The user must set * them all to be able to call Install later. */ YansWifiPhyHelper (); /** - * Create a phy helper in a default working state. + * Create a PHY helper in a default working state. * \returns a default YansWifiPhyHelper */ static YansWifiPhyHelper Default (void); @@ -195,7 +195,7 @@ private: */ virtual Ptr Create (Ptr node, Ptr device) const; - Ptr m_channel; ///< yans wifi channel + Ptr m_channel; ///< YANS wifi channel }; } //namespace ns3