From 961f9ab0256b79640942e45caea9d9153f375ece Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Tue, 30 Nov 2021 15:56:33 +0100 Subject: [PATCH] wifi: Doxygen fixes --- examples/wireless/wifi-mixed-network.cc | 36 ++++++++------- .../wireless/wifi-rate-adaptation-distance.cc | 44 ++++++++++++++----- 2 files changed, 54 insertions(+), 26 deletions(-) diff --git a/examples/wireless/wifi-mixed-network.cc b/examples/wireless/wifi-mixed-network.cc index b00c2586e..cde7a660d 100644 --- a/examples/wireless/wifi-mixed-network.cc +++ b/examples/wireless/wifi-mixed-network.cc @@ -61,29 +61,35 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("MixedNetwork"); +/** Parameters */ struct Parameters { - std::string testName; - bool enableErpProtection; - std::string erpProtectionMode; - bool enableShortSlotTime; - bool enableShortPhyPreamble; - WifiStandard apType; - uint32_t nWifiB; - bool bHasTraffic; - uint32_t nWifiG; - bool gHasTraffic; - uint32_t nWifiN; - bool nHasTraffic; - bool isUdp; - uint32_t payloadSize; - double simulationTime; + std::string testName; //!< Test name + bool enableErpProtection; //!< True to enable ERP protection + std::string erpProtectionMode; //!< ERP protection mode + bool enableShortSlotTime; //!< True to enable short slot time + bool enableShortPhyPreamble; //!< True to enable short PHY preamble + WifiStandard apType; //!< Wifi standard for AP + uint32_t nWifiB; //!< Number of 802.11b stations + bool bHasTraffic; //!< True if 802.11b stations generate traffic + uint32_t nWifiG; //!< Number of 802.11g stations + bool gHasTraffic; //!< True if 802.11g stations generate traffic + uint32_t nWifiN; //!< Number of 802.11n stations + bool nHasTraffic; //!< True if 802.11n stations generate traffic + bool isUdp; //!< True to generate UDP traffic + uint32_t payloadSize; //!< Payload size in bytes + double simulationTime; //!< Simulation time in seconds }; class Experiment { public: Experiment (); + /** + * Run an experiment with the given parameters + * \param params the given parameters + * \return the throughput + */ double Run (Parameters params); }; diff --git a/examples/wireless/wifi-rate-adaptation-distance.cc b/examples/wireless/wifi-rate-adaptation-distance.cc index 61204a9cc..706364c02 100644 --- a/examples/wireless/wifi-rate-adaptation-distance.cc +++ b/examples/wireless/wifi-rate-adaptation-distance.cc @@ -71,23 +71,51 @@ using namespace std; NS_LOG_COMPONENT_DEFINE ("RateAdaptationDistance"); +/** Node statistics */ class NodeStatistics { public: + /** + * Constructor + * \param aps AP devices + * \param stas STA devices + */ NodeStatistics (NetDeviceContainer aps, NetDeviceContainer stas); - void CheckStatistics (double time); - + /** + * RX callback + * \param path path + * \param packet received packet + * \param from sender + */ void RxCallback (std::string path, Ptr packet, const Address &from); + /** + * Set node position + * \param node the node + * \param position the position + */ void SetPosition (Ptr node, Vector position); + /** + * Advance node position + * \param node the node + * \param stepsSize the size of a step + * \param stepsTime the time interval between steps + */ void AdvancePosition (Ptr node, int stepsSize, int stepsTime); + /** + * Get node position + * \param node the node + * \return the position + */ Vector GetPosition (Ptr node); - + /** + * \return the gnuplot 2d dataset + */ Gnuplot2dDataset GetDatafile (); private: - uint32_t m_bytesTotal; - Gnuplot2dDataset m_output; + uint32_t m_bytesTotal; //!< total bytes + Gnuplot2dDataset m_output; //!< gnuplot 2d dataset }; NodeStatistics::NodeStatistics (NetDeviceContainer aps, NetDeviceContainer stas) @@ -101,12 +129,6 @@ NodeStatistics::RxCallback (std::string path, Ptr packet, const Ad m_bytesTotal += packet->GetSize (); } -void -NodeStatistics::CheckStatistics (double time) -{ - -} - void NodeStatistics::SetPosition (Ptr node, Vector position) {