documentation
diff --git a/apps/ccnx-app.h b/apps/ccnx-app.h
index 457172e..ae52048 100644
--- a/apps/ccnx-app.h
+++ b/apps/ccnx-app.h
@@ -43,6 +43,9 @@
class CcnxApp: public Application
{
public:
+ /**
+ * \typedef A callback to pass packets to underlying CCNx protocol
+ */
typedef Callback<bool, const Ptr<const Packet>&> ProtocolHandler;
static TypeId GetTypeId ();
@@ -94,9 +97,9 @@
StopApplication (); // Called at time specified by Stop
protected:
- ProtocolHandler m_protocolHandler;
+ 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
+ Ptr<CcnxFace> m_face; // local face that is created
TracedCallback<Ptr<const CcnxInterestHeader>,
Ptr<CcnxApp>, Ptr<CcnxFace> > m_receivedInterests;
diff --git a/apps/ccnx-consumer.cc b/apps/ccnx-consumer.cc
index 9bf66c8..30ad394 100644
--- a/apps/ccnx-consumer.cc
+++ b/apps/ccnx-consumer.cc
@@ -66,7 +66,7 @@
StringValue ("/"),
MakeCcnxNameComponentsAccessor (&CcnxConsumer::m_interestName),
MakeCcnxNameComponentsChecker ())
- .AddAttribute ("LifeTime", "LifeTime fo interest packet",
+ .AddAttribute ("LifeTime", "LifeTime for interest packet",
StringValue ("2s"),
MakeTimeAccessor (&CcnxConsumer::m_interestLifeTime),
MakeTimeChecker ())
diff --git a/apps/ccnx-consumer.h b/apps/ccnx-consumer.h
index 7cfb739..fc4e363 100644
--- a/apps/ccnx-consumer.h
+++ b/apps/ccnx-consumer.h
@@ -38,11 +38,19 @@
namespace ns3
{
+/**
+ * @ingroup ccnx
+ * \brief CCNx application for sending out Interest packets
+ */
class CcnxConsumer: public CcnxApp
{
public:
static TypeId GetTypeId ();
+ /**
+ * \brief Default constructor
+ * Sets up randomizer function and packet sequence number
+ */
CcnxConsumer ();
// From CcnxApp
@@ -65,43 +73,62 @@
StopApplication ();
private:
- //helpers
+ /**
+ * \brief Constructs the Interest packet and sends it using a callback to the underlying CCNx protocol
+ */
void
SendPacket ();
+ /**
+ * \brief Checks if the packet need to be retransmitted becuase of retransmission timer expiration
+ */
void
CheckRetxTimeout ();
+ /**
+ * \brief Modifies the frequency of checking the retransmission timeouts
+ * \param retxTimer Timeout defining how frequent retransmission timeouts should be checked
+ */
void
SetRetxTimer (Time retxTimer);
+ /**
+ * \brief Returns the frequency of checking the retransmission timeouts
+ * \return Timeout defining how frequent retransmission timeouts should be checked
+ */
Time
GetRetxTimer () const;
protected:
- UniformVariable m_rand;
- uint32_t m_seq;
- 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
+ UniformVariable m_rand; ///< \brief this random variable is used for Nonce generation
+ uint32_t m_seq; ///< \brief packet sequence number specific for every application
+ EventId m_sendEvent; ///< \brief Eventid of pending "send packet" event
+ Time m_retxTimer; ///< \brief Timeout defining how frequent retransmission timeouts should be checked
+ EventId m_retxEvent; ///< \brief Event to check whether or not retransmission should be performed
- Time m_rto; // Retransmission timeout
- Time m_rttVar; // RTT variance
- Time m_sRtt; // smoothed RTT
+ Time m_rto; ///< \brief Retransmission timeout
+ Time m_rttVar; ///< \brief RTT variance
+ Time m_sRtt; ///< \brief smoothed RTT
- Time m_offTime;
- CcnxNameComponents m_interestName;
- Time m_interestLifeTime;
- int32_t m_minSuffixComponents;
- int32_t m_maxSuffixComponents;
- bool m_childSelector;
- CcnxNameComponents m_exclude;
+ Time m_offTime; ///< \brief Time interval between packets
+ CcnxNameComponents m_interestName; ///< \brief CcnxName of the Interest (use CcnxNameComponents)
+ Time m_interestLifeTime; ///< \brief LifeTime for interest packet
+ int32_t m_minSuffixComponents; ///< \brief MinSuffixComponents. See CcnxInterestHeader for more information
+ int32_t m_maxSuffixComponents; ///< \brief MaxSuffixComponents. See CcnxInterestHeader for more information
+ bool m_childSelector; ///< \brief ChildSelector. See CcnxInterestHeader for more information
+ CcnxNameComponents m_exclude; ///< \brief Exclude. See CcnxInterestHeader for more information
+ /**
+ * \struct This struct contains sequence numbers of packets to be retransmitted
+ */
struct RetxSeqsContainer :
public std::set<uint32_t> { };
- RetxSeqsContainer m_retxSeqs; // ordered set of sequence numbers to be retransmitted
+ RetxSeqsContainer m_retxSeqs; ///< \brief ordered set of sequence numbers to be retransmitted
+ /**
+ * \struct This struct contains a pair of packet sequence number and its timeout
+ */
struct SeqTimeout
{
SeqTimeout (uint32_t _seq, Time _time) : seq (_seq), time (_time) { }
@@ -113,6 +140,9 @@
class i_seq { };
class i_timestamp { };
+ /**
+ * \struct This struct contains a multi-index for the set of SeqTimeout structs
+ */
struct SeqTimeoutsContainer :
public boost::multi_index::multi_index_container<
SeqTimeout,
@@ -128,9 +158,12 @@
>
> { } ;
- SeqTimeoutsContainer m_seqTimeouts;
- boost::mutex m_seqTimeoutsGuard;
+ SeqTimeoutsContainer m_seqTimeouts; ///< \brief multi-index for the set of SeqTimeout structs
+ boost::mutex m_seqTimeoutsGuard; ///< \brief mutex for safe work with the m_seqTimeouts
+ /**
+ * \brief A trace that is called after each transmitted Interest packet
+ */
TracedCallback<Ptr<const CcnxInterestHeader>,
Ptr<CcnxApp>, Ptr<CcnxFace> > m_transmittedInterests;
};
diff --git a/helper/ccnx-stack-helper.h b/helper/ccnx-stack-helper.h
index 5147722..f52c0d3 100644
--- a/helper/ccnx-stack-helper.h
+++ b/helper/ccnx-stack-helper.h
@@ -74,7 +74,7 @@
*
* Set the forwarding helper to use during Install. The forwarding helper is
* really an object factory which is used to create an object of type
- * ns3::CcnxFrProtocol per node. This forwarding object is then associated to
+ * ns3::CcnxL3Protocol per node. This forwarding object is then associated to
* a single ns3::Ccnx object through its ns3::Ccnx::SetforwardingProtocol.
*/
void
diff --git a/model/ccnx-face.cc b/model/ccnx-face.cc
index 3e39384..17d0612 100644
--- a/model/ccnx-face.cc
+++ b/model/ccnx-face.cc
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2005,2006,2007 INRIA
+ * Copyright (c) 2011 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/model/ccnx-face.h b/model/ccnx-face.h
index b63b1e7..e0deb2a 100644
--- a/model/ccnx-face.h
+++ b/model/ccnx-face.h
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2005,2006,2007 INRIA
+ * Copyright (c) 2011 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/model/ccnx-local-face.cc b/model/ccnx-local-face.cc
index a3267bd..7b4413c 100644
--- a/model/ccnx-local-face.cc
+++ b/model/ccnx-local-face.cc
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2005,2006,2007 INRIA
+ * Copyright (c) 2011 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/model/ccnx-local-face.h b/model/ccnx-local-face.h
index 8855b75..63458f2 100644
--- a/model/ccnx-local-face.h
+++ b/model/ccnx-local-face.h
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2005,2006,2007 INRIA
+ * Copyright (c) 2011 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/model/ccnx-net-device-face.cc b/model/ccnx-net-device-face.cc
index d4af70f..3d3275e 100644
--- a/model/ccnx-net-device-face.cc
+++ b/model/ccnx-net-device-face.cc
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2005,2006,2007 INRIA
+ * Copyright (c) 2011 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/model/ccnx-net-device-face.h b/model/ccnx-net-device-face.h
index 148da39..a83ed70 100644
--- a/model/ccnx-net-device-face.h
+++ b/model/ccnx-net-device-face.h
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2005,2006,2007 INRIA
+ * Copyright (c) 2011 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/model/ccnx.cc b/model/ccnx.cc
index af551a6..21ec2bf 100644
--- a/model/ccnx.cc
+++ b/model/ccnx.cc
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
- * Copyright (c) 2007 INRIA
+ * Copyright (c) 2011 University of California, Los Angeles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as