--- a/doc/doxygen.conf Wed Mar 05 17:08:10 2014 -0800
+++ b/doc/doxygen.conf Mon Mar 10 10:57:50 2014 -0700
@@ -358,7 +358,7 @@
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols.
-SYMBOL_CACHE_SIZE = 0
+SYMBOL_CACHE_SIZE = 1
# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
@@ -1660,10 +1660,25 @@
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
-# Function like macros at file global scope typically need to be here:
-
-PREDEFINED = NS_LOG_COMPONENT_DEFINE()=1 \
- NS_OBJECT_ENSURE_REGISTERED()=1
+# ns-3:
+#
+# We predefine NS3_ASSERT_ENABLE and NS3_LOG_ENABLE so doxygen sees
+# the working definitions.
+#
+# Function like macros at file global scope typically need to be here,
+# since doxygen confuses invocations of these macros for function
+# definitions.
+#
+# We also list the generic logging macros to suppress the "Referenced by"
+# sections. Since these macros are so heavily used the references are
+# pages long.
+
+PREDEFINED = \
+ NS3_ASSERT_ENABLE \
+ NS3_LOG_ENABLE \
+ NS_LOG_COMPONENT_DEFINE()=1 \
+ NS_LOG_COMPONENT_DEFINE_MASK()=1 \
+ NS_OBJECT_ENSURE_REGISTERED()=1 \
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
--- a/doc/main.h Wed Mar 05 17:08:10 2014 -0800
+++ b/doc/main.h Mon Mar 10 10:57:50 2014 -0700
@@ -71,3 +71,28 @@
* ns3 namespace.
*/
+// Macros defined by the build system.
+//
+// These have to be visible for doxygen to document them,
+// so we put them here in a file only seen by doxygen, not the compiler.
+/**
+ * \ingroup assert
+ *
+ * \def NS3_ASSERT_ENABLE
+ *
+ * Enable asserts at compile time.
+ *
+ * This is normally set by `./waf configure --build-profile=debug`.
+ */
+#define NS3_ASSERT_ENABLE
+
+/**
+ * \ingroup logging
+ *
+ * \def NS3_LOG_ENABLE
+ *
+ * Enable logging at compile time.
+ *
+ * This is normally set by `./waf configure --build-profile=debug`.
+ */
+#define NS3_LOG_ENABLE
--- a/doc/modules Wed Mar 05 17:08:10 2014 -0800
+++ b/doc/modules Mon Mar 10 10:57:50 2014 -0700
@@ -1,33 +1,42 @@
/**
* @anchor modules_anchor
*
- * @defgroup constructs Introspected Lists
- * \brief These are lists of useful items found by examining the type system.
- *
* @defgroup constants Constants
* @brief Constants you can change
*
* @defgroup utils Utils
* @brief The utils directory is for various programs and scripts related
* to code coverage, test suites, style checking, and benchmarking.
- *
+ */
+/**
* @defgroup core Core
* \brief The "core" module contains:
- * - a time management class to hold a time and convert between various time units: ns3::Time
- * - a scheduler base class used to implement new simulation event schedulers:
+ * - a time management class to hold a time and convert between various
+ * time units: ns3::Time
+ * - a scheduler base class used to implement new simulation event
+ * schedulers:
* ns3::Scheduler and ns3::SchedulerFactory
- * - a simulator class used to create, schedule and cancel events: ns3::Simulator
+ * - a simulator class used to create, schedule and cancel events:
+ * ns3::Simulator
* - a Functor class: ns3::Callback
- * - an os-independent interface to get access to the elapsed wall clock time: ns3::SystemWallClockMs
- * - a class to register regression tests with the test manager: ns3::Test and ns3::TestManager
- * - debugging facilities: \ref logging, \ref assert
+ * - an os-independent interface to get access to the elapsed wall clock
+ * time: ns3::SystemWallClockMs
+ * - a class to register regression tests with the test manager: ns3::Test
+ * and ns3::TestManager
+ * - debugging facilities: \ref debugging
* - \ref randomvariable
- * - a base class for objects which need to support per-instance "attributes" and
- * trace sources: ns3::ObjectBase
+ * - a base class for objects which need to support per-instance
+ * "attributes" and trace sources: ns3::ObjectBase
* - a base class for objects which need to support reference counting
* and dynamic object aggregation: ns3::Object
- * - a smart-pointer class ns3::Ptr designed to work together with ns3::Object
- * - a configuration class used to set and control all attributes and trace sources
- * in a simulation: ns3::Config.
+ * - a smart-pointer class ns3::Ptr designed to work together with
+ * ns3::Object
+ * - a configuration class used to set and control all attributes and
+ * trace sources in a simulation: ns3::Config.
+ */
+/**
+ * @ingroup core
+ * @defgroup debugging Debugging tools
*
+ * @brief Assertions, breakpoints, logging, and abnormal program termination
*/
--- a/src/core/model/abort.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/abort.h Mon Mar 10 10:57:50 2014 -0700
@@ -24,7 +24,8 @@
#include "fatal-error.h"
/**
- * \ingroup debugging
+ * \ingroup fatal
+ *
* \brief Abnormal program termination
*
* \param msg message to output when this macro is hit.
@@ -48,7 +49,8 @@
/**
- * \ingroup debugging
+ * \ingroup fatal
+ *
* \brief Abnormal program termination if cond is true.
*
* \param cond condition to be evaluated.
@@ -76,7 +78,8 @@
} while (false)
/**
- * \ingroup debugging
+ * \ingroup fatal
+ *
* \brief Abnormal program termination if cond is true.
*
* \param cond condition to be evaluated.
@@ -105,7 +108,8 @@
} while (false)
/**
- * \ingroup debugging
+ * \ingroup fatal
+ *
* \brief Abnormal program termination if cond is false.
*
* \param cond condition to be evaluated.
@@ -118,7 +122,8 @@
NS_ABORT_IF (!(cond))
/**
- * \ingroup debugging
+ * \ingroup fatal
+ *
* \brief Abnormal program termination if cond is false.
*
* \param cond condition to be evaluated.
--- a/src/core/model/assert.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/assert.h Mon Mar 10 10:57:50 2014 -0700
@@ -21,21 +21,11 @@
#ifndef NS_ASSERT_H
#define NS_ASSERT_H
-#ifdef NS3_ASSERT_ENABLE
-
-#include <iostream>
-
-#include "fatal-error.h"
-
-/**
- * \ingroup core
- * \defgroup debugging Debugging
- */
/**
* \ingroup debugging
- * \defgroup assert Assert
+ * \defgroup assert Assertions
*
- * \brief assert functions and macros
+ * \brief Assert functions and macros
*
* The assert macros are used to verify
* at runtime that a certain condition is true. If it is
@@ -53,13 +43,20 @@
* builds, use NS_ABORT_UNLESS and NS_ABORT_MSG_UNLESS.
*/
+#ifdef NS3_ASSERT_ENABLE
+
+#include <iostream>
+
+#include "fatal-error.h"
+
/**
* \ingroup assert
- * \param condition condition to verify.
*
* At runtime, in debugging builds, if this condition is not
* true, the program prints the source file, line number and
* unverified condition and halts by calling std::terminate
+ *
+ * \param condition condition to verify.
*/
#define NS_ASSERT(condition) \
do \
@@ -76,12 +73,13 @@
/**
* \ingroup assert
- * \param condition condition to verify.
- * \param message message to output
*
* At runtime, in debugging builds, if this condition is not
* true, the program prints the message to output and
* halts by calling std::terminate.
+ *
+ * \param condition condition to verify.
+ * \param message message to output
*/
#define NS_ASSERT_MSG(condition, message) \
do \
--- a/src/core/model/attribute-helper.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/attribute-helper.h Mon Mar 10 10:57:50 2014 -0700
@@ -99,13 +99,13 @@
/**
* \ingroup attributehelper
*
- * Define the attribute accessor functions \c Make<type>Accessor
+ * Define the attribute accessor functions \c MakeTypeAccessor
* for class \pname{type}.
*
* \param type the name of the class
*
* This macro defines and generates the code for the implementation
- * of the \c Make<type>Accessor template functions. This macro is typically
+ * of the \c MakeTypeAccessor template functions. This macro is typically
* invoked in a class header to allow users of this class to view and
* use the template functions defined here. This macro is implemented
* through the helper templates functions ns3::MakeAccessorHelper<>.
@@ -128,10 +128,10 @@
* Declare the attribute value class \pname{name}Value
* for underlying class \pname{type}.
*
- * \param type The underlying type.
+ * \param type The underlying type name
* \param name The token to use in defining the accessor name.
*
- * This macro declares the class \c <type>Value associated with class \c type.
+ * This macro declares the class \c TypeValue associated with class \c type.
* This macro is typically invoked in the class header file.
*
* This can be used directly for things like plain old data,
@@ -165,16 +165,16 @@
/**
* \ingroup attributehelper
*
- * Declare the attribute value class \pname{type}Value
- * for the class \pname{type}.
+ * Declare the attribute value class \pname{Name}Value
+ * for the class \pname{Name}
*
- * \param type the name of the class.
+ * \param Name the name of the class.
*
- * This macro declares the class \c <type>Value associated to class \c type.
+ * This macro declares the class \c NameValue associated to class \c Name.
* This macro is typically invoked in the class header file.
*/
-#define ATTRIBUTE_VALUE_DEFINE(type) \
- ATTRIBUTE_VALUE_DEFINE_WITH_NAME (type,type)
+#define ATTRIBUTE_VALUE_DEFINE(Name) \
+ ATTRIBUTE_VALUE_DEFINE_WITH_NAME (Name,Name)
/**
@@ -198,12 +198,12 @@
* \ingroup attributehelper
*
* Declare the AttributeChecker class \pname{type}Checker
- * and the \c Make<type>Checker function for class \pname{type}.
+ * and the \c MakeTypeChecker function for class \pname{type}.
*
* \param type the name of the class
*
* This macro declares the \pname{type}Checker class and the associated
- * \c Make<type>Checker function.
+ * \c MakeTypeChecker function.
*
* (Note that the \pname{type}Checker class needs no implementation
* since it just inherits all its implementation from AttributeChecker.)
@@ -222,7 +222,7 @@
* the attribute value class \pname{name}Value
* of the underlying class \pname{type}.
*
- * \param type The underlying type.
+ * \param type The underlying type name
* \param name The token to use in defining the accessor name.
*
* This macro implements the \pname{type}Value class methods
@@ -281,11 +281,11 @@
/**
* \ingroup attributehelper
*
- * Define the \c Make<type>Checker function for class \pname{type}.
+ * Define the \c MakeTypeChecker function for class \pname{type}.
*
* \param type the name of the class
*
- * This macro implements the \c Make<type>Checker function.
+ * This macro implements the \c MakeTypeChecker function.
*
* Typically invoked in the source file..
*/
@@ -298,12 +298,12 @@
/**
* \ingroup attributehelper
*
- * Define the \c Make<type>Checker function for class \pname{type}.
+ * Define the \c MakeTypeChecker function for class \pname{type}.
*
* \param type the name of the class.
* \param name the string name of the underlying type.
*
- * This macro implements the \c Make<type>Checker function
+ * This macro implements the \c MakeTypeChecker function
* for class \pname{type}.
*
* Typically invoked in the source file..
@@ -325,10 +325,10 @@
*
* - The attribute value class \pname{type}Value,
*
- * - The attribute accessor functions \c Make<type>Accessor,
+ * - The attribute accessor functions \c MakeTypeAccessor,
*
* - The AttributeChecker class \pname{type}Checker
- * and the \c Make<type>Checker function,
+ * and the \c MakeTypeChecker function,
*
* for class \pname{type}.
*
@@ -351,7 +351,7 @@
*
* - The \pname{type}Value class methods,
*
- * - The \c Make<type>Checker function,
+ * - The \c MakeTypeChecker function,
*
* for class \pname{type}.
*
--- a/src/core/model/breakpoint.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/breakpoint.h Mon Mar 10 10:57:50 2014 -0700
@@ -36,10 +36,17 @@
/**
* \ingroup debugging
+ * \defgroup breakpoint Breakpoints
+ *
+ * \brief Trigger a debugger breakpoint.
+ */
+
+/**
+ * \ingroup breakpoint
*
* Inserts a breakpoint instruction (or equivalent system call) into
- * the code for selected machines. When an NS_ASSERT cannot verify its condition,
- * this macro is used. Falls back to calling
+ * the code for selected machines. When an NS_ASSERT cannot verify
+ * its condition, this macro is used. Falls back to calling
* AssertBreakpoint() for architectures where breakpoint assembly
* instructions are not supported.
*/
@@ -57,7 +64,7 @@
#endif
/**
- * \ingroup debugging
+ * \ingroup breakpoint
*
* \brief fallback breakpoint function
*
--- a/src/core/model/cairo-wideint.c Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/cairo-wideint.c Mon Mar 10 10:57:50 2014 -0700
@@ -667,7 +667,7 @@
* dividend and 64 bit divisor. If the quotient doesn't fit into 32
* bits then the returned remainder is equal to the divisor, and the
* quotient is the largest representable 64 bit integer. It is an
- * error to call this function with the high 32 bits of @num being
+ * error to call this function with the high 32 bits of `num' being
* non-zero. */
cairo_uquorem64_t
_cairo_uint_96by64_32x64_divrem (cairo_uint128_t num,
--- a/src/core/model/callback.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/callback.h Mon Mar 10 10:57:50 2014 -0700
@@ -35,6 +35,10 @@
/**
* \ingroup core
* \defgroup callback Callbacks
+ * \brief Wrap functions, objects, and arguments into self contained callbacks.
+ *
+ * Wrapped callbacks are at the heart of scheduling events in the
+ * simulator.
*/
/**
* \ingroup callback
@@ -1658,12 +1662,14 @@
class CallbackValue : public AttributeValue
{
public:
+ /** Constructor */
CallbackValue ();
/**
* Copy constructor
* \param base Callback to copy
*/
- CallbackValue (const CallbackBase &base);
+ CallbackValue (const CallbackBase &base);
+ /** Destructor */
virtual ~CallbackValue ();
/** \param base the Callbackbase to use */
void Set (CallbackBase base);
--- a/src/core/model/command-line.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/command-line.h Mon Mar 10 10:57:50 2014 -0700
@@ -353,12 +353,14 @@
/**
* Handler for \c \-\-PrintAttributes: print the attributes for a given type.
*
+ * \param os the output stream.
* \param type the TypeId whose Attributes should be displayed
*/
void PrintAttributes (std::ostream &os, const std::string &type) const;
/**
* Handler for \c \-\-PrintGroup: print all types belonging to a given group.
*
+ * \param os the output stream.
* \param group the name of the TypeId group to display
*/
void PrintGroup (std::ostream &os, const std::string &group) const;
--- a/src/core/model/fatal-error.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/fatal-error.h Mon Mar 10 10:57:50 2014 -0700
@@ -28,7 +28,29 @@
#include "fatal-impl.h"
/**
- * \ingroup debugging
+ * \ingroup core
+ * \defgroup fatal Fatal Error Handlers
+ *
+ * \brief Functions to help clean up when a fatal error
+ * is encountered.
+ *
+ * The functions in this group are used to perform
+ * limited clean up, like flushing active streams, when
+ * fatal errors are encountered (through assertion fail,
+ * calls to NS_ABORT_* or calls to NS_FATAL_ERROR).
+ *
+ * Currently, other than flushing active ostreams, these
+ * functions does not interfere with outside memory. There
+ * is still a residual risk that invalid ostream
+ * pointers may be present, and may corrupt the memory
+ * on the attempt to execute the flush() function.
+ */
+
+
+/**
+ * \ingroup fatal
+ * \private
+ *
* \brief fatal error handling
*
* When this macro is hit at runtime, details of filename
@@ -52,7 +74,8 @@
while (false)
/**
- * \ingroup debugging
+ * \ingroup fatal
+ *
* \brief fatal error handling
*
* \param msg message to output when this macro is hit.
--- a/src/core/model/fatal-impl.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/fatal-impl.h Mon Mar 10 10:57:50 2014 -0700
@@ -23,30 +23,11 @@
#include <ostream>
-/**
- * \ingroup debugging
- * \defgroup fatalHandler Fatal Error Handler
- *
- * \brief Functions to help clean up when fatal error
- * is encountered.
- *
- * The functions in this group are used to perform
- * limited clean up, like flushing active streams, when
- * fatal error are encountered (through assertion fail,
- * calls to NS_ABORT_* and calls to NS_FATAL_ERROR.
- *
- * Currently, other than flushing active ostreams, these
- * functions does not interfere with outside memory. There
- * is still a residual risk that may be invalid ostream
- * pointers may be present, and may corrupt the memory
- * on the attempt to execute the flush() function.
- */
-
namespace ns3 {
namespace FatalImpl {
/**
- * \ingroup fatalHandler
+ * \ingroup fatal
* \param stream The stream to be flushed on abnormal exit.
*
* \brief Register a stream to be flushed on abnormal exit.
@@ -60,7 +41,7 @@
void RegisterStream (std::ostream* stream);
/**
- * \ingroup fatalHandler
+ * \ingroup fatal
* \param stream The stream to be unregistered.
*
* \brief Unregister a stream for flushing on abnormal exit.
@@ -74,7 +55,7 @@
void UnregisterStream (std::ostream* stream);
/**
- * \ingroup fatalHandler
+ * \ingroup fatal
*
* \brief Flush all currently registered streams.
*
--- a/src/core/model/hash.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/hash.h Mon Mar 10 10:57:50 2014 -0700
@@ -35,6 +35,8 @@
/**
* \ingroup core
* \defgroup hash Hash Functions
+ *
+ * \brief Generic Hash function interface
*/
/**
* \ingroup hash
@@ -70,7 +72,7 @@
* offer \c unsigned.
*
* Longer hashes require returning a byte buffer of some sort,
- * but our \ref buffer class seems a bit overkill for this case.
+ * but our \ref Buffer class seems a bit overkill for this case.
*
*/
class Hasher
--- a/src/core/model/log.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/log.h Mon Mar 10 10:57:50 2014 -0700
@@ -31,6 +31,7 @@
/**
* \ingroup debugging
* \defgroup logging Logging
+ *
* \brief Logging functions and macros
*
* LOG functionality: macros which allow developers to
@@ -59,7 +60,6 @@
* Use NS_LOG_FUNCTION_NOARGS() only in static functions.
*/
-
/**
* \ingroup logging
*
@@ -97,47 +97,53 @@
};
/**
- * \param name a log component name
- * \param level a logging level
* \ingroup logging
*
* Enable the logging output associated with that log component.
+ *
* The logging output can be later disabled with a call
* to ns3::LogComponentDisable.
*
* Same as running your program with the NS_LOG environment
* variable set as NS_LOG='name=level'
+ *
+ * \param name a log component name
+ * \param level a logging level
*/
void LogComponentEnable (char const *name, enum LogLevel level);
/**
- * \param level a logging level
* \ingroup logging
*
* Enable the logging output for all registered log components.
*
* Same as running your program with the NS_LOG environment
* variable set as NS_LOG='*=level'
+ *
+ * \param level a logging level
*/
void LogComponentEnableAll (enum LogLevel level);
/**
- * \param name a log component name
- * \param level a logging level
* \ingroup logging
*
* Disable the logging output associated with that log component.
+ *
* The logging output can be later re-enabled with a call
* to ns3::LogComponentEnable.
+ *
+ * \param name a log component name
+ * \param level a logging level
*/
void LogComponentDisable (char const *name, enum LogLevel level);
/**
- * \param level a logging level
* \ingroup logging
*
* Disable all logging for all components.
+ *
+ * \param level a logging level
*/
void LogComponentDisableAll (enum LogLevel level);
@@ -164,7 +170,9 @@
/**
* \ingroup logging
*
- * Define a logging component with a default mask.
+ * Define a logging component with a mask.
+ *
+ * See LogComponent().
*
* \param name a string
* \param mask the default mask
@@ -175,6 +183,8 @@
/**
* \ingroup logging
* Append the simulation time to a log message.
+ * \internal
+ * Logging implementation macro; should not be called directly.
*/
#define NS_LOG_APPEND_TIME_PREFIX \
if (g_log.IsEnabled (ns3::LOG_PREFIX_TIME)) \
@@ -190,6 +200,8 @@
/**
* \ingroup logging
* Append the simulation node id to a log message.
+ * \internal
+ * Logging implementation macro; should not be called directly.
*/
#define NS_LOG_APPEND_NODE_PREFIX \
if (g_log.IsEnabled (ns3::LOG_PREFIX_NODE)) \
@@ -205,6 +217,8 @@
/**
* \ingroup logging
* Append the function name to a log message.
+ * \internal
+ * Logging implementation macro; should not be called directly.
*/
#define NS_LOG_APPEND_FUNC_PREFIX \
if (g_log.IsEnabled (ns3::LOG_PREFIX_FUNC)) \
@@ -216,6 +230,8 @@
/**
* \ingroup logging
* Append the log severity level to a log message.
+ * \internal
+ * Logging implementation macro; should not be called directly.
*/
#define NS_LOG_APPEND_LEVEL_PREFIX(level) \
if (g_log.IsEnabled (ns3::LOG_PREFIX_LEVEL)) \
@@ -225,28 +241,50 @@
#ifndef NS_LOG_APPEND_CONTEXT
+/**
+ * \ingroup logging
+ * Append the node id to a log message.
+ *
+ * This is implemented locally in `.cc` files because
+ * the the relevant variable is only known there.
+ *
+ * Preferred format is something like (assuming the node id is
+ * accessible from `var`:
+ * \code
+ * if (var)
+ * {
+ * std::clog << "[node " << var->GetObject<Node> ()->GetId () << "] ";
+ * }
+ * \endcode
+ *
+ * \internal
+ * Logging implementation macro; should not be called directly.
+ *
+ */
#define NS_LOG_APPEND_CONTEXT
#endif /* NS_LOG_APPEND_CONTEXT */
-
#ifdef NS3_LOG_ENABLE
-
-
/**
* \ingroup logging
- * \param level the log level
- * \param msg the message to log
*
* This macro allows you to log an arbitrary message at a specific
- * log level. The log message is expected to be a C++ ostream
+ * log level.
+ *
+ * The log message is expected to be a C++ ostream
* message such as "my string" << aNumber << "my oth stream".
*
* Typical usage looks like:
* \code
* NS_LOG (LOG_DEBUG, "a number="<<aNumber<<", anotherNumber="<<anotherNumber);
* \endcode
+ *
+ * \param level the log level
+ * \param msg the message to log
+ * \internal
+ * Logging implementation macro; should not be called directly.
*/
#define NS_LOG(level, msg) \
do \
@@ -265,36 +303,40 @@
/**
* \ingroup logging
- * \param msg the message to log
*
* Use \ref NS_LOG to output a message of level LOG_ERROR.
+ *
+ * \param msg the message to log
*/
#define NS_LOG_ERROR(msg) \
NS_LOG (ns3::LOG_ERROR, msg)
/**
* \ingroup logging
- * \param msg the message to log
*
* Use \ref NS_LOG to output a message of level LOG_WARN.
+ *
+ * \param msg the message to log
*/
#define NS_LOG_WARN(msg) \
NS_LOG (ns3::LOG_WARN, msg)
/**
* \ingroup logging
- * \param msg the message to log
*
* Use \ref NS_LOG to output a message of level LOG_DEBUG.
+ *
+ * \param msg the message to log
*/
#define NS_LOG_DEBUG(msg) \
NS_LOG (ns3::LOG_DEBUG, msg)
/**
* \ingroup logging
- * \param msg the message to log
*
* Use \ref NS_LOG to output a message of level LOG_INFO.
+ *
+ * \param msg the message to log
*/
#define NS_LOG_INFO(msg) \
NS_LOG (ns3::LOG_INFO, msg)
@@ -324,7 +366,6 @@
/**
* \ingroup logging
- * \param parameters the parameters to output.
*
* If log level LOG_FUNCTION is enabled, this macro will output
* all input parameters separated by ", ".
@@ -342,6 +383,7 @@
* (at least) NS_LOG_FUNCTION(this). Static functions should use
* NS_LOG_FUNCTION_NOARGS() instead.
*
+ * \param parameters the parameters to output.
*/
#define NS_LOG_FUNCTION(parameters) \
do \
@@ -362,18 +404,20 @@
/**
* \ingroup logging
- * \param msg the message to log
*
* Use \ref NS_LOG to output a message of level LOG_LOGIC
+ *
+ * \param msg the message to log
*/
#define NS_LOG_LOGIC(msg) \
NS_LOG (ns3::LOG_LOGIC, msg)
/**
* \ingroup logging
- * \param msg the message to log
*
* Output the requested message unconditionaly.
+ *
+ * \param msg the message to log
*/
#define NS_LOG_UNCOND(msg) \
do \
@@ -429,6 +473,9 @@
* Constructor
*
* \param [in] name the user-visible name for this component.
+ * \param [in] mask LogLevels blocked for this LogComponent. Blocking
+ * a log level helps prevent recursion by logging in
+ * functions which help implement the logging facility.
*/
LogComponent (const std::string & name, const enum LogLevel mask = LOG_NONE);
/**
@@ -491,11 +538,11 @@
/**
* \ingroup logging
*
- * Insert `, ' when streaming function arguments.
+ * Insert `, ` when streaming function arguments.
*/
class ParameterLogger
{
- bool m_first; //!< First argument flag, doesn't get `, '.
+ bool m_first; //!< First argument flag, doesn't get `, `.
std::ostream &m_os; //!< Underlying output stream.
public:
/**
@@ -507,7 +554,7 @@
/**
* Write a function parameter on the output stream,
- * separating paramters after the first by `, ' strings.
+ * separating paramters after the first by `,` strings.
*
* \param [in] param the function parameter
*/
--- a/src/core/model/names.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/names.h Mon Mar 10 10:57:50 2014 -0700
@@ -370,7 +370,7 @@
*
* \brief Non-templated internal version of Names::Find
*
- * \param name A string containing the path of the object to look for.
+ * \param path A string containing the path of the object to look for.
*
* \returns a smart pointer to the named object.
*/
@@ -381,7 +381,7 @@
*
* \brief Non-templated internal version of Names::Find
*
- * \param context A string containing the path to search for the object in.
+ * \param path A string containing the path to search for the object in.
* \param name A string containing the name of the object to look for.
*
* \returns a smart pointer to the named object.
--- a/src/core/model/nstime.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/nstime.h Mon Mar 10 10:57:50 2014 -0700
@@ -35,11 +35,7 @@
/**
* \ingroup core
- * \defgroup time Time
- */
-/**
- * \ingroup time
- * \brief keep track of time values and allow control of global simulation resolution
+ * \brief Simulation virtual time values and global simulation resolution.
*
* This class defines all the classic C++ addition/subtraction
* operators: +, -, +=, -=; and all the classic comparison operators:
@@ -99,7 +95,7 @@
LAST = 10
};
- inline Time &operator = (const Time &o)
+ inline Time & operator = (const Time & o)
{
m_data = o.m_data;
return *this;
@@ -112,7 +108,7 @@
Mark (this);
}
}
- inline Time(const Time &o)
+ inline Time(const Time & o)
: m_data (o.m_data)
{
if (g_markingTimes)
@@ -262,7 +258,7 @@
/**
* \return -1,0,+1 if `this < o`, `this == o`, or `this > o`
*/
- inline int Compare (const Time &o) const
+ inline int Compare (const Time & o) const
{
return (m_data < o.m_data) ? -1 : (m_data == o.m_data) ? 0 : 1;
}
@@ -445,7 +441,7 @@
{
return To (timeUnit).GetDouble ();
}
- static inline Time From (const int64x64_t &from, enum Unit timeUnit)
+ static inline Time From (const int64x64_t & from, enum Unit timeUnit)
{
struct Information *info = PeekInformation (timeUnit);
// DO NOT REMOVE this temporary variable. It's here
@@ -479,7 +475,7 @@
{
return int64x64_t (m_data);
}
- explicit inline Time (const int64x64_t &value)
+ explicit inline Time (const int64x64_t & value)
: m_data (value.GetHigh ())
{
if (g_markingTimes)
@@ -487,7 +483,7 @@
Mark (this);
}
}
- inline static Time From (const int64x64_t &value)
+ inline static Time From (const int64x64_t & value)
{
return Time (value);
}
@@ -516,11 +512,11 @@
static inline struct Resolution *PeekResolution (void)
{
static struct Time::Resolution resolution = SetDefaultNsResolution ();
- return &resolution;
+ return & resolution;
}
static inline struct Information *PeekInformation (enum Unit timeUnit)
{
- return &(PeekResolution ()->info[timeUnit]);
+ return & (PeekResolution ()->info[timeUnit]);
}
static struct Resolution SetDefaultNsResolution (void);
@@ -543,7 +539,7 @@
* [Stack Overflow](http://stackoverflow.com/questions/5526019/compile-errors-stdset-with-const-members)
* says otherwise, quoting the standard:
*
- * > §23.1/3 states that std::set key types must be assignable
+ * > & sect;23.1/3 states that std::set key types must be assignable
* > and copy constructable; clearly a const type will not be assignable.
*/
typedef std::set< Time * > MarkedTimes;
@@ -593,23 +589,23 @@
*/
static void ConvertTimes (const enum Unit unit);
- friend bool operator == (const Time &lhs, const Time &rhs);
- friend bool operator != (const Time &lhs, const Time &rhs);
- friend bool operator <= (const Time &lhs, const Time &rhs);
- friend bool operator >= (const Time &lhs, const Time &rhs);
- friend bool operator < (const Time &lhs, const Time &rhs);
- friend bool operator > (const Time &lhs, const Time &rhs);
- friend Time operator + (const Time &lhs, const Time &rhs);
- friend Time operator - (const Time &lhs, const Time &rhs);
- friend Time operator * (const Time &lhs, const int64_t &rhs);
- friend Time operator * (const int64_t &lhs, const Time &rhs);
- friend int64_t operator / (const Time &lhs, const Time &rhs);
- friend Time operator / (const Time &lhs, const int64_t &rhs);
- friend Time &operator += (Time &lhs, const Time &rhs);
- friend Time &operator -= (Time &lhs, const Time &rhs);
- friend Time Abs (const Time &time);
- friend Time Max (const Time &ta, const Time &tb);
- friend Time Min (const Time &ta, const Time &tb);
+ friend bool operator == (const Time & lhs, const Time & rhs);
+ friend bool operator != (const Time & lhs, const Time & rhs);
+ friend bool operator <= (const Time & lhs, const Time & rhs);
+ friend bool operator >= (const Time & lhs, const Time & rhs);
+ friend bool operator < (const Time & lhs, const Time & rhs);
+ friend bool operator > (const Time & lhs, const Time & rhs);
+ friend Time operator + (const Time & lhs, const Time & rhs);
+ friend Time operator - (const Time & lhs, const Time & rhs);
+ friend Time operator * (const Time & lhs, const int64_t & rhs);
+ friend Time operator * (const int64_t & lhs, const Time & rhs);
+ friend int64_t operator / (const Time & lhs, const Time & rhs);
+ friend Time operator / (const Time & lhs, const int64_t & rhs);
+ friend Time & operator += (Time & lhs, const Time & rhs);
+ friend Time & operator -= (Time & lhs, const Time & rhs);
+ friend Time Abs (const Time & time);
+ friend Time Max (const Time & ta, const Time & tb);
+ friend Time Min (const Time & ta, const Time & tb);
int64_t m_data; //!< Virtual time value, in the current unit.
@@ -621,111 +617,111 @@
static bool NS_UNUSED_GLOBAL (g_TimeStaticInit) = Time::StaticInit ();
inline bool
-operator == (const Time &lhs, const Time &rhs)
+operator == (const Time & lhs, const Time & rhs)
{
return lhs.m_data == rhs.m_data;
}
inline bool
-operator != (const Time &lhs, const Time &rhs)
+operator != (const Time & lhs, const Time & rhs)
{
return lhs.m_data != rhs.m_data;
}
inline bool
-operator <= (const Time &lhs, const Time &rhs)
+operator <= (const Time & lhs, const Time & rhs)
{
return lhs.m_data <= rhs.m_data;
}
inline bool
-operator >= (const Time &lhs, const Time &rhs)
+operator >= (const Time & lhs, const Time & rhs)
{
return lhs.m_data >= rhs.m_data;
}
inline bool
-operator < (const Time &lhs, const Time &rhs)
+operator < (const Time & lhs, const Time & rhs)
{
return lhs.m_data < rhs.m_data;
}
inline bool
-operator > (const Time &lhs, const Time &rhs)
+operator > (const Time & lhs, const Time & rhs)
{
return lhs.m_data > rhs.m_data;
}
-inline Time operator + (const Time &lhs, const Time &rhs)
+inline Time operator + (const Time & lhs, const Time & rhs)
{
return Time (lhs.m_data + rhs.m_data);
}
-inline Time operator - (const Time &lhs, const Time &rhs)
+inline Time operator - (const Time & lhs, const Time & rhs)
{
return Time (lhs.m_data - rhs.m_data);
}
inline Time
-operator * (const Time &lhs, const int64_t &rhs)
+operator * (const Time & lhs, const int64_t & rhs)
{
Time res = lhs;
res.m_data *= rhs;
return res;
}
inline Time
-operator * (const int64_t &lhs, const Time &rhs)
+operator * (const int64_t & lhs, const Time & rhs)
{
Time res = rhs;
res.m_data *= lhs;
return res;
}
inline int64_t
-operator / (const Time &lhs, const Time &rhs)
+operator / (const Time & lhs, const Time & rhs)
{
int64_t res = lhs.m_data / rhs.m_data;
return res;
}
inline Time
-operator / (const Time &lhs, const int64_t &rhs)
+operator / (const Time & lhs, const int64_t & rhs)
{
Time res = lhs;
res.m_data /= rhs;
return res;
}
-inline Time &operator += (Time &lhs, const Time &rhs)
+inline Time & operator += (Time & lhs, const Time & rhs)
{
lhs.m_data += rhs.m_data;
return lhs;
}
-inline Time &operator -= (Time &lhs, const Time &rhs)
+inline Time & operator -= (Time & lhs, const Time & rhs)
{
lhs.m_data -= rhs.m_data;
return lhs;
}
/**
- * \relates ns3::TimeUnit
- * Absolute value function for Time
- * \param time the input value
- * \returns the absolute value of the input value.
- */
-inline Time Abs (const Time &time)
-{
- return Time ((time.m_data < 0) ? -time.m_data : time.m_data);
-}
-/**
- * \relates ns3::TimeUnit
+ * Max function for Time.
* \param ta the first value
* \param tb the seconds value
* \returns the max of the two input values.
*/
-inline Time Max (const Time &ta, const Time &tb)
+inline Time Max (const Time & ta, const Time & tb)
{
return Time ((ta.m_data < tb.m_data) ? tb : ta);
}
/**
+ * Min function for Time.
* \param ta the first value
* \param tb the seconds value
* \returns the min of the two input values.
*/
-inline Time Min (const Time &ta, const Time &tb)
+inline Time Min (const Time & ta, const Time & tb)
{
return Time ((ta.m_data > tb.m_data) ? tb : ta);
}
+/**
+ * Absolute value function for Time
+ * \param time the input value
+ * \returns the absolute value of the input value.
+ */
+inline Time Abs (const Time & time)
+{
+ return Time ((time.m_data < 0) ? -time.m_data : time.m_data);
+}
/**
* \brief Time output streamer.
@@ -737,16 +733,16 @@
* - `left`
* The stream `width` and `precision` are ignored; Time output always
* includes ".0".
- * \relates ns3::Time
+ * \relates Time
*/
-std::ostream& operator<< (std::ostream& os, const Time & time);
+std::ostream & operator<< (std::ostream & os, const Time & time);
/**
* \brief Time input streamer
*
* Uses the Time::Time (const std::string &) constructor
- * \relates ns3::Time
+ * \relates Time
*/
-std::istream& operator>> (std::istream& is, Time & time);
+std::istream & operator>> (std::istream & is, Time & time);
/**
* \brief create ns3::Time instances in units of seconds.
@@ -757,7 +753,7 @@
* Simulator::Schedule (Seconds (5.0), ...);
* \endcode
* \param seconds seconds value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Seconds (double seconds)
{
@@ -773,7 +769,7 @@
* Simulator::Schedule (MilliSeconds (5), ...);
* \endcode
* \param ms milliseconds value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time MilliSeconds (uint64_t ms)
{
@@ -788,7 +784,7 @@
* Simulator::Schedule (MicroSeconds (5), ...);
* \endcode
* \param us microseconds value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time MicroSeconds (uint64_t us)
{
@@ -803,7 +799,7 @@
* Simulator::Schedule (NanoSeconds (5), ...);
* \endcode
* \param ns nanoseconds value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time NanoSeconds (uint64_t ns)
{
@@ -818,7 +814,7 @@
* Simulator::Schedule (PicoSeconds (5), ...);
* \endcode
* \param ps picoseconds value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time PicoSeconds (uint64_t ps)
{
@@ -833,7 +829,7 @@
* Simulator::Schedule (FemtoSeconds (5), ...);
* \endcode
* \param fs femtoseconds value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time FemtoSeconds (uint64_t fs)
{
@@ -848,7 +844,7 @@
* Simulator::Schedule (Minutes (5.0), ...);
* \endcode
* \param minutes mintues value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Minutes (double minutes)
{
@@ -863,7 +859,7 @@
* Simulator::Schedule (Hours (5.0), ...);
* \endcode
* \param hours hours value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Hours (double hours)
{
@@ -878,7 +874,7 @@
* Simulator::Schedule (Days (5.0), ...);
* \endcode
* \param days days value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Days (double days)
{
@@ -893,7 +889,7 @@
* Simulator::Schedule (Years (5.0), ...);
* \endcode
* \param years years value
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Years (double years)
{
@@ -902,7 +898,7 @@
/**
* \see Seconds(double)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Seconds (int64x64_t seconds)
{
@@ -910,7 +906,7 @@
}
/**
* \see MilliSeconds(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time MilliSeconds (int64x64_t ms)
{
@@ -918,7 +914,7 @@
}
/**
* \see MicroSeconds(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time MicroSeconds (int64x64_t us)
{
@@ -926,7 +922,7 @@
}
/**
* \see NanoSeconds(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time NanoSeconds (int64x64_t ns)
{
@@ -934,7 +930,7 @@
}
/**
* \see PicoSeconds(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time PicoSeconds (int64x64_t ps)
{
@@ -942,7 +938,7 @@
}
/**
* \see FemtoSeconds(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time FemtoSeconds (int64x64_t fs)
{
@@ -950,7 +946,7 @@
}
/**
* \see Minutes(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Minutes (int64x64_t minutes)
{
@@ -958,7 +954,7 @@
}
/**
* \see Minutes(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Hours (int64x64_t hours)
{
@@ -966,7 +962,7 @@
}
/**
* \see Minutes(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Days (int64x64_t days)
{
@@ -974,7 +970,7 @@
}
/**
* \see Minutes(uint64_t)
- * \relates ns3::Time
+ * \relates Time
*/
inline Time Years (int64x64_t years)
{
--- a/src/core/model/object.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/object.h Mon Mar 10 10:57:50 2014 -0700
@@ -46,6 +46,7 @@
/**
* \ingroup core
* \defgroup object Object
+ * \brief Base classes which provides memory management and object aggregation.
*/
/**
* \ingroup object
--- a/src/core/model/ptr.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/ptr.h Mon Mar 10 10:57:50 2014 -0700
@@ -30,6 +30,7 @@
/**
* \ingroup core
* \defgroup ptr Smart Pointer
+ * \brief Heap memory management.
*/
/**
* \ingroup ptr
--- a/src/core/model/random-variable.cc Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/random-variable.cc Mon Mar 10 10:57:50 2014 -0700
@@ -1361,7 +1361,7 @@
* \brief Constructor
*
* Creates a generator that returns successive elements of the d array
- * on successive calls to ::Value(). Note that the d pointer is copied
+ * on successive calls to GetValue(). Note that the d pointer is copied
* for use by the generator (shallow-copy), not its contents, so the
* contents of the array d points to have to remain unchanged for the use
* of DeterministicVariableImpl to be meaningful.
@@ -1860,7 +1860,7 @@
ZipfVariableImpl (long n, double alpha);
/**
- * \A zipf variable with N=1 and alpha=0
+ * A zipf variable with N=1 and alpha=0
*/
ZipfVariableImpl ();
@@ -1952,7 +1952,7 @@
ZetaVariableImpl (double alpha);
/**
- * \A zipf variable with alpha=1.1
+ * A zipf variable with alpha=1.1
*/
ZetaVariableImpl ();
--- a/src/core/model/scheduler.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/scheduler.h Mon Mar 10 10:57:50 2014 -0700
@@ -31,6 +31,7 @@
/**
* \ingroup core
* \defgroup scheduler Scheduler and Events
+ * \brief Manage the event list by creating and scheduling events.
*/
/**
* \ingroup scheduler
--- a/src/core/model/simulator.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/simulator.h Mon Mar 10 10:57:50 2014 -0700
@@ -40,6 +40,7 @@
/**
* \ingroup core
* \defgroup simulator Simulator
+ * \brief Control the virtual time and the execution of simulation events.
*/
/**
* \ingroup simulator
--- a/src/core/model/string.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/string.h Mon Mar 10 10:57:50 2014 -0700
@@ -7,7 +7,7 @@
namespace ns3 {
/**
- * \ingroup AttributeList
+ * \ingroup attribute
*
* \class ns3::StringValue
* \brief hold variables of type string
--- a/src/core/model/test.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/test.h Mon Mar 10 10:57:50 2014 -0700
@@ -31,6 +31,12 @@
#include "system-wall-clock-ms.h"
#include "deprecated.h"
+/**
+ * \ingroup core
+ * \defgroup testing Testing
+ * \brief Tools to define and execute unit tests.
+ */
+
//
// Note on below macros:
//
@@ -42,9 +48,9 @@
//
/**
+ * \ingroup testing
+ * \brief Check if we should assert on errors, and do so
* \internal
- *
- * Check if we should assert on errors, and do so
*/
#define ASSERT_ON_FAILURE \
do { \
@@ -55,9 +61,9 @@
} while (false)
/**
+ * \ingroup testing
+ * \brief If we shouldn't continue on errors, return
* \internal
- *
- * If we shouldn't continue on errors, return
*/
#define CONTINUE_ON_FAILURE \
do { \
@@ -68,9 +74,9 @@
} while (false)
/**
+ * \ingroup testing
+ * \brief If we shouldn't continue on errors, return test status
* \internal
- *
- * If we shouldn't continue on errors, return test status
*/
#define CONTINUE_ON_FAILURE_RETURNS_BOOL \
do { \
@@ -87,6 +93,9 @@
// ===========================================================================
/**
+ * \ingroup testing
+ * \brief Test that an actual and expected (limit) value are equal and report
+ * and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_EQ_INTERNAL(actual, limit, msg, file, line) \
@@ -109,6 +118,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual and expected (limit) value are equal and report
* and abort if not.
*
@@ -138,6 +149,9 @@
NS_TEST_ASSERT_MSG_EQ_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
+ * \ingroup testing
+ * \brief Test that an actual and expected (limit) value are equal and report
+ * and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL_INTERNAL(actual, limit, msg, file, line) \
@@ -160,6 +174,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual and expected (limit) value are equal and report
* and abort if not.
*
@@ -192,10 +208,13 @@
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
- * \internal
+ * \ingroup testing
+ * \brief Test that an actual and expected (limit) value are equal and report
+ * if not.
*
* Required to avoid use of return statement which allows use in methods
* (esp. callbacks) returning void.
+ * \internal
*/
#define NS_TEST_EXPECT_MSG_EQ_INTERNAL(actual, limit, msg, file, line) \
do { \
@@ -216,6 +235,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual and expected (limit) value are equal and report
* if not.
*
@@ -250,6 +271,9 @@
// ===========================================================================
/**
+ * \ingroup testing
+ * \brief Test that actual and expected (limit) values are equal to plus
+ * or minus some tolerance and report and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_EQ_TOL_INTERNAL(actual, limit, tol, msg, file, line) \
@@ -276,18 +300,21 @@
} while (false)
/**
- * \brief Test that actual and expected (limit) values are equal to plus or minus
- * some tolerance and report and abort if not.
+ * \ingroup testing
+ *
+ * \brief Test that actual and expected (limit) values are equal to plus
+ * or minus some tolerance and report and abort if not.
*
* Check to see if the expected (limit) value is equal to the actual value found
* in a test case to some tolerance. This is not the same thing as asking if
* two floating point are equal to within some epsilon, but is useful for that
- * case. This assertion is geared toward more of a measurement problem. Consider
- * measuring a physical rod of some kind that you have ordered. You need to
- * determine if it is "good." You won't measure the rod to an arbitrary precision
- * of sixteen significant figures, you will measure the rod to determine if its
- * length is within the tolerances you provided. For example, 12.00 inches plus
- * or minus .005 inch may be just fine.
+ * case. This assertion is geared toward more of a measurement problem.
+ * Consider measuring a physical rod of some kind that you have ordered.
+ * You need to determine if it is "good." You want to measure the rod
+ * to an arbitrary precision of sixteen significant figures, you will
+ * measure the rod to determine if its length is within the tolerances
+ * you provided. For example, 12.00 inches plus or minus .005 inch
+ * may be just fine.
*
* In ns-3, you might want to measure a signal to noise ratio and check to see
* if the answer is what you expect. If you naively measure (double)1128.93 and
@@ -297,18 +324,18 @@
* probably quickly find that is not what you want either. It may turn out to
* be the case that when you measured an snr that printed as 1128.93, what was
* actually measured was something more like 1128.9287653857625442 for example.
- * Given that the double epsilon is on the order of 0.0000000000000009, you would
- * need to provide sixteen significant figures of expected value for this kind of
- * test to pass even with a typical test for floating point "approximate equality."
- * That is clearly not required or desired. You really want to be able to provide
- * 1128.93 along with a tolerance just like you provided 12 inches +- 0.005 inch
- * above.
+ * Given that the double epsilon is on the order of 0.0000000000000009,
+ * you would need to provide sixteen significant figures of expected value
+ * for this kind of test to pass even with a typical test for floating point
+ * "approximate equality." That is clearly not required or desired.
+ * You really want to be able to provide 1128.93 along with a tolerance
+ * just like you provided 12 inches +- 0.005 inch above.
*
* This assertion is designed for real measurements by taking into account
* measurement tolerances. By doing so it also automatically compensates for
* floating point rounding errors. If you really want to check floating point
- * equality down to the numeric_limits<double>::epsilon () range, consider using
- * ns3::TestDoubleIsEqual().
+ * equality down to the numeric_limits<double>::epsilon () range, consider
+ * using ns3::TestDoubleIsEqual().
*
* \note Mixing signed and unsigned types can lead to misleading results.
*
@@ -329,6 +356,9 @@
NS_TEST_ASSERT_MSG_EQ_TOL_INTERNAL (actual, limit, tol, msg, __FILE__, __LINE__)
/**
+ * \ingroup testing
+ * \brief Test that actual and expected (limit) values are equal to plus
+ * or minus some tolerance and report and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL_INTERNAL(actual, limit, tol, msg, file, line) \
@@ -355,18 +385,21 @@
} while (false)
/**
- * \brief Test that actual and expected (limit) values are equal to plus or minus
- * some tolerance and report and abort if not.
+ * \ingroup testing
+ *
+ * \brief Test that actual and expected (limit) values are equal to plus
+ * or minus some tolerance and report and abort if not.
*
* Check to see if the expected (limit) value is equal to the actual value found
* in a test case to some tolerance. This is not the same thing as asking if
* two floating point are equal to within some epsilon, but is useful for that
- * case. This assertion is geared toward more of a measurement problem. Consider
- * measuring a physical rod of some kind that you have ordered. You need to
- * determine if it is "good." You won't measure the rod to an arbitrary precision
- * of sixteen significant figures, you will measure the rod to determine if its
- * length is within the tolerances you provided. For example, 12.00 inches plus
- * or minus .005 inch may be just fine.
+ * case. This assertion is geared toward more of a measurement problem.
+ * Consider measuring a physical rod of some kind that you have ordered.
+ * You need to determine if it is "good." You want to measure the rod
+ * to an arbitrary precision of sixteen significant figures, you will
+ * measure the rod to determine if its length is within the tolerances
+ * you provided. For example, 12.00 inches plus or minus .005 inch
+ * may be just fine.
*
* In ns-3, you might want to measure a signal to noise ratio and check to see
* if the answer is what you expect. If you naively measure (double)1128.93 and
@@ -376,18 +409,18 @@
* probably quickly find that is not what you want either. It may turn out to
* be the case that when you measured an snr that printed as 1128.93, what was
* actually measured was something more like 1128.9287653857625442 for example.
- * Given that the double epsilon is on the order of 0.0000000000000009, you would
- * need to provide sixteen significant figures of expected value for this kind of
- * test to pass even with a typical test for floating point "approximate equality."
- * That is clearly not required or desired. You really want to be able to provide
- * 1128.93 along with a tolerance just like you provided 12 inches +- 0.005 inch
- * above.
+ * Given that the double epsilon is on the order of 0.0000000000000009,
+ * you would need to provide sixteen significant figures of expected value
+ * for this kind of test to pass even with a typical test for floating point
+ * "approximate equality." That is clearly not required or desired.
+ * You really want to be able to provide 1128.93 along with a tolerance
+ * just like you provided 12 inches +- 0.005 inch above.
*
* This assertion is designed for real measurements by taking into account
* measurement tolerances. By doing so it also automatically compensates for
* floating point rounding errors. If you really want to check floating point
- * equality down to the numeric_limits<double>::epsilon () range, consider using
- * ns3::TestDoubleIsEqual().
+ * equality down to the numeric_limits<double>::epsilon () range,
+ * consider using ns3::TestDoubleIsEqual().
*
* \note Mixing signed and unsigned types can lead to misleading results.
*
@@ -411,10 +444,13 @@
NS_TEST_ASSERT_MSG_EQ_TOL_RETURNS_BOOL_INTERNAL (actual, limit, tol, msg, __FILE__, __LINE__)
/**
- * \internal
+ * \ingroup testing
+ * \brief Test that actual and expected (limit) values are equal to plus or minus
+ * some tolerance and report if not.
*
* Required to avoid use of return statement which allows use in methods
* (esp. callbacks) returning void.
+ * \internal
*/
#define NS_TEST_EXPECT_MSG_EQ_TOL_INTERNAL(actual, limit, tol, msg, file, line) \
do { \
@@ -439,17 +475,20 @@
} while (false)
/**
- * \brief Test that actual and expected (limit) values are equal to plus or minus
- * some tolerance and report if not.
+ * \ingroup testing
+ *
+ * \brief Test that actual and expected (limit) values are equal to plus
+ * or minus some tolerance and report if not.
*
* Check to see if the expected (limit) value is equal to the actual value found
* in a test case to some tolerance. This is not the same thing as asking if
* two floating point are equal to within some epsilon, but is useful for that
- * case. This assertion is geared toward more of a measurement problem. Consider
- * measuring a physical rod of some kind that you have ordered. You need to
- * determine if it is "good." You won't measure the rod to an arbitrary precision
- * of sixteen significant figures, you will measure the rod to determine if its
- * length is within the tolerances you provided. For example, 12.00 inches plus
+ * case. This assertion is geared toward more of a measurement problem.
+ * Consider measuring a physical rod of some kind that you have ordered.
+ * You need to determine if it is "good." You want to measure the rod
+ * to an arbitrary precision of sixteen significant figures,
+ * you will measure the rod to determine if its length is within
+ * the tolerances you provided. For example, 12.00 inches plus
* or minus .005 inch may be just fine.
*
* In ns-3, you might want to measure a signal to noise ratio and check to see
@@ -460,18 +499,18 @@
* probably quickly find that is not what you want either. It may turn out to
* be the case that when you measured an snr that printed as 1128.93, what was
* actually measured was something more like 1128.9287653857625442 for example.
- * Given that the double epsilon is on the order of 0.0000000000000009, you would
- * need to provide sixteen significant figures of expected value for this kind of
- * test to pass even with a typical test for floating point "approximate equality."
- * That is clearly not required or desired. You really want to be able to provide
- * 1128.93 along with a tolerance just like you provided 12 inches +- 0.005 inch
- * above.
+ * Given that the double epsilon is on the order of 0.0000000000000009,
+ * you would need to provide sixteen significant figures of expected value
+ * for this kind of test to pass even with a typical test for floating point
+ * "approximate equality." That is clearly not required or desired.
+ * You really want to be able to provide 1128.93 along with a tolerance
+ * just like you provided 12 inches +- 0.005 inch above.
*
* This assertion is designed for real measurements by taking into account
* measurement tolerances. By doing so it also automatically compensates for
* floating point rounding errors. If you really want to check floating point
- * equality down to the numeric_limits<double>::epsilon () range, consider using
- * ns3::TestDoubleIsEqual().
+ * equality down to the numeric_limits<double>::epsilon () range,
+ * consider using ns3::TestDoubleIsEqual().
*
* \note Mixing signed and unsigned types can lead to misleading results.
*
@@ -496,6 +535,9 @@
// ===========================================================================
/**
+ * \ingroup testing
+ * \brief Test that an actual and expected (limit) value are not equal and
+ * report and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_NE_INTERNAL(actual, limit, msg, file, line) \
@@ -518,6 +560,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual and expected (limit) value are not equal and
* report and abort if not.
*
@@ -546,6 +590,9 @@
NS_TEST_ASSERT_MSG_NE_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
+ * \ingroup testing
+ * \brief Test that an actual and expected (limit) value are not equal and
+ * report and abort if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_NE_RETURNS_BOOL_INTERNAL(actual, limit, msg, file, line) \
@@ -568,6 +615,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual and expected (limit) value are not equal and
* report and abort if not.
*
@@ -599,10 +648,13 @@
NS_TEST_ASSERT_MSG_NE_RETURNS_BOOL_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
- * \internal
+ * \ingroup testing
+ * \brief Test that an actual and expected (limit) value are not equal and
+ * report if not.
*
* Required to avoid use of return statement which allows use in methods
* (callbacks) returning void.
+ * \internal
*/
#define NS_TEST_EXPECT_MSG_NE_INTERNAL(actual, limit, msg, file, line) \
do { \
@@ -623,6 +675,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual and expected (limit) value are not equal and
* report if not.
*
@@ -655,6 +709,9 @@
// ===========================================================================
/**
+ * \ingroup testing
+ * \brief Test that an actual value is less than a limit and report and abort
+ * if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_LT_INTERNAL(actual, limit, msg, file, line) \
@@ -677,6 +734,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual value is less than a limit and report and abort
* if not.
*
@@ -695,10 +754,12 @@
NS_TEST_ASSERT_MSG_LT_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
- * \internal
+ * \ingroup testing
+ * \brief Test that an actual value is less than a limit and report if not.
*
* Required to avoid use of return statement which allows use in methods
* (callbacks) returning void.
+ * \internal
*/
#define NS_TEST_EXPECT_MSG_LT_INTERNAL(actual, limit, msg, file, line) \
do { \
@@ -719,6 +780,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual value is less than a limit and report if not.
*
* Check to see if the actual value found in a test case is less than the
@@ -740,6 +803,9 @@
// ===========================================================================
/**
+ * \ingroup testing
+ * \brief Test that an actual value is greater than a limit and report and abort
+ * if not.
* \internal
*/
#define NS_TEST_ASSERT_MSG_GT_INTERNAL(actual, limit, msg, file, line) \
@@ -762,6 +828,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual value is greater than a limit and report and abort
* if not.
*
@@ -780,10 +848,12 @@
NS_TEST_ASSERT_MSG_GT_INTERNAL (actual, limit, msg, __FILE__, __LINE__)
/**
- * \internal
+ * \ingroup testing
+ * \brief Test that an actual value is greater than a limit and report if not.
*
* Required to avoid use of return statement which allows use in methods
* (callbacks) returning void.
+ * \internal
*/
#define NS_TEST_EXPECT_MSG_GT_INTERNAL(actual, limit, msg, file, line) \
do { \
@@ -804,6 +874,8 @@
} while (false)
/**
+ * \ingroup testing
+ *
* \brief Test that an actual value is greater than a limit and report if not.
*
* Check to see if the actual value found in a test case is greater than the
@@ -846,6 +918,8 @@
class TestRunnerImpl;
/**
+ * \ingroup testing
+ *
* \brief encapsulates test code
*
* To allow a new test to be run within the ns-3 test framework, users
@@ -931,44 +1005,40 @@
* \return a pointer to the parent of this test
*/
TestCase * GetParent () const;
-
- // The methods below are used only by test macros and should not
- // be used by normal users.
/**
+ * @{
* \internal
- *
+ * The methods below are used only by test macros and should not
+ * be used by normal users.
+ */
+ /**
* Log the failure of this TestCase.
*/
void ReportTestFailure (std::string cond, std::string actual,
std::string limit, std::string message,
std::string file, int32_t line);
/**
- * \internal
- *
* \return should we assert on failure, per the TestSuite configuration
*/
bool MustAssertOnFailure (void) const;
/**
- * \internal
- *
* \return should we continue on failure, per the TestSuite configuration
*/
bool MustContinueOnFailure (void) const;
/**
- * \internal
* \param filename the bare (no path) file name
* \return the full path to filename in the data directory
*/
std::string CreateDataDirFilename (std::string filename);
/**
- * \internal
* \param filename the bare (no path) file name
* \return the full path to filename in the temporary directory.
* If the TestRunner is invoked with "--update-data", this will be
* the data directory instead.
*/
std::string CreateTempDirFilename (std::string filename);
+ /**@}*/
private:
friend class TestRunnerImpl;
@@ -994,26 +1064,23 @@
*/
virtual void DoTeardown (void);
- // forbid copying objects
/**
- * \internal
* Private, to block copying
*/
TestCase (TestCase& tc);
/**
- * \internal
* Private, to block copying
*/
TestCase& operator= (TestCase& tc);
// methods called by TestRunnerImpl
/**
- * \internal
* Actually run this TestCase
+ *
+ * \param runner The test runner implementation.
*/
void Run (TestRunnerImpl *runner);
/**
- * \internal
* \return the failure status of this TestCase and all it's children
*/
bool IsFailed (void) const;
@@ -1031,6 +1098,8 @@
};
/**
+ * \ingroup testing
+ *
* \brief A suite of tests to run.
*/
class TestSuite : public TestCase
@@ -1072,6 +1141,8 @@
};
/**
+ * \ingroup testing
+ *
* \brief A runner to execute tests.
*/
class TestRunner
@@ -1080,14 +1151,16 @@
/**
* Run the requested suite of tests.
*
- * \param list of command line arguments
- * \param argc number of elements in argv
+ * \param argc number of elements in \pname{argv}
+ * \param argv vector of command line arguments
* \returns success status
*/
static int Run (int argc, char *argv[]);
};
/**
+ * \ingroup testing
+ *
* \brief A simple way to store test vectors (for stimulus or from responses)
*/
template <typename T>
--- a/src/core/model/time.cc Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/time.cc Mon Mar 10 10:57:50 2014 -0700
@@ -41,6 +41,7 @@
Time::MarkedTimes * Time::g_markingTimes = 0;
/**
+ * \internal
* Get mutex for critical sections around modification of Time::g_markingTimes
*
* \relates Time
--- a/src/core/model/traced-value.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/traced-value.h Mon Mar 10 10:57:50 2014 -0700
@@ -34,6 +34,8 @@
/**
* \ingroup core
* \defgroup tracing Tracing
+ * \brief Publish/subscribe tools to collect and report changes to any
+ * values used by the various model components.
*/
/**
--- a/src/core/model/wall-clock-synchronizer.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/model/wall-clock-synchronizer.h Mon Mar 10 10:57:50 2014 -0700
@@ -157,8 +157,9 @@
* real-time-clock-specific work of waiting (either busy-waiting or sleeping,
* or some combination) until the requested simulation time.
*
- * @param ns The simulation time we need to wait for (normalized to nanosecond
- * units).
+ * @param nsCurrent The current simulation time.
+ * @param nsDelay The simulation time of the next event (in nanosecond units).
+ *
* @see TimeStepPrecision::Get
*/
virtual bool DoSynchronize (uint64_t nsCurrent, uint64_t nsDelay);
--- a/src/core/test/ptr-test-suite.cc Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/test/ptr-test-suite.cc Mon Mar 10 10:57:50 2014 -0700
@@ -25,18 +25,18 @@
class PtrTestCase;
-class Base
+class PtrTestBase
{
public:
- Base ();
- virtual ~Base ();
+ PtrTestBase ();
+ virtual ~PtrTestBase ();
void Ref (void) const;
void Unref (void) const;
private:
mutable uint32_t m_count;
};
-class NoCount : public Base
+class NoCount : public PtrTestBase
{
public:
NoCount (PtrTestCase *test);
@@ -60,20 +60,20 @@
};
-Base::Base ()
+PtrTestBase::PtrTestBase ()
: m_count (1)
{
}
-Base::~Base ()
+PtrTestBase::~PtrTestBase ()
{
}
void
-Base::Ref (void) const
+PtrTestBase::Ref (void) const
{
m_count++;
}
void
-Base::Unref (void) const
+PtrTestBase::Unref (void) const
{
m_count--;
if (m_count == 0)
@@ -256,7 +256,7 @@
NS_TEST_EXPECT_MSG_EQ (m_nDestroyed, 1, "013");
{
- Ptr<Base> p0 = Create<NoCount> (this);
+ Ptr<PtrTestBase> p0 = Create<NoCount> (this);
Ptr<NoCount> p1 = Create<NoCount> (this);
NS_TEST_EXPECT_MSG_EQ ((p0 == p1), false, "operator == failed");
NS_TEST_EXPECT_MSG_EQ ((p0 != p1), true, "operator != failed");
--- a/src/core/test/simulator-test-suite.cc Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/test/simulator-test-suite.cc Mon Mar 10 10:57:50 2014 -0700
@@ -31,11 +31,11 @@
public:
SimulatorEventsTestCase (ObjectFactory schedulerFactory);
virtual void DoRun (void);
- void A (int a);
- void B (int b);
- void C (int c);
- void D (int d);
- void foo0 (void);
+ void EventA (int a);
+ void EventB (int b);
+ void EventC (int c);
+ void EventD (int d);
+ void Eventfoo0 (void);
uint64_t NowUs (void);
void destroy (void);
bool m_b;
@@ -62,13 +62,13 @@
}
void
-SimulatorEventsTestCase::A (int a)
+SimulatorEventsTestCase::EventA (int a)
{
m_a = false;
}
void
-SimulatorEventsTestCase::B (int b)
+SimulatorEventsTestCase::EventB (int b)
{
if (b != 2 || NowUs () != 11)
{
@@ -79,17 +79,17 @@
m_b = true;
}
Simulator::Remove (m_idC);
- Simulator::Schedule (MicroSeconds (10), &SimulatorEventsTestCase::D, this, 4);
+ Simulator::Schedule (MicroSeconds (10), &SimulatorEventsTestCase::EventD, this, 4);
}
void
-SimulatorEventsTestCase::C (int c)
+SimulatorEventsTestCase::EventC (int c)
{
m_c = false;
}
void
-SimulatorEventsTestCase::D (int d)
+SimulatorEventsTestCase::EventD (int d)
{
if (d != 4 || NowUs () != (11+10))
{
@@ -102,7 +102,7 @@
}
void
-SimulatorEventsTestCase::foo0 (void)
+SimulatorEventsTestCase::Eventfoo0 (void)
{}
void
@@ -123,9 +123,9 @@
Simulator::SetScheduler (m_schedulerFactory);
- EventId a = Simulator::Schedule (MicroSeconds (10), &SimulatorEventsTestCase::A, this, 1);
- Simulator::Schedule (MicroSeconds (11), &SimulatorEventsTestCase::B, this, 2);
- m_idC = Simulator::Schedule (MicroSeconds (12), &SimulatorEventsTestCase::C, this, 3);
+ EventId a = Simulator::Schedule (MicroSeconds (10), &SimulatorEventsTestCase::EventA, this, 1);
+ Simulator::Schedule (MicroSeconds (11), &SimulatorEventsTestCase::EventB, this, 2);
+ m_idC = Simulator::Schedule (MicroSeconds (12), &SimulatorEventsTestCase::EventC, this, 3);
NS_TEST_EXPECT_MSG_EQ (!m_idC.IsExpired (), true, "");
NS_TEST_EXPECT_MSG_EQ (!a.IsExpired (), true, "");
@@ -137,7 +137,7 @@
NS_TEST_EXPECT_MSG_EQ (m_c, true, "Event C did not run ?");
NS_TEST_EXPECT_MSG_EQ (m_d, true, "Event D did not run ?");
- EventId anId = Simulator::ScheduleNow (&SimulatorEventsTestCase::foo0, this);
+ EventId anId = Simulator::ScheduleNow (&SimulatorEventsTestCase::Eventfoo0, this);
EventId anotherId = anId;
NS_TEST_EXPECT_MSG_EQ (!(anId.IsExpired () || anotherId.IsExpired ()), true, "Event should not have expired yet.");
--- a/src/core/test/threaded-test-suite.cc Wed Mar 05 17:08:10 2014 -0800
+++ b/src/core/test/threaded-test-suite.cc Mon Mar 10 10:57:50 2014 -0700
@@ -39,10 +39,10 @@
{
public:
ThreadedSimulatorEventsTestCase (ObjectFactory schedulerFactory, const std::string &simulatorType, unsigned int threads);
- void A (int a);
- void B (int b);
- void C (int c);
- void D (int d);
+ void EventA (int a);
+ void EventB (int b);
+ void EventC (int c);
+ void EventD (int d);
void DoNothing (unsigned int threadno);
static void SchedulingThread (std::pair<ThreadedSimulatorEventsTestCase *, unsigned int> context);
void End (void);
@@ -113,7 +113,7 @@
m_threadWaiting[threadno] = false;
}
void
-ThreadedSimulatorEventsTestCase::A (int a)
+ThreadedSimulatorEventsTestCase::EventA (int a)
{
if (m_a != m_b || m_a != m_c || m_a != m_d)
{
@@ -122,11 +122,11 @@
};
++m_a;
Simulator::Schedule (MicroSeconds (10),
- &ThreadedSimulatorEventsTestCase::B, this, a+1);
+ &ThreadedSimulatorEventsTestCase::EventB, this, a+1);
}
void
-ThreadedSimulatorEventsTestCase::B (int b)
+ThreadedSimulatorEventsTestCase::EventB (int b)
{
if (m_a != (m_b+1) || m_a != (m_c+1) || m_a != (m_d+1))
{
@@ -135,11 +135,11 @@
};
++m_b;
Simulator::Schedule (MicroSeconds (10),
- &ThreadedSimulatorEventsTestCase::C, this, b+1);
+ &ThreadedSimulatorEventsTestCase::EventC, this, b+1);
}
void
-ThreadedSimulatorEventsTestCase::C (int c)
+ThreadedSimulatorEventsTestCase::EventC (int c)
{
if (m_a != m_b || m_a != (m_c+1) || m_a != (m_d+1))
{
@@ -148,11 +148,11 @@
};
++m_c;
Simulator::Schedule (MicroSeconds (10),
- &ThreadedSimulatorEventsTestCase::D, this, c+1);
+ &ThreadedSimulatorEventsTestCase::EventD, this, c+1);
}
void
-ThreadedSimulatorEventsTestCase::D (int d)
+ThreadedSimulatorEventsTestCase::EventD (int d)
{
if (m_a != m_b || m_a != m_c || m_a != (m_d+1))
{
@@ -167,7 +167,7 @@
else
{
Simulator::Schedule (MicroSeconds (10),
- &ThreadedSimulatorEventsTestCase::A, this, d+1);
+ &ThreadedSimulatorEventsTestCase::EventA, this, d+1);
}
}
@@ -207,7 +207,7 @@
m_stop = false;
Simulator::SetScheduler (m_schedulerFactory);
- Simulator::Schedule (MicroSeconds (10), &ThreadedSimulatorEventsTestCase::A, this, 1);
+ Simulator::Schedule (MicroSeconds (10), &ThreadedSimulatorEventsTestCase::EventA, this, 1);
Simulator::Schedule (Seconds (1), &ThreadedSimulatorEventsTestCase::End, this);
--- a/src/flow-monitor/model/flow-classifier.h Wed Mar 05 17:08:10 2014 -0800
+++ b/src/flow-monitor/model/flow-classifier.h Mon Mar 10 10:57:50 2014 -0700
@@ -41,7 +41,7 @@
/// \ingroup flow-monitor
/// Provides a method to translate raw packet data into abstract
-/// ``flow identifier'' and ``packet identifier'' parameters. These
+/// `flow identifier` and `packet identifier` parameters. These
/// identifiers are unsigned 32-bit integers that uniquely identify a
/// flow and a packet within that flow, respectively, for the whole
/// simulation, regardless of the point in which the packet was
--- a/src/internet/test/ipv6-fragmentation-test.cc Wed Mar 05 17:08:10 2014 -0800
+++ b/src/internet/test/ipv6-fragmentation-test.cc Mon Mar 10 10:57:50 2014 -0700
@@ -18,8 +18,11 @@
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
*/
/**
+ * \file
+ *
* This is the test code for ipv6-l3protocol.cc (only the fragmentation and reassembly part).
*/
+
#define NS3_LOG_ENABLE 1
#include "ns3/test.h"
--- a/utils/print-introspected-doxygen.cc Wed Mar 05 17:08:10 2014 -0800
+++ b/utils/print-introspected-doxygen.cc Mon Mar 10 10:57:50 2014 -0700
@@ -27,12 +27,6 @@
std::string brief; ///< brief tag
std::string commentStart; ///< start of code comment
std::string commentStop; ///< end of code comment
- std::string defgroupAttributeListStart; ///< start of AttributeList group
- std::string defgroupAttributeListStop; ///< end of AttributeList group
- std::string defgroupGlobalValueListStart; ///< start of GlobalValueList group
- std::string defgroupGlobalValueListStop; ///< end of GlobalValueList group
- std::string defgroupTraceSourceListStart; ///< start of TraceSourceList group
- std::string defgroupTraceSourceListStop; ///< end of TraceSourceList group
std::string flagSpanStart; ///< start of Attribute flag value
std::string flagSpanStop; ///< end of Attribute flag value
std::string functionStart; ///< start of a class/function
@@ -40,7 +34,9 @@
std::string headingStart; ///< start of section heading (h3)
std::string headingStop; ///< end of section heading (h3)
std::string indentHtmlOnly; ///< small indent
- std::string ingroupConstructs; ///< add to constructs group
+ std::string pageAttributeList; ///< start Attributes list
+ std::string pageGlobalValueList; ///< start GlobalValue page
+ std::string pageTraceSourceList; ///< start Trace sources page
std::string listStart; ///< start unordered list
std::string listStop; ///< end unordered list
std::string listLineStart; ///< start unordered list item
@@ -68,9 +64,37 @@
&& (info.checker->GetUnderlyingTypeInformation () != "std::string")
)
{
- os << reference;
+ // Two indirect cases to handle
+ bool handled = false;
+
+ if (info.checker->GetValueTypeName () == "ns3::PointerValue")
+ {
+ const PointerChecker *ptrChecker = dynamic_cast<const PointerChecker *> (PeekPointer (info.checker));
+ if (ptrChecker != 0)
+ {
+ os << reference << "ns3::Ptr" << "< "
+ << reference << ptrChecker->GetPointeeTypeId ().GetName ()
+ << ">";
+ handled = true;
+ }
+ }
+ else if (info.checker->GetValueTypeName () == "ns3::ObjectPtrContainerValue")
+ {
+ const ObjectPtrContainerChecker * ptrChecker = dynamic_cast<const ObjectPtrContainerChecker *> (PeekPointer (info.checker));
+ if (ptrChecker != 0)
+ {
+ os << reference << "ns3::Ptr" << "< "
+ << reference << ptrChecker->GetItemTypeId ().GetName ()
+ << ">";
+ handled = true;
+ }
+ }
+ if (! handled)
+ {
+ os << reference << info.checker->GetUnderlyingTypeInformation ();
+ }
}
- os << info.checker->GetUnderlyingTypeInformation () << listLineStop << std::endl;
+ os << listLineStop << std::endl;
}
if (info.flags & TypeId::ATTR_CONSTRUCT && info.accessor->HasSetter ())
{
@@ -428,12 +452,6 @@
brief = "";
commentStart = "===============================================================\n";
commentStop = "";
- defgroupAttributeListStart = "";
- defgroupAttributeListStop = "\n";
- defgroupGlobalValueListStart = "";
- defgroupGlobalValueListStop = "";
- defgroupTraceSourceListStart = "";
- defgroupTraceSourceListStop = "\n";
flagSpanStart = "";
flagSpanStop = "";
functionStart = "";
@@ -441,7 +459,9 @@
headingStart = "";
headingStop = "";
indentHtmlOnly = "";
- ingroupConstructs = "";
+ pageAttributeList = "";
+ pageGlobalValueList = "";
+ pageTraceSourceList = "";
listStart = "";
listStop = "";
listLineStart = " * ";
@@ -458,14 +478,8 @@
breakHtmlOnly = "<br>";
breakTextOnly = "";
brief = "\\brief ";
- commentStart = "/*!";
- commentStop = "*/";
- defgroupAttributeListStart = "\\defgroup AttributeList ";
- defgroupAttributeListStop = "";
- defgroupGlobalValueListStart = "\\defgroup GlobalValueList ";
- defgroupGlobalValueListStop = "";
- defgroupTraceSourceListStart = "\\defgroup TraceSourceList ";
- defgroupTraceSourceListStop = "";
+ commentStart = "/*!\n";
+ commentStop = "*/\n";
flagSpanStart = "<span class=\"mlabel\">";
flagSpanStop = "</span>";
functionStart = "\\class ";
@@ -473,7 +487,9 @@
headingStart = "<h3>";
headingStop = "</h3>";
indentHtmlOnly = " ";
- ingroupConstructs = "\\ingroup constructs\n";
+ pageAttributeList = "\\page AttributesList ";
+ pageGlobalValueList = "\\page GlobalValueList ";
+ pageTraceSourceList = "\\page TraceSourceList ";
listStart = "<ul>";
listStop = "</ul>";
listLineStart = "<li>";
@@ -643,10 +659,10 @@
} // class documentation
- std::cout << commentStart << std::endl
- << ingroupConstructs
- << defgroupTraceSourceListStart << "The list of all trace sources."
- << defgroupTraceSourceListStop << std::endl;
+ std::cout << commentStart
+ << pageTraceSourceList << "All TraceSources\n"
+ << std::endl;
+
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
{
TypeId tid = TypeId::GetRegistered (i);
@@ -661,17 +677,19 @@
for (uint32_t j = 0; j < tid.GetTraceSourceN (); ++j)
{
struct TypeId::TraceSourceInformation info = tid.GetTraceSource(j);
- std::cout << listLineStart << info.name << ": " << info.help
+ std::cout << listLineStart
+ << boldStart << info.name << boldStop
+ << ": " << info.help
<< listLineStop << std::endl;
}
std::cout << listStop << std::endl;
}
std::cout << commentStop << std::endl;
- std::cout << commentStart << std::endl
- << ingroupConstructs
- << defgroupAttributeListStart << "The list of all attributes."
- << defgroupAttributeListStop << std::endl;
+ std::cout << commentStart
+ << pageAttributeList << "All Attributes\n"
+ << std::endl;
+
for (uint32_t i = 0; i < TypeId::GetRegisteredN (); ++i)
{
TypeId tid = TypeId::GetRegistered (i);
@@ -686,7 +704,9 @@
for (uint32_t j = 0; j < tid.GetAttributeN (); ++j)
{
struct TypeId::AttributeInformation info = tid.GetAttribute(j);
- std::cout << listLineStart << info.name << ": " << info.help
+ std::cout << listLineStart
+ << boldStart << info.name << boldStop
+ << ": " << info.help
<< listLineStop << std::endl;
}
std::cout << listStop << std::endl;
@@ -695,11 +715,11 @@
- std::cout << commentStart << std::endl
- << ingroupConstructs
- << defgroupGlobalValueListStart << "The list of all global values."
- << defgroupGlobalValueListStop << std::endl
- << listStart << std::endl;
+ std::cout << commentStart
+ << pageGlobalValueList << "All GlobalValues\n"
+ << std::endl
+ << listStart << std::endl;
+
for (GlobalValue::Iterator i = GlobalValue::Begin ();
i != GlobalValue::End ();
++i)