src/dsr/model/dsr-errorbuff.h
changeset 10521 81a6f41319cc
parent 8752 2da1fab73114
child 11002 80e12ddf6d72
--- a/src/dsr/model/dsr-errorbuff.h	Fri Dec 13 11:21:57 2013 +0100
+++ b/src/dsr/model/dsr-errorbuff.h	Fri Dec 13 10:28:25 2013 -0500
@@ -45,7 +45,16 @@
 class ErrorBuffEntry
 {
 public:
-  // / c-tor
+  /**
+   * Create an ErrorBuffEntry with the given parameters.
+   *
+   * \param pa packet
+   * \param d IPv4 address of the destination
+   * \param s IPv4 address of the source
+   * \param n IPv4 address of the next hop
+   * \param exp expiration time
+   * \param p protocol number
+   */
   ErrorBuffEntry (Ptr<const Packet> pa = 0, Ipv4Address d = Ipv4Address (), Ipv4Address s = Ipv4Address (),
                   Ipv4Address n = Ipv4Address (), Time exp = Simulator::Now (), uint8_t p = 0)
     : m_packet (pa),
@@ -58,13 +67,14 @@
   }
   /**
    * Compare send buffer entries
+   * \param o another ErrorBuffEntry
    * \return true if equal
    */
   bool operator== (ErrorBuffEntry const & o) const
   {
     return ((m_packet == o.m_packet) && (m_source == o.m_source) && (m_nextHop == o.m_nextHop) && (m_dst == o.m_dst) && (m_expire == o.m_expire));
   }
-  // /\name Fields
+  ///\name Fields
   // \{
   Ptr<const Packet> GetPacket () const
   {
@@ -116,17 +126,17 @@
   }
   // \}
 private:
-  // / Data packet
+  /// Data packet
   Ptr<const Packet> m_packet;
-  // / Destination address
+  /// Destination address
   Ipv4Address m_dst;
-  // / Source address
+  /// Source address
   Ipv4Address m_source;
-  // / Nexthop address
+  /// Nexthop address
   Ipv4Address m_nextHop;
-  // / Expire time for queue entry
+  /// Expire time for queue entry
   Time m_expire;
-  // / The protocol number
+  /// The protocol number
   uint8_t m_protocol;
 };
 
@@ -138,21 +148,23 @@
 class ErrorBuffer
 {
 public:
-  // / Default c-tor
+  /**
+   * Default constructor
+   */
   ErrorBuffer ()
   {
   }
-  // / Push entry in queue, if there is no entry with the same packet and destination address in queue.
+  /// Push entry in queue, if there is no entry with the same packet and destination address in queue.
   bool Enqueue (ErrorBuffEntry & entry);
-  // / Return first found (the earliest) entry for given destination
+  /// Return first found (the earliest) entry for given destination
   bool Dequeue (Ipv4Address dst, ErrorBuffEntry & entry);
-  // / Remove all packets with the error link
+  /// Remove all packets with the error link
   void DropPacketForErrLink (Ipv4Address source, Ipv4Address nextHop);
-  // / Finds whether a packet with destination dst exists in the queue
+  /// Finds whether a packet with destination dst exists in the queue
   bool Find (Ipv4Address dst);
-  // / Number of entries
+  /// Number of entries
   uint32_t GetSize ();
-  // /\name Fields
+  ///\name Fields
   // \{
   uint32_t GetMaxQueueLen () const
   {
@@ -178,19 +190,19 @@
   }
 
 private:
-  // / The send buffer to cache unsent packet
+  /// The send buffer to cache unsent packet
   std::vector<ErrorBuffEntry> m_errorBuffer;
-  // / Remove all expired entries
+  /// Remove all expired entries
   void Purge ();
-  // / Notify that packet is dropped from queue by timeout
+  /// Notify that packet is dropped from queue by timeout
   void Drop (ErrorBuffEntry en, std::string reason);
-  // / Notify that packet is dropped from queue by timeout
+  /// Notify that packet is dropped from queue by timeout
   void DropLink (ErrorBuffEntry en, std::string reason);
-  // / The maximum number of packets that we allow a routing protocol to buffer.
+  /// The maximum number of packets that we allow a routing protocol to buffer.
   uint32_t m_maxLen;
-  // / The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
+  /// The maximum period of time that a routing protocol is allowed to buffer a packet for, seconds.
   Time m_errorBufferTimeout;
-  // / Check if the send buffer entry is the same or not
+  /// Check if the send buffer entry is the same or not
   static bool LinkEqual (ErrorBuffEntry en, const std::vector<Ipv4Address> link)
   {
     return ((en.GetSource () == link[0]) && (en.GetNextHop () == link[1]));