From c16007469dd8463a01f87f307ddfec6766c9b9df Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Sun, 2 May 2021 03:16:59 +0200 Subject: [PATCH] doxygen: fix warnings in uan, dsr, wimax --- src/dsr/helper/dsr-helper.h | 3 +- src/dsr/helper/dsr-main-helper.h | 3 +- src/dsr/model/dsr-fs-header.h | 2 - src/dsr/model/dsr-option-header.h | 11 -- src/dsr/model/dsr-options.h | 3 +- src/dsr/model/dsr-rcache.h | 16 +- src/dsr/model/dsr-routing.h | 174 ++++++++++++------ src/uan/model/uan-header-common.h | 9 +- src/uan/model/uan-mac.h | 9 + src/uan/model/uan-net-device.h | 10 + src/wimax/examples/wimax-multicast.cc | 28 ++- src/wimax/model/bs-net-device.h | 3 +- src/wimax/model/bs-uplink-scheduler-simple.h | 8 +- .../model/snr-to-block-error-rate-record.cc | 8 +- .../model/snr-to-block-error-rate-record.h | 15 +- src/wimax/model/ss-service-flow-manager.h | 8 +- 16 files changed, 201 insertions(+), 109 deletions(-) diff --git a/src/dsr/helper/dsr-helper.h b/src/dsr/helper/dsr-helper.h index f6ec94486..85b6d0796 100644 --- a/src/dsr/helper/dsr-helper.h +++ b/src/dsr/helper/dsr-helper.h @@ -61,8 +61,9 @@ public: /** * \brief Construct an DsrHelper from another previously initialized instance * (Copy Constructor). + * \param o object to copy from */ - DsrHelper (const DsrHelper &); + DsrHelper (const DsrHelper &o); /** * \returns pointer to clone of this DsrHelper * diff --git a/src/dsr/helper/dsr-main-helper.h b/src/dsr/helper/dsr-main-helper.h index a58db7ab3..9204a53a6 100644 --- a/src/dsr/helper/dsr-main-helper.h +++ b/src/dsr/helper/dsr-main-helper.h @@ -57,8 +57,9 @@ public: /** * \brief Construct an DsrMainHelper from another previously initialized instance * (Copy Constructor). + * \param o object to copy from */ - DsrMainHelper (const DsrMainHelper &); + DsrMainHelper (const DsrMainHelper &o); /** * Install routing to the nodes * \param dsrHelper The DSR helper class diff --git a/src/dsr/model/dsr-fs-header.h b/src/dsr/model/dsr-fs-header.h index bce0335e4..913d15c82 100644 --- a/src/dsr/model/dsr-fs-header.h +++ b/src/dsr/model/dsr-fs-header.h @@ -150,7 +150,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -299,7 +298,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** diff --git a/src/dsr/model/dsr-option-header.h b/src/dsr/model/dsr-option-header.h index a23ee49ed..64ff7a316 100644 --- a/src/dsr/model/dsr-option-header.h +++ b/src/dsr/model/dsr-option-header.h @@ -100,7 +100,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -171,7 +170,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -221,7 +219,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -350,7 +347,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -502,7 +498,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -643,7 +638,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -795,7 +789,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -951,7 +944,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -1098,7 +1090,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -1197,7 +1188,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** @@ -1304,7 +1294,6 @@ public: /** * \brief Print some information about the packet. * \param os output stream - * \return info about this packet */ virtual void Print (std::ostream &os) const; /** diff --git a/src/dsr/model/dsr-options.h b/src/dsr/model/dsr-options.h index 33f2f401b..ec4078285 100644 --- a/src/dsr/model/dsr-options.h +++ b/src/dsr/model/dsr-options.h @@ -183,8 +183,7 @@ public: /** * \brief Remove the duplicates from the route * - * \param vec List of IPv4 addresses to be clean - * \return the route after route shorten + * \param [in,out] vec List of IPv4 addresses to clean */ void RemoveDuplicates (std::vector& vec); /** diff --git a/src/dsr/model/dsr-rcache.h b/src/dsr/model/dsr-rcache.h index ae543550b..8d1d42bcc 100644 --- a/src/dsr/model/dsr-rcache.h +++ b/src/dsr/model/dsr-rcache.h @@ -706,28 +706,36 @@ public: } /** * \brief Add ARP cache to be used to allow layer 2 notifications processing + * \param a ARP cache */ - void AddArpCache (Ptr); + void AddArpCache (Ptr a); /** * \brief Don't use the provided ARP cache any more (interface is down) + * \param a ARP cache */ void DelArpCache (Ptr); /** * \brief Get callback to ProcessTxError, this callback is trying to use the wifi mac tx error header to notify a link layer drop event, however, * it is not fully supported yet + * \return The callback to ProcessTxError */ Callback GetTxErrorCallback () const { return m_txErrorCallback; } - /// Handle link failure callback - /// \param cb the callback to be set + /** + * Handle link failure callback + * \param cb the callback to be set + */ void SetCallback (Callback cb) { m_handleLinkFailure = cb; } - /// Handle link failure callback + /** + * Handle link failure callback + * \return The callback to LinkFailure + */ Callback GetCallback () const { return m_handleLinkFailure; diff --git a/src/dsr/model/dsr-routing.h b/src/dsr/model/dsr-routing.h index 04cb4132a..74c6707e3 100644 --- a/src/dsr/model/dsr-routing.h +++ b/src/dsr/model/dsr-routing.h @@ -153,86 +153,150 @@ public: */ Ptr GetPassiveBuffer () const; - /// functions used to direct to route cache - //\{ + /** + * \brief Checks if the link is cached in the route cache + * See also DsrRouteCache::IsLinkCache + * + * \return true if the link is cached + */ bool IsLinkCache (); - void UseExtends (DsrRouteCacheEntry::IP_VECTOR rt); - bool LookupRoute (Ipv4Address id, DsrRouteCacheEntry & rt); - bool AddRoute_Link (DsrRouteCacheEntry::IP_VECTOR nodelist, Ipv4Address source); - bool AddRoute (DsrRouteCacheEntry & rt); - void DeleteAllRoutesIncludeLink (Ipv4Address errorSrc, Ipv4Address unreachNode, Ipv4Address node); - bool UpdateRouteEntry (Ipv4Address dst); - bool FindSourceEntry (Ipv4Address src, Ipv4Address dst, uint16_t id); - //\} /** - * \brief Get the netdevice from the context. - * \param context context - * \return the netdevice we are looking for - */ + * \brief Extends the lifetime of a route cache entry. + * See also DsrRouteCache::UseExtends + * + * \param rt the route to extend + */ + void UseExtends (DsrRouteCacheEntry::IP_VECTOR rt); + + /** + * \brief Lookup route cache entry with destination address dst + * See also DsrRouteCache::LookupRoute + * + * \param id destination address + * \param rt entry with destination address id, if exists + * \return true on success + */ + bool LookupRoute (Ipv4Address id, DsrRouteCacheEntry & rt); + + /** + * \brief dd route link to cache + * See also DsrRouteCache::AddRoute_Link + * + * \param nodelist vector of nodes + * \param source ip address of node to add + * \return true if the link is cached + */ + bool AddRoute_Link (DsrRouteCacheEntry::IP_VECTOR nodelist, Ipv4Address source); + + /** + * \brief Add route cache entry if it doesn't yet exist in route cache + * See also DsrRouteCache::AddRoute + * + * \param rt route cache entry + * \return true on success + */ + bool AddRoute (DsrRouteCacheEntry & rt); + + /** + * \brief Delete all the routes which includes the link from next hop address that has just been notified + * as unreachable. + * See also DsrRouteCache::DeleteAllRoutesIncludeLink + * + * \param errorSrc The error source address + * \param unreachNode The unreachable node + * \param node This node's ip address + */ + void DeleteAllRoutesIncludeLink (Ipv4Address errorSrc, Ipv4Address unreachNode, Ipv4Address node); + + /** + * \brief Update route cache entry if it has been recently used and successfully delivered the data packet. + * See also DsrRouteCache::UpdateRouteEntry + * + * \param dst destination address of the route + * \return true in success + */ + bool UpdateRouteEntry (Ipv4Address dst); + + /** + * Find the source request entry in the route request queue, return false if not found. + * See also DsrRreqTable::FindSourceEntry + * + * \param src the source address we just received the source request + * \param dst the destination address the request is targeted at + * \param id the identification number for this request + * \return true if found, false otherwise + */ + bool FindSourceEntry (Ipv4Address src, Ipv4Address dst, uint16_t id); + + /** + * \brief Get the netdevice from the context. + * \param context context + * \return the netdevice we are looking for + */ Ptr GetNetDeviceFromContext (std::string context); /** - * \brief Get the elements from the tracing context. - * \param context context - * \return the elements we are looking for - */ + * \brief Get the elements from the tracing context. + * \param context context + * \return the elements we are looking for + */ std::vector GetElementsFromContext (std::string context); /** - * \brief Get the node id from ip address. - * \param address IPv4 address - * \return the node id - */ + * \brief Get the node id from ip address. + * \param address IPv4 address + * \return the node id + */ uint16_t GetIDfromIP (Ipv4Address address); /** - * \brief Get the ip address from id. - * \param id unique ID - * \return the ip address for the id - */ + * \brief Get the ip address from id. + * \param id unique ID + * \return the ip address for the id + */ Ipv4Address GetIPfromID (uint16_t id); /** - * \brief Get the Ip address from mac address. - * \param address Mac48Address - * \return the ip address - */ + * \brief Get the Ip address from mac address. + * \param address Mac48Address + * \return the ip address + */ Ipv4Address GetIPfromMAC (Mac48Address address); /** - * \brief Get the node with give ip address. - * \param ipv4Address IPv4 address - * \return the node associated with the ip address - */ + * \brief Get the node with give ip address. + * \param ipv4Address IPv4 address + * \return the node associated with the ip address + */ Ptr GetNodeWithAddress (Ipv4Address ipv4Address); /** - * \brief Print the route vector. - * \param vec the vector to print. - */ + * \brief Print the route vector. + * \param vec the vector to print. + */ void PrintVector (std::vector& vec); /** - * \brief Get the next hop of the route. - * \param ipv4Address - * \param vec Route - * \return the next hop address of the route - */ + * \brief Get the next hop of the route. + * \param ipv4Address + * \param vec Route + * \return the next hop address of the route + */ Ipv4Address SearchNextHop (Ipv4Address ipv4Address, std::vector& vec); /** - * \brief Get the dsr protocol number. - * \return protocol number - */ + * \brief Get the dsr protocol number. + * \return protocol number + */ int GetProtocolNumber (void) const; /** - * \brief The send buffer timer expire. - */ + * \brief The send buffer timer expire. + */ void SendBuffTimerExpire (); /** - * \brief Check the send buffer of packets with route when send buffer timer expire. - */ + * \brief Check the send buffer of packets with route when send buffer timer expire. + */ void CheckSendBuffer (); /** - * \brief When route vector corrupted, originate a new packet, normally not happening. - * \param packet to route - * \param source address - * \param destination address - * \param protocol number - */ + * \brief When route vector corrupted, originate a new packet, normally not happening. + * \param packet to route + * \param source address + * \param destination address + * \param protocol number + */ void PacketNewRoute (Ptr packet, Ipv4Address source, Ipv4Address destination, diff --git a/src/uan/model/uan-header-common.h b/src/uan/model/uan-header-common.h index c580596a1..1ebe6f9ea 100644 --- a/src/uan/model/uan-header-common.h +++ b/src/uan/model/uan-header-common.h @@ -28,10 +28,15 @@ namespace ns3 { +/** + * \ingroup uan + * + * UAN protocol descriptor + */ struct UanProtocolBits { - uint8_t m_type : 4; - uint8_t m_protocolNumber : 4; + uint8_t m_type : 4; //!< type (4 bits) + uint8_t m_protocolNumber : 4; //!< protocol number (4 bits) }; /** diff --git a/src/uan/model/uan-mac.h b/src/uan/model/uan-mac.h index 66adadc57..21f40b405 100644 --- a/src/uan/model/uan-mac.h +++ b/src/uan/model/uan-mac.h @@ -128,7 +128,16 @@ public: typedef void (* PacketModeTracedCallback) (Ptr packet, UanTxMode mode); + /** + * Get the Tx mode index (Modulation type). + * \return the Tx mode index + */ uint32_t GetTxModeIndex (); + + /** + * Set the Tx mode index (Modulation type). + * \param txModeIndex the Tx mode index + */ void SetTxModeIndex (uint32_t txModeIndex); private: diff --git a/src/uan/model/uan-net-device.h b/src/uan/model/uan-net-device.h index 1a9d30c3c..5b7ee445c 100644 --- a/src/uan/model/uan-net-device.h +++ b/src/uan/model/uan-net-device.h @@ -146,7 +146,17 @@ public: virtual bool SupportsSendFrom (void) const; virtual void AddLinkChangeCallback (Callback callback); virtual void SetAddress (Address address); + + /** + * Get the Tx mode index (Modulation type). + * \return the Tx mode index + */ uint32_t GetTxModeIndex (); + + /** + * Set the Tx mode index (Modulation type). + * \param txModeIndex the Tx mode index + */ void SetTxModeIndex (uint32_t txModeIndex); /** diff --git a/src/wimax/examples/wimax-multicast.cc b/src/wimax/examples/wimax-multicast.cc index 52f9b049e..e146ed636 100644 --- a/src/wimax/examples/wimax-multicast.cc +++ b/src/wimax/examples/wimax-multicast.cc @@ -61,20 +61,18 @@ #include "ns3/global-route-manager.h" #include "ns3/internet-module.h" #include "ns3/vector.h" +#include using namespace ns3; NS_LOG_COMPONENT_DEFINE ("WimaxMulticastSimulation"); -#define MAXSS 1000 -#define MAXDIST 10 // km - int main (int argc, char *argv[]) { bool verbose = false; NodeContainer ssNodes; - Ptr ss[MAXSS]; + std::vector > ss; NetDeviceContainer ssDevs; Ipv4InterfaceContainer SSinterfaces; @@ -83,8 +81,6 @@ int main (int argc, char *argv[]) NetDeviceContainer bsDevs, bsDevsOne; Ipv4InterfaceContainer BSinterfaces; - UdpServerHelper udpServer[MAXSS]; - ApplicationContainer serverApps[MAXSS]; UdpTraceClientHelper udpClient; ApplicationContainer clientApps; @@ -93,8 +89,8 @@ int main (int argc, char *argv[]) NodeContainer ASNGW_Node; Ptr BSPosition; - Ptr SSPosition[MAXSS]; - Ptr SSPosAllocator[MAXSS]; + std::vector > SSPosition; + std::vector > SSPosAllocator; // default values int nbSS = 10, duration = 7, schedType = 0; @@ -125,6 +121,10 @@ int main (int argc, char *argv[]) scheduler = WimaxHelper::SCHED_TYPE_SIMPLE; } + ss.resize (nbSS); + SSPosition.resize (nbSS); + SSPosAllocator.resize (nbSS); + ssNodes.Create (nbSS); bsNodes.Create (1); @@ -267,13 +267,11 @@ int main (int argc, char *argv[]) uint16_t multicast_port = 100; - for (int i = 0; i < nbSS; i++) - { - udpServer[i] = UdpServerHelper (multicast_port); - serverApps[i] = udpServer[i].Install (ssNodes.Get (i)); - serverApps[i].Start (Seconds (6)); - serverApps[i].Stop (Seconds (duration)); - } + UdpServerHelper udpServerHelper = UdpServerHelper (multicast_port); + ApplicationContainer serverApps; + serverApps = udpServerHelper.Install (ssNodes); + serverApps.Start (Seconds (6)); + serverApps.Stop (Seconds (duration)); udpClient = UdpTraceClientHelper (multicastGroup, multicast_port, ""); diff --git a/src/wimax/model/bs-net-device.h b/src/wimax/model/bs-net-device.h index daf8b97d9..f5c04526b 100644 --- a/src/wimax/model/bs-net-device.h +++ b/src/wimax/model/bs-net-device.h @@ -282,8 +282,9 @@ public: Ptr GetServiceFlowManager (void) const; /** * \brief Set service flow manager + * \param sfm the service flow manager */ - void SetServiceFlowManager (Ptr ); + void SetServiceFlowManager (Ptr sfm); private: virtual void DoDispose (void); /** diff --git a/src/wimax/model/bs-uplink-scheduler-simple.h b/src/wimax/model/bs-uplink-scheduler-simple.h index 25aaee759..bafa565a7 100644 --- a/src/wimax/model/bs-uplink-scheduler-simple.h +++ b/src/wimax/model/bs-uplink-scheduler-simple.h @@ -60,8 +60,14 @@ public: /** * \brief Determines if channel descriptors sent in the current frame are * required to be updated + * + * \param updateDcd currently unused (assume true) + * \param updateUcd currently unused (assume true) + * \param [out] sendDcd DCD must be updated + * \param [out] sendUcd UCD must be updated + * */ - void GetChannelDescriptorsToUpdate (bool&, bool&, bool&, bool&); + void GetChannelDescriptorsToUpdate (bool& updateDcd, bool& updateUcd, bool& sendDcd, bool& sendUcd); uint32_t CalculateAllocationStartTime (void); void AddUplinkAllocation (OfdmUlMapIe &ulMapIe, const uint32_t &allocationSize, diff --git a/src/wimax/model/snr-to-block-error-rate-record.cc b/src/wimax/model/snr-to-block-error-rate-record.cc index 7b355aaa6..7fd2d84ca 100644 --- a/src/wimax/model/snr-to-block-error-rate-record.cc +++ b/src/wimax/model/snr-to-block-error-rate-record.cc @@ -103,14 +103,14 @@ SNRToBlockErrorRateRecord::SetBlockErrorRate (double blockErrorRate) m_blockErrorRate = blockErrorRate; } void -SNRToBlockErrorRateRecord::SetI1 (double I1) +SNRToBlockErrorRateRecord::SetI1 (double i1) { - m_i1 = I1; + m_i1 = i1; } void -SNRToBlockErrorRateRecord::SetI2 (double I2) +SNRToBlockErrorRateRecord::SetI2 (double i2) { - m_i2 = I2; + m_i2 = i2; } } diff --git a/src/wimax/model/snr-to-block-error-rate-record.h b/src/wimax/model/snr-to-block-error-rate-record.h index 14b43b7c6..dc8162458 100644 --- a/src/wimax/model/snr-to-block-error-rate-record.h +++ b/src/wimax/model/snr-to-block-error-rate-record.h @@ -80,24 +80,29 @@ public: /** * \brief set the snr value + * \param snrValue the SNR value */ - void SetSNRValue (double); + void SetSNRValue (double snrValue); /** * \brief set the BER value + * \param bitErrorRate the bit error rate value */ - void SetBitErrorRate (double); + void SetBitErrorRate (double bitErrorRate); /** * \brief set the BlcER value + * \param blockErrorRate the block error rate value */ - void SetBlockErrorRate (double); + void SetBlockErrorRate (double blockErrorRate); /** * \brief set the lower boundary of the confidence interval + * \param i1 the lower boundary of the confidence interval */ - void SetI1 (double); + void SetI1 (double i1); /** * \brief set the upper boundary of the confidence interval + * \param i2 the upper boundary of the confidence interval */ - void SetI2 (double); + void SetI2 (double i2); private: double m_snrValue; ///< SNR value diff --git a/src/wimax/model/ss-service-flow-manager.h b/src/wimax/model/ss-service-flow-manager.h index 31b7e97a3..08c502c2a 100644 --- a/src/wimax/model/ss-service-flow-manager.h +++ b/src/wimax/model/ss-service-flow-manager.h @@ -49,14 +49,12 @@ public: CONFIRMATION_CODE_SUCCESS, CONFIRMATION_CODE_REJECT }; - /** - * \brief creates a service flow manager and attaches it to a device - * \param device the device to which the service flow manager will be attached - */ /** * Constructor * - * \param device subscriber station device + * Creates a service flow manager and attaches it to a device + * + * \param device the device to which the service flow manager will be attached */ SsServiceFlowManager (Ptr device); ~SsServiceFlowManager (void);