Adding more doxygen documentation
diff --git a/apps/ccnx-app.h b/apps/ccnx-app.h
index c83ee0f..56093f9 100644
--- a/apps/ccnx-app.h
+++ b/apps/ccnx-app.h
@@ -44,7 +44,7 @@
{
public:
/**
- * \typedef A callback to pass packets to underlying CCNx protocol
+ * @brief A callback to pass packets to underlying CCNx protocol
*/
typedef Callback<bool, const Ptr<const Packet>&> ProtocolHandler;
@@ -88,36 +88,39 @@
Ptr<Packet> payload);
protected:
+ /**
+ * @brief Do cleanup when application is destroyed
+ */
virtual void
DoDispose ();
// inherited from Application base class. Originally they were private
virtual void
- StartApplication (); // Called at time specified by Start
+ StartApplication (); ///< @brief Called at time specified by Start
virtual void
- StopApplication (); // Called at time specified by Stop
+ StopApplication (); ///< @brief Called at time specified by Stop
protected:
- ProtocolHandler m_protocolHandler; ///< \brief A callback to pass packets to underlying CCNx protocol
- bool m_active;
- Ptr<CcnxFace> m_face; // local face that is created
+ ProtocolHandler m_protocolHandler; ///< @brief A callback to pass packets to underlying CCNx protocol
+ bool m_active; ///< @brief Flag to indicate that application is active (set by StartApplication and StopApplication)
+ Ptr<CcnxFace> m_face; ///< @brief automatically created application face through which application communicates
TracedCallback<Ptr<const CcnxInterestHeader>,
- Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedInterests;
+ Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedInterests; ///< @brief App-level trace of received Interests
TracedCallback<Ptr<const CcnxInterestHeader>,
- Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedNacks;
+ Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedNacks; ///< @brief App-level trace of received NACKs
TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
- Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedContentObjects;
+ Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedContentObjects; ///< @brief App-level trace of received Data
TracedCallback<Ptr<const CcnxInterestHeader>,
- Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedInterests;
+ Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedInterests; ///< @brief App-level trace of transmitted Interests
TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
- Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedContentObjects;
+ Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedContentObjects; ///< @brief App-level trace of transmitted Data
};
} // namespace ns3
diff --git a/apps/ccnx-consumer-cbr.h b/apps/ccnx-consumer-cbr.h
index 8f84a5b..6490fc8 100644
--- a/apps/ccnx-consumer-cbr.h
+++ b/apps/ccnx-consumer-cbr.h
@@ -61,9 +61,17 @@
virtual void
ScheduleNextPacket ();
+ /**
+ * @brief Set type of frequency randomization
+ * @param value Either 'none', 'uniform', or 'exponential'
+ */
void
SetRandomize (const std::string &value);
+ /**
+ * @brief Get type of frequency randomization
+ * @returns either 'none', 'uniform', or 'exponential'
+ */
std::string
GetRandomize () const;
@@ -80,7 +88,7 @@
// DataRate
// GetDesiredRate () const;
-protected:
+private:
double m_frequency; // Frequency of interest packets (in hertz)
bool m_firstTime;
RandomVariable *m_random;
diff --git a/apps/ccnx-consumer-window.h b/apps/ccnx-consumer-window.h
index 21a9759..cde300a 100644
--- a/apps/ccnx-consumer-window.h
+++ b/apps/ccnx-consumer-window.h
@@ -31,6 +31,9 @@
/**
* @ingroup ccnx
* \brief CCNx application for sending out Interest packets (window-based)
+ *
+ * !!! ATTENTION !!! This is highly experimental and relies on experimental features of the simulator.
+ * Behavior may be unpredictable if used incorrectly.
*/
class CcnxConsumerWindow: public CcnxConsumer
{
@@ -82,7 +85,7 @@
void
SetMaxSize (double size);
-protected:
+private:
uint32_t m_payloadSize; // expected payload size
double m_maxSize; // max size to request
diff --git a/apps/ccnx-consumer.h b/apps/ccnx-consumer.h
index 3477a66..dacc586 100644
--- a/apps/ccnx-consumer.h
+++ b/apps/ccnx-consumer.h
@@ -67,10 +67,16 @@
OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
Ptr<Packet> payload);
+ /**
+ * @brief Timeout event
+ * @param sequenceNumber time outed sequence number
+ */
virtual void
OnTimeout (uint32_t sequenceNumber);
- // Simulator::Schedule doesn't work with protected members???
+ /**
+ * @brief Actually send packet
+ */
void
SendPacket ();
@@ -109,15 +115,15 @@
GetRetxTimer () const;
protected:
- UniformVariable m_rand; // nonce generator
+ UniformVariable m_rand; ///< @brief nonce generator
- uint32_t m_seq;
- uint32_t m_seqMax; // maximum number of sequence number
- EventId m_sendEvent; // Eventid of pending "send packet" event
- Time m_retxTimer;
- EventId m_retxEvent; // Event to check whether or not retransmission should be performed
+ uint32_t m_seq; ///< @brief currently requested sequence number
+ uint32_t m_seqMax; ///< @brief maximum number of sequence number
+ EventId m_sendEvent; ///< @brief EventId of pending "send packet" event
+ Time m_retxTimer; ///< @brief Currently estimated retransmission timer
+ EventId m_retxEvent; ///< @brief Event to check whether or not retransmission should be performed
- Ptr<RttEstimator> m_rtt;
+ Ptr<RttEstimator> m_rtt; ///< @brief RTT estimator
Time m_offTime; ///< \brief Time interval between packets
CcnxNameComponents m_interestName; ///< \brief CcnxName of the Interest (use CcnxNameComponents)
@@ -171,12 +177,12 @@
>
>
> { } ;
-/// @endcond
SeqTimeoutsContainer m_seqTimeouts; ///< \brief multi-index for the set of SeqTimeout structs
SeqTimeoutsContainer m_seqLifetimes;
TracedCallback<Ptr<Node>, Ptr<Node>, uint32_t, uint32_t > m_pathWeightsTrace;
+/// @endcond
};
} // namespace ns3
diff --git a/apps/ccnx-producer.h b/apps/ccnx-producer.h
index 55e7162..4b54d79 100644
--- a/apps/ccnx-producer.h
+++ b/apps/ccnx-producer.h
@@ -31,6 +31,14 @@
namespace ns3
{
+/**
+ * @brief A simple Interest-sink applia simple Interest-sink application
+ *
+ * A simple Interest-sink applia simple Interest-sink application,
+ * which replying every incoming Interest with Data packet with a specified
+ * size and name same as in Interest.cation, which replying every incoming Interest
+ * with Data packet with a specified size and name same as in Interest.
+ */
class CcnxProducer : public CcnxApp
{
public:
diff --git a/docs/Doxyfile b/docs/Doxyfile
index 69a0fbf..5af2806 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -651,7 +651,7 @@
# directories that contain image that are included in the documentation (see
# the \image command).
-IMAGE_PATH = doxygen
+IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h
index f2ede3d..195c84c 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h
@@ -52,7 +52,7 @@
virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
char* m_blob; ///< \brief field holding a parsed BLOB value of the block
- uint32_t m_blobSize;
+ uint32_t m_blobSize; ///< @brief field representing size of the BLOB field stored
};
}
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc
index 29e3fac..805582a 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc
@@ -35,10 +35,12 @@
namespace ns3 {
namespace CcnbParser {
+/// @cond include_hidden
const uint8_t CCN_TT_BITS = 3;
const uint8_t CCN_TT_MASK = ((1 << CCN_TT_BITS) - 1);
const uint8_t CCN_MAX_TINY= ((1 << (7-CCN_TT_BITS)) - 1);
const uint8_t CCN_TT_HBIT = ((uint8_t)(1 << 7));
+/// @endcond
// int Block::counter = 0;
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
index 9538a1f..6ea5fba 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
@@ -59,13 +59,17 @@
virtual ~Block ();
- virtual void accept( VoidNoArguVisitor &v ) = 0;
- virtual void accept( VoidVisitor &v, boost::any param ) = 0;
- virtual boost::any accept( NoArguVisitor &v ) = 0;
- virtual boost::any accept( Visitor &v, boost::any param ) = 0;
+ virtual void accept( VoidNoArguVisitor &v ) = 0; ///< @brief Accept visitor void(*)()
+ virtual void accept( VoidVisitor &v, boost::any param ) = 0; ///< @brief Accept visitor void(*)(boost::any)
+ virtual boost::any accept( NoArguVisitor &v ) = 0; ///< @brief Accept visitor boost::any(*)()
+ virtual boost::any accept( Visitor &v, boost::any param ) = 0; ///< @brief Accept visitor boost::any(*)(boost::any)
};
-// Necessary until Buffer::Iterator gets PeekU8 call
+/**
+ * @brief Necessary until Buffer::Iterator gets PeekU8 call
+ * @param i buffer iterator
+ * @return peeked uint8_t value
+ */
inline
uint8_t
BufferIteratorPeekU8 (Buffer::Iterator &i)
diff --git a/helper/ccnx-encoding-helper.h b/helper/ccnx-encoding-helper.h
index 65b3b6a..45fdc84 100644
--- a/helper/ccnx-encoding-helper.h
+++ b/helper/ccnx-encoding-helper.h
@@ -37,7 +37,6 @@
/**
* \brief Helper to encode/decode ccnb formatted CCNx message
- *
*/
class CcnxEncodingHelper
{
@@ -60,24 +59,67 @@
GetSerializedSize (const CcnxInterestHeader &interest);
public:
+ /**
+ * @brief Append CCNB block header
+ * @param start Buffer to store serialized CcnxInterestHeader
+ * @param value dictionary id of the block header
+ * @param block_type Type of CCNB block
+ *
+ * @returns written length
+ */
static size_t
AppendBlockHeader (Buffer::Iterator &start, size_t value, CcnbParser::ccn_tt block_type);
+ /**
+ * @brief Estimate size of the CCNB block header
+ * @param value dictionary id of the block header
+ * @returns estimated length
+ */
static size_t
EstimateBlockHeader (size_t value);
+ /**
+ * @brief Add number in CCNB encoding
+ * @param start Buffer to store serialized CcnxInterestHeader
+ * @param number Number to be written
+ *
+ * @returns written length
+ */
static size_t
AppendNumber (Buffer::Iterator &start, uint32_t number);
+ /**
+ * @brief Estimate size of the number in CCNB encoding
+ * @param number Number to be written
+ * @returns estimated length
+ */
static size_t
EstimateNumber (uint32_t number);
+ /**
+ * @brief Append CCNB closer tag (estimated size is 1)
+ * @param start Buffer to store serialized CcnxInterestHeader
+ *
+ * @returns written length
+ */
static size_t
AppendCloser (Buffer::Iterator &start);
+ /**
+ * @brief Append CcnxNameComponents in CCNB encoding
+ * @param start Buffer to store serialized CcnxInterestHeader
+ * @param name constant reference to CcnxNameComponents object
+ *
+ * @returns written length
+ */
static size_t
AppendNameComponents (Buffer::Iterator &start, const CcnxNameComponents &name);
+ /**
+ * @brief Estimate size of CcnxNameComponents in CCNB encoding
+ * @param name constant reference to CcnxNameComponents object
+ * @returns estimated length
+ */
static size_t
EstimateNameComponents (const CcnxNameComponents &name);
@@ -93,6 +135,11 @@
static size_t
AppendTimestampBlob (Buffer::Iterator &start, const Time &time);
+ /**
+ * @brief Estimate size of a binary timestamp as a BLOB using CCNB enconding
+ * @param time - Time object
+ * @returns estimated length
+ */
static size_t
EstimateTimestampBlob (const Time &time);
@@ -112,6 +159,12 @@
AppendTaggedBlob (Buffer::Iterator &start, CcnbParser::ccn_dtag dtag,
const uint8_t *data, size_t size);
+ /**
+ * @brief Estimate size of a tagged BLOB in CCNB enconding
+ * @param dtag is the element's dtab
+ * @param size is the size of the data, in bytes
+ * @returns estimated length
+ */
static size_t
EstimateTaggedBlob (CcnbParser::ccn_dtag dtag, size_t size);
@@ -147,6 +200,12 @@
AppendString (Buffer::Iterator &start, CcnbParser::ccn_dtag dtag,
const std::string &string);
+ /**
+ * @brief Estimate size of the string in CCNB encoding
+ * @param dtag is the element's dtab
+ * @param string UTF-8 string to be written
+ * @returns estimated length
+ */
static size_t
EstimateString (CcnbParser::ccn_dtag dtag, const std::string &string);
};
diff --git a/helper/ccnx-header-helper.h b/helper/ccnx-header-helper.h
index f4096db..7a23c6d 100644
--- a/helper/ccnx-header-helper.h
+++ b/helper/ccnx-header-helper.h
@@ -50,7 +50,10 @@
class CcnxHeaderHelper
{
public:
- enum Type {INTEREST, CONTENT_OBJECT};
+ /**
+ @brief enum for Ccnx packet types
+ */
+ enum Type {INTEREST, CONTENT_OBJECT};
/**
* Static function to create an appropriate CCNx header
diff --git a/model/ccnx-content-object-header.h b/model/ccnx-content-object-header.h
index a7bad01..5040dba 100644
--- a/model/ccnx-content-object-header.h
+++ b/model/ccnx-content-object-header.h
@@ -68,18 +68,33 @@
*/
inline Signature ();
+ /**
+ * @brief Get digest algorithm
+ */
inline const std::string &
GetDigestAlgorithm () const;
+ /**
+ * @brief Set digest algorithm
+ */
inline void
SetDigestAlgorithm (const std::string &digestAlgorithm);
+ /**
+ * @brief Get signature bits
+ */
inline uint32_t
GetSignatureBits () const;
+ /**
+ * @brief Set signature bits
+ */
inline void
SetSignatureBits (uint32_t signatureBits);
+ /**
+ * @brief Default digest algorithm ("2.16.840.1.101.3.4.2.1")
+ */
static const std::string DefaultDigestAlgorithm; // = "2.16.840.1.101.3.4.2.1";
private:
@@ -93,6 +108,9 @@
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
+ /**
+ * @brief Options for the data packet Type
+ */
enum ContentType
{
DATA = 0x0C04C0, // default value. If ContentObject is type of DATA, then ContentType tag will be omitted
@@ -250,12 +268,12 @@
//////////////////////////////////////////////////////////////////
- static TypeId GetTypeId (void);
- virtual TypeId GetInstanceTypeId (void) const;
- virtual void Print (std::ostream &os) const;
- virtual uint32_t GetSerializedSize (void) const;
- virtual void Serialize (Buffer::Iterator start) const;
- virtual uint32_t Deserialize (Buffer::Iterator start);
+ static TypeId GetTypeId (void); ///< @brief Get TypeId
+ virtual TypeId GetInstanceTypeId (void) const; ///< @brief Get TypeId of the instance
+ virtual void Print (std::ostream &os) const; ///< @brief Print out information about the Header into the stream
+ virtual uint32_t GetSerializedSize (void) const; ///< @brief Get size necessary to serialize the Header
+ virtual void Serialize (Buffer::Iterator start) const; ///< @brief Serialize the Header
+ virtual uint32_t Deserialize (Buffer::Iterator start); ///< @brief Deserialize the Header
private:
Signature m_signature;
@@ -273,12 +291,12 @@
CcnxContentObjectTail ();
//////////////////////////////////////////////////////////////////
- static TypeId GetTypeId (void);
- virtual TypeId GetInstanceTypeId (void) const;
- virtual void Print (std::ostream &os) const;
- virtual uint32_t GetSerializedSize (void) const;
- virtual void Serialize (Buffer::Iterator start) const;
- virtual uint32_t Deserialize (Buffer::Iterator start);
+ static TypeId GetTypeId (void); ///< @brief Get TypeId
+ virtual TypeId GetInstanceTypeId (void) const; ///< @brief Get TypeId of the instance
+ virtual void Print (std::ostream &os) const; ///< @brief Print out information about Tail into the stream
+ virtual uint32_t GetSerializedSize (void) const; ///< @brief Get size necessary to serialize the Tail
+ virtual void Serialize (Buffer::Iterator start) const; ///< @brief Serialize the Tail
+ virtual uint32_t Deserialize (Buffer::Iterator start); ///< @brief Deserialize the Tail
};
@@ -337,6 +355,9 @@
return m_signedInfo;
}
+/**
+ * @brief Class for ContentObject parsing exception
+ */
class CcnxContentObjectHeaderException {};
} // namespace ns3
diff --git a/model/ccnx-content-store.h b/model/ccnx-content-store.h
index 9095223..6c0e876 100644
--- a/model/ccnx-content-store.h
+++ b/model/ccnx-content-store.h
@@ -121,6 +121,7 @@
*/
struct CcnxContentStoreContainer
{
+ /// @cond include_hidden
typedef
boost::multi_index::multi_index_container<
CcnxContentStoreEntry,
@@ -143,6 +144,7 @@
#endif
>
> type;
+ /// @endcond
};
/**
diff --git a/model/ccnx-face.h b/model/ccnx-face.h
index ad8ca80..8bae198 100644
--- a/model/ccnx-face.h
+++ b/model/ccnx-face.h
@@ -68,6 +68,9 @@
CcnxFace (Ptr<Node> node);
virtual ~CcnxFace();
+ /**
+ * @brief Get node to which this face is associated
+ */
Ptr<Node>
GetNode () const;
@@ -143,7 +146,11 @@
*/
virtual bool
IsUp () const;
-
+
+ /**
+ * @brief Print information about the face into the stream
+ * @param os stream to write information to
+ */
virtual std::ostream&
Print (std::ostream &os) const;
diff --git a/model/ccnx-fib.h b/model/ccnx-fib.h
index e9474d0..7c2c6af 100644
--- a/model/ccnx-fib.h
+++ b/model/ccnx-fib.h
@@ -50,6 +50,9 @@
class CcnxFibFaceMetric
{
public:
+ /**
+ * @brief Color codes for FIB face status
+ */
enum Status { NDN_FIB_GREEN = 1,
NDN_FIB_YELLOW = 2,
NDN_FIB_RED = 3 };
@@ -74,9 +77,15 @@
bool
operator< (const CcnxFibFaceMetric &fm) const { return *m_face < *fm.m_face; } // return identity of the face
+ /**
+ * @brief Comparison between CcnxFibFaceMetric and CcnxFace
+ */
bool
operator< (const Ptr<CcnxFace> &face) const { return *m_face < *face; }
+ /**
+ * @brief Return CcnxFace associated with CcnxFibFaceMetric
+ */
Ptr<CcnxFace>
GetFace () const { return m_face; }
@@ -115,6 +124,7 @@
*/
struct CcnxFibFaceMetricContainer
{
+ /// @cond include_hidden
typedef boost::multi_index::multi_index_container<
CcnxFibFaceMetric,
boost::multi_index::indexed_by<
@@ -140,6 +150,7 @@
>
>
> type;
+ /// @endcond
};
/**
@@ -150,7 +161,7 @@
class CcnxFibEntry // : public SimpleRefCount<CcnxFibEntry>
{
public:
- class NoFaces {};
+ class NoFaces {}; ///< @brief Exception class for the case when FIB entry is not found
/**
* \brief Constructor
@@ -233,6 +244,7 @@
*/
struct CcnxFibEntryContainer
{
+ /// @cond include_hidden
typedef boost::multi_index::multi_index_container<
CcnxFibEntry,
boost::multi_index::indexed_by<
@@ -249,6 +261,7 @@
>
>
> type;
+ /// @endcond
};
/**
@@ -269,7 +282,6 @@
* \brief Constructor
*/
CcnxFib ();
- // * \param node smart pointer to Ccnx stack associated with particular node
/**
* \brief Perform longest prefix match
@@ -363,12 +375,12 @@
GetCcnxFibEntry (uint32_t index);
public:
- CcnxFibEntryContainer::type m_fib;
+ CcnxFibEntryContainer::type m_fib; ///< @brief Internal container
protected:
// inherited from Object class
- virtual void NotifyNewAggregate ();
- virtual void DoDispose ();
+ virtual void NotifyNewAggregate (); ///< @brief Notify when object is aggregated
+ virtual void DoDispose (); ///< @brief Perform cleanup
private:
friend std::ostream& operator<< (std::ostream& os, const CcnxFib &fib);
diff --git a/model/ccnx-forwarding-strategy.h b/model/ccnx-forwarding-strategy.h
index ea9f692..07e6cf2 100644
--- a/model/ccnx-forwarding-strategy.h
+++ b/model/ccnx-forwarding-strategy.h
@@ -93,10 +93,11 @@
Ptr<CcnxInterestHeader> &header,
const Ptr<const Packet> &packet);
+ /// @brief Transmitted interests trace
TracedCallback<Ptr<const CcnxInterestHeader>, Ptr<const CcnxFace> > m_transmittedInterestsTrace;
protected:
- Ptr<CcnxPit> m_pit;
+ Ptr<CcnxPit> m_pit; ///< \brief Reference to PIT to which this forwarding strategy is associated
};
} //namespace ns3
diff --git a/model/ccnx-global-router.h b/model/ccnx-global-router.h
index 53c9d04..a35c08b 100644
--- a/model/ccnx-global-router.h
+++ b/model/ccnx-global-router.h
@@ -34,11 +34,23 @@
class CcnxFace;
class CcnxNameComponents;
+/**
+ * @brief Class representing global router interface for ndnSIM
+ */
class CcnxGlobalRouter : public Object
{
public:
+ /**
+ * @brief Graph edge
+ */
typedef boost::tuple< Ptr< CcnxGlobalRouter >, Ptr< CcnxFace >, Ptr< CcnxGlobalRouter > > Incidency;
+ /**
+ * @brief List of graph edges
+ */
typedef std::list< Incidency > IncidencyList;
+ /**
+ * @brief List of locally exported prefixes
+ */
typedef std::list< Ptr<CcnxNameComponents> > LocalPrefixList;
/**
@@ -49,33 +61,54 @@
static TypeId
GetTypeId ();
+ /**
+ * @brief Default constructor
+ */
CcnxGlobalRouter ();
+ /**
+ * @brief Get numeric ID of the node (internally assigned)
+ */
uint32_t
GetId () const;
-
+
+ /**
+ * @brief Helper function to get smart pointer to Ccnx object (basically, self)
+ */
Ptr<Ccnx>
GetCcnx () const;
-
+
+ /**
+ * @brief Add new locally exported prefix
+ * @param prefix Prefix
+ */
void
AddLocalPrefix (Ptr< CcnxNameComponents > prefix);
/**
- *
+ * @brief Add edge to the node
+ * @param face Face of the edge
+ * @param ccnx CcnxGlobalRouter of another node
*/
void
AddIncidency (Ptr< CcnxFace > face, Ptr< CcnxGlobalRouter > ccnx);
+ /**
+ * @brief Get list of edges that are connected to this node
+ */
IncidencyList &
GetIncidencies ();
+ /**
+ * @brief Get list of locally exported prefixes
+ */
const LocalPrefixList &
GetLocalPrefixes () const;
// ??
protected:
virtual void
- NotifyNewAggregate ();
+ NotifyNewAggregate (); ///< @brief Notify when the object is aggregated to another object (e.g., Node)
private:
uint32_t m_id;
diff --git a/model/ccnx-interest-header.h b/model/ccnx-interest-header.h
index 3e46541..8b1d5c4 100644
--- a/model/ccnx-interest-header.h
+++ b/model/ccnx-interest-header.h
@@ -115,17 +115,17 @@
**/
/**
- * NDN InterestHeader and routines to serialize/deserialize
-
- Simplifications:
- - Name: binary name components are not supported
- - MinSuffixComponents and MasSuffixComponents: if value is negative (default), will not be serialized
- - ChildSelector, AnswerOriginKind: 0 - false, 1 - true, -1 not set
- - Publisher* elements are not supported
- - Exclude: only simple name matching is supported (Bloom support has been deprecated in CCNx)
- - InterestLifetime: ?
- - Nonce: 32 bit random integer. If value is 0, will not be serialized
- */
+ * @brief NDN InterestHeader and routines to serialize/deserialize
+ *
+ * Simplifications:
+ * - Name: binary name components are not supported
+ * - MinSuffixComponents and MasSuffixComponents: if value is negative (default), will not be serialized
+ * - ChildSelector, AnswerOriginKind: 0 - false, 1 - true, -1 not set
+ * - Publisher* elements are not supported
+ * - Exclude: only simple name matching is supported (Bloom support has been deprecated in CCNx)
+ * - InterestLifetime: ?
+ * - Nonce: 32 bit random integer. If value is 0, will not be serialized
+ **/
class CcnxInterestHeader : public SimpleRefCount<CcnxInterestHeader,Header>
{
public:
@@ -314,8 +314,8 @@
GetNonce () const;
/**
- * \enum NACK Type
- * \brief Specifies the type of Interest packet
+ * @brief NACK Type
+ * Specifies the type of Interest packet
*/
enum
{
@@ -345,9 +345,9 @@
GetNack () const;
//////////////////////////////////////////////////////////////////
-
- static TypeId GetTypeId (void);
- virtual TypeId GetInstanceTypeId (void) const;
+
+ static TypeId GetTypeId (void); ///< @brief Get TypeId of the class
+ virtual TypeId GetInstanceTypeId (void) const; ///< @brief Get TypeId of the instance
/**
* \brief Print Interest packet
@@ -388,7 +388,7 @@
};
/**
- * \brief Exception class for CcnxInterestHeader
+ * @brief Class for Interest parsing exception
*/
class CcnxInterestHeaderException {};
diff --git a/model/ccnx-l3-protocol.h b/model/ccnx-l3-protocol.h
index c790c8e..157703c 100644
--- a/model/ccnx-l3-protocol.h
+++ b/model/ccnx-l3-protocol.h
@@ -168,7 +168,7 @@
const Ptr<const Packet> &packet);
protected:
- virtual void DoDispose (void);
+ virtual void DoDispose (void); ///< @brief Do cleanup
/**
* This function will notify other components connected to the node that a new stack member is now connected
diff --git a/model/ccnx-name-components-hash-helper.h b/model/ccnx-name-components-hash-helper.h
index 779f7f1..45e9f0e 100644
--- a/model/ccnx-name-components-hash-helper.h
+++ b/model/ccnx-name-components-hash-helper.h
@@ -39,6 +39,9 @@
*/
struct CcnxPrefixHash : public std::unary_function<CcnxNameComponents, std::size_t>
{
+ /**
+ * @brief Compute hash of the name prefix
+ */
std::size_t
operator() (const CcnxNameComponents &prefix) const
{
diff --git a/model/ccnx-name-components.h b/model/ccnx-name-components.h
index c4bc8a8..7f62851 100644
--- a/model/ccnx-name-components.h
+++ b/model/ccnx-name-components.h
@@ -83,6 +83,9 @@
const std::list<std::string> &
GetComponents () const;
+ /**
+ * @brief Helper call to get the last component of the name
+ */
std::string
GetLastComponent () const;
diff --git a/model/ccnx-net-device-face.h b/model/ccnx-net-device-face.h
index a83ed70..0fdefea 100644
--- a/model/ccnx-net-device-face.h
+++ b/model/ccnx-net-device-face.h
@@ -68,6 +68,9 @@
SendImpl (Ptr<Packet> p);
public:
+ /**
+ * @brief Print out name of the CcnxFace to the stream
+ */
virtual std::ostream&
Print (std::ostream &os) const;
////////////////////////////////////////////////////////////////////
diff --git a/model/ccnx-pit-entry-incoming-face.h b/model/ccnx-pit-entry-incoming-face.h
index 80f7e09..61cb4e6 100644
--- a/model/ccnx-pit-entry-incoming-face.h
+++ b/model/ccnx-pit-entry-incoming-face.h
@@ -46,7 +46,14 @@
*/
CcnxPitEntryIncomingFace (Ptr<CcnxFace> face);
+ /**
+ * @brief Compare two CcnxPitEntryIncomingFace
+ */
bool operator== (const CcnxPitEntryIncomingFace &dst) { return *m_face==*(dst.m_face); }
+
+ /**
+ * @brief Compare CcnxPitEntryIncomingFace with CcnxFace
+ */
bool operator== (Ptr<CcnxFace> face) { return *m_face==*face; }
/**
diff --git a/model/ccnx-pit-entry-outgoing-face.h b/model/ccnx-pit-entry-outgoing-face.h
index c0fe80f..fbd13c5 100644
--- a/model/ccnx-pit-entry-outgoing-face.h
+++ b/model/ccnx-pit-entry-outgoing-face.h
@@ -42,6 +42,10 @@
bool m_waitingInVain; ///< \brief when flag is set, we do not expect data for this interest, only a small hope that it will happen
public:
+ /**
+ * @brief Constructor to create CcnxPitEntryOutgoingFace
+ * \param face face of the outgoing interest
+ */
CcnxPitEntryOutgoingFace (Ptr<CcnxFace> face);
/**
@@ -50,7 +54,14 @@
void
UpdateOnRetransmit ();
+ /**
+ * @brief Compare to CcnxPitEntryOutgoingFace
+ */
bool operator== (const CcnxPitEntryOutgoingFace &dst) { return *m_face==*dst.m_face; }
+
+ /**
+ * @brief Compare CcnxPitEntryOutgoingFace with CcnxFace
+ */
bool operator== (Ptr<CcnxFace> face) { return *m_face==*face; }
/**
diff --git a/model/ccnx-pit-entry.h b/model/ccnx-pit-entry.h
index 9bf2768..6c69f99 100644
--- a/model/ccnx-pit-entry.h
+++ b/model/ccnx-pit-entry.h
@@ -59,6 +59,7 @@
*/
struct CcnxPitEntryIncomingFaceContainer
{
+ /// @cond include_hidden
typedef boost::multi_index::multi_index_container<
CcnxPitEntryIncomingFace,
boost::multi_index::indexed_by<
@@ -69,6 +70,7 @@
>
>
> type;
+ /// @endcond
};
/**
@@ -80,6 +82,7 @@
*/
struct CcnxPitEntryOutgoingFaceContainer
{
+ /// @cond include_hidden
typedef boost::multi_index::multi_index_container<
CcnxPitEntryOutgoingFace,
boost::multi_index::indexed_by<
@@ -94,6 +97,7 @@
>
>
> type;
+ /// @endcond
};
@@ -122,7 +126,10 @@
*/
void
UpdateLifetime (const Time &offsetTime);
-
+
+ /**
+ * @brief Get prefix of the PIT entry
+ */
const CcnxNameComponents &
GetPrefix () const
{ return *m_prefix; }
@@ -223,7 +230,7 @@
bool
AreAllOutgoingInVain () const;
- /*
+ /**
* @brief Similar to AreAllOutgoingInVain, but ignores `face`
* \see AreAllOutgoingInVain
**/
diff --git a/model/ccnx-pit.h b/model/ccnx-pit.h
index e80f697..84b1685 100644
--- a/model/ccnx-pit.h
+++ b/model/ccnx-pit.h
@@ -73,6 +73,7 @@
*/
struct CcnxPitEntryContainer
{
+ /// @cond include_hidden
typedef
boost::multi_index::multi_index_container<
CcnxPitEntry,
@@ -90,6 +91,7 @@
>
>
> type;
+ /// @endcond
};
////////////////////////////////////////////////////////////////////////
@@ -139,7 +141,10 @@
*/
boost::tuple<const CcnxPitEntry&, bool, bool>
Lookup (const CcnxInterestHeader &header);
-
+
+ /**
+ * @brief Get pruning timeout for PIT entries (configuration parameter)
+ */
Time GetPitEntryPruningTimeout () const
{
return m_PitEntryPruningTimout;
@@ -152,8 +157,8 @@
protected:
// inherited from Object class
- virtual void NotifyNewAggregate ();
- virtual void DoDispose ();
+ virtual void NotifyNewAggregate (); ///< @brief Even when object is aggregated to another Object
+ virtual void DoDispose (); ///< @brief Do cleanup
private:
/** \brief Remove expired records from PIT */
@@ -193,6 +198,9 @@
std::ostream& operator<< (std::ostream& os, const CcnxPit &pit);
+/**
+ * @brief Class for exception when PIT entry is not found
+ */
class CcnxPitEntryNotFound {};
} // namespace ns3
diff --git a/model/ccnx.h b/model/ccnx.h
index e72ddec..4dc3cea 100644
--- a/model/ccnx.h
+++ b/model/ccnx.h
@@ -181,25 +181,25 @@
// transmittedInterestTrace is inside ForwardingStrategy
TracedCallback<Ptr<const CcnxInterestHeader>,
- Ptr<const CcnxFace> > m_inInterests;
+ Ptr<const CcnxFace> > m_inInterests; ///< @brief trace of incoming Interests
TracedCallback<Ptr<const CcnxInterestHeader>,
DropReason,
- Ptr<const CcnxFace> > m_dropInterests;
+ Ptr<const CcnxFace> > m_dropInterests; ///< @brief trace of dropped Interests
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
TracedCallback<Ptr<const CcnxInterestHeader>,
- Ptr<const CcnxFace> > m_outNacks;
+ Ptr<const CcnxFace> > m_outNacks; ///< @brief trace of outgoing NACKs
TracedCallback<Ptr<const CcnxInterestHeader>,
- Ptr<const CcnxFace> > m_inNacks;
+ Ptr<const CcnxFace> > m_inNacks; ///< @brief trace of incoming NACKs
TracedCallback<Ptr<const CcnxInterestHeader>,
DropReason,
- Ptr<const CcnxFace> > m_dropNacks;
+ Ptr<const CcnxFace> > m_dropNacks; ///< @brief trace of dropped NACKs
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
@@ -207,14 +207,14 @@
TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
bool /*from cache*/,
- Ptr<const CcnxFace> > m_outData;
+ Ptr<const CcnxFace> > m_outData; ///< @brief trace of outgoing Data
TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
- Ptr<const CcnxFace> > m_inData;
+ Ptr<const CcnxFace> > m_inData; ///< @brief trace of incoming Data
TracedCallback<Ptr<const CcnxContentObjectHeader>, Ptr<const Packet>,
DropReason,
- Ptr<const CcnxFace> > m_dropData;
+ Ptr<const CcnxFace> > m_dropData; ///< @brief trace of dropped Data
};
} // namespace ns3
diff --git a/utils/batches.h b/utils/batches.h
index d481a47..7074640 100644
--- a/utils/batches.h
+++ b/utils/batches.h
@@ -29,11 +29,22 @@
namespace ns3 {
+/**
+ * @brief Class representing sets of (time, number) tuples with support of reading writing to streams
+ */
class Batches : public std::list<boost::tuple<Time, uint32_t> >
{
public:
+ /**
+ * @brief Default constructor
+ */
Batches () { };
+ /**
+ * @brief Add tuple
+ * @param when time for the tuple
+ * @param amount number for the tuple
+ */
void
Add (const Time &when, uint32_t amount)
{
@@ -43,6 +54,11 @@
ATTRIBUTE_HELPER_HEADER (Batches);
+/**
+ * @brief Output contents of the Batches to the std::ostream
+ * @param os reference to std::ostream
+ * @param batch constant reference to Batch object
+ */
std::ostream &
operator << (std::ostream &os, const Batches &batch);