View | Details | Raw Unified | Return to bug 126
Collapse All | Expand All

(-)a/doc/doxygen.conf (-3 / +5 lines)
 Lines 493-502   WARN_LOGFILE = Link Here 
493
# directories like "/usr/src/myproject". Separate the files or directories 
493
# directories like "/usr/src/myproject". Separate the files or directories 
494
# with spaces.
494
# with spaces.
495
495
496
INPUT                  = src \
496
INPUT                  = doc/modules \
497
                         doc/main.txt \
497
                         doc/main.h \
498
                         doc/introspected-doxygen.h \
498
                         doc/introspected-doxygen.h \
499
                         doc/tracing.h 
499
                         doc/tracing.h \ 
500
                         doc/howtos/ \ 
501
                         src
500
502
501
# This tag can be used to specify the character encoding of the source files that 
503
# This tag can be used to specify the character encoding of the source files that 
502
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
504
# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
(-)9dda69de4ca7 (+38 lines)
Added Link Here 
1
/*!
2
\page callbacks Using ns-3 callbacks
3
\anchor howtos-callbacks
4
5
\section null_callbacks Null Callbacks
6
7
<b>Question:</b> The API I am using calls for using a callback (in the 
8
function signature), but I do not
9
want to provide one.  Is there a way to provide a null callback?
10
11
<b>Answer:</b> Use the ns3::MakeNullCallback construct:
12
\code
13
template<typename R>
14
Callback< R, T1, T2, T3, T4, T5, T6 > ns3::MakeNullCallback (void)
15
\endcode
16
17
Example usage:  The ns3::Socket class uses callbacks to indicate completion
18
of events such as a successful TCP connect().  These callbacks are set
19
in the following function:
20
\code
21
  void Socket::SetConnectCallback (Callback<void, Ptr<Socket> > connectionSucceeded,
22
                        Callback<void, Ptr<Socket> > connectionFailed,
23
                        Callback<void, Ptr<Socket> > halfClose);
24
25
\endcode
26
But suppose you do not care about registering a callback for the 
27
halfClose event (but you want to register one for the 
28
connectionSucceeded and connectionFailed cases).  In that case, you
29
can pass a null callback as the third argument.  You just need to
30
pass a callback with the matching signature, as follows:
31
\code
32
  localSocket->SetConnectCallback (
33
  MakeCallback (&ConnectionSucceededCallback),
34
  MakeCallback (&ConnectionFailedCallback),
35
  MakeNullCallback<void, Ptr<Socket> > () );
36
\endcode
37
38
*/
(-)9dda69de4ca7 (+17 lines)
Added Link Here 
1
/*!
2
\page howtos ns-3 HOWTOs
3
\anchor howtos-anchor
4
5
This is an organized set of frequently asked questions (FAQ) and HOWTOs
6
for ns-3.  This complements the following wiki pages:
7
8
- <a href="http://www.nsnam.org/wiki/index.php/User_FAQ">User FAQ</a>
9
- <a href="http://www.nsnam.org/wiki/index.php/Developer_FAQ">Developer FAQ</a>
10
11
Please consider contributing tips to either the wiki (yourself) or
12
by submitting a patch to this maintained documentation.
13
14
- \subpage callbacks
15
16
*/
17
(-)9dda69de4ca7 (+61 lines)
Added Link Here 
1
/**
2
 * \mainpage ns-3 Documentation
3
 *
4
 * \section intro-sec Introduction
5
 * <a href="http://www.nsnam.org/">ns-3</a> documentation is maintained using 
6
 * <a href="http://www.doxygen.org">Doxygen</a>.
7
 * Doxygen is typically used for 
8
 * API documentation, and organizes such documentation across different
9
 * modules.   This project uses Doxygen both for building the manual around 
10
 * the API documentation,  and a separate GNU texinfo document is used for 
11
 * the manual.
12
 *
13
 * The ns-3 project documentation is organized as follows:
14
 *     - <b><a href="modules.html">modules</a></b>:  The "Modules" tab (above) 
15
 *       organizes  all of the public API and supporting manual text 
16
 *       along the  source code directory structure.   This forms the 
17
 *       "ns-3 manual", and it is available in HTML and PDF forms.
18
 *     - \ref howtos-anchor "HOWTOs": A set of HOWTOs and FAQs is
19
 *       maintained on another Doxygen "Related Page" 
20
 *     - <a href="http://www.nsnam.org/docs/tutorial/tutorial.html">tutorial</a>:  The ns-3 tutorial is a separate document maintained in <a href="http://www.gnu.org/software/texinfo/"> GNU Texinfo</a>. 
21
 *     - The <b><a href="http://www.nsnam.org/wiki/index.php/Main_Page">ns-3 wiki</a></b> 
22
 *       contains additional user-contributed material.  Some wiki-contributed
23
 *       material may migrate to and overlap with the Doxygen information.
24
 *
25
 * \section install-sec Building the Documentation
26
 * 
27
 * ns-3 requires Doxygen version 1.5.4 or greater to fully build all items,
28
 * although earlier versions of Doxygen will mostly work.
29
 * 
30
 * Type "./waf check" followed by "./waf --doxygen" to build the documentation.
31
 * There is a program that runs during "./waf check" that builds pieces of
32
 * the documentation through introspection.  The doc/ directory contains
33
 * configuration for Doxygen (doxygen.conf and main.txt).  The Doxygen 
34
 * build process puts html files into the doc/html/ directory, and latex 
35
 * filex into the doc/latex/ directory.
36
 * 
37
 * \section module-sec Module overview
38
 *
39
 * The ns-3 library is split across multiple modules:
40
 *     - core: located in src/core and contains a number of facilities which
41
 *       do not depend on any other module. Some of these facilities are
42
 *       OS-dependent.
43
 *     - simulator: located in src/simulator and contains event scheduling
44
 *       facilities.
45
 *     - common: located in src/common and contains facilities specific
46
 *       to network simulations but shared by pretty much every model
47
 *       of a network component.
48
 *     - node: located in src/node. Defines the abstract interfaces which 
49
 *       must be implemented by every node and more specifically, by ipv4 nodes.       
50
 *     - devices: located in src/devices. Contains a set of MAC-level models
51
 *
52
 * More detail can be found in the <b><a href="modules.html">Modules</a></b>
53
 * tab.
54
 *
55
 */
56
/**
57
 * \namespace ns3
58
 * \brief Every class exported by the ns3 library is enclosed in the
59
 * ns3 namespace.
60
 */
61
(-)a/doc/main.txt (-68 lines)
Removed Link Here 
1
/**
2
 * \mainpage An Introduction to ns-3
3
 *
4
 * The ns-3 library is split across multiple modules:
5
 *     - core: located in src/core and contains a number of facilities which
6
 *       do not depend on any other module. Some of these facilities are
7
 *       OS-dependent.
8
 *     - simulator: located in src/simulator and contains event scheduling
9
 *       facilities.
10
 *     - common: located in src/common and contains facilities specific
11
 *       to network simulations but shared by pretty much every model
12
 *       of a network component.
13
 *     - node: located in src/node. Defines the abstract interfaces which 
14
 *       must be implemented by every node and more specifically, by ipv4 nodes.       
15
 *     - devices: located in src/devices. Contains a set of MAC-level models
16
 *
17
 * The "core" module contains:
18
 *    - a Functor class: ns3::Callback
19
 *    - an os-independent interface to get access to the elapsed wall clock time: ns3::SystemWallClockMs
20
 *    - a class to register regression tests with the test manager: ns3::Test and ns3::TestManager
21
 *    - debugging facilities: \ref logging, \ref assert, \ref error
22
 *    - \ref randomvariable
23
 *    - \ref config
24
 *    - a base class for objects which need to support reference counting 
25
 *      and QueryInterface: ns3::Object and ns3::InterfaceId
26
 *    - a set of low-level trace facilities integrated in the ns3::Object system: \ref tracing
27
 *    - a ns3::ComponentManager which can be used to manage the creation
28
 *      of any object which derives from ns3::Object through an ns3::ClassId
29
 *    - a smart-pointer class ns3::Ptr designed to work together with ns3::Object
30
 *
31
 * The "simulator" module contains:
32
 *    - a time management class to hold a time and convert between various time units: ns3::Time
33
 *    - a scheduler base class used to implement new simulation event schedulers: 
34
 *      ns3::Scheduler and ns3::SchedulerFactory
35
 *    - a simulator class used to create, schedule and cancel events: ns3::Simulator
36
 *
37
 * The "core" module contains:
38
 *    - a packet class to create and manipulate simulation packets: ns3::Packet, ns3::Header, 
39
 *      and ns3::Trailer. This packet class also supports per-packet ns3::Tag which are
40
 *      globs of data which can be attached to any packet.
41
 *
42
 * The "node" module contains:
43
 *    - a ns3::Node base class which should be subclassed by any new type of
44
 *      network Node.
45
 *    - models which abstract the MAC-layer from the IP layer protocols:
46
 *      ns3::NetDevice and ns3::Channel.
47
 *    - models which abstract the application-layer API: ns3::Application,
48
 *      ns3::Socket, ns3::SocketFactory, and, ns3::Udp
49
 *
50
 * The "internet-node" module contains a set of classes which implement the
51
 * APIs defined in the "node" module:
52
 *    - an Ipv4/Udp stack with socket support
53
 *    - an ARP module
54
 *    - an InternetNode class which is a Node subclass. 
55
 *
56
 * The "devices" module contains:
57
 *    - a PointToPoint MAC device: ns3::PointToPointNetDevice, ns3::PointToPointChannel,
58
 *      and ns3::PointToPointTopology.
59
 */
60
/**
61
 * \namespace ns3
62
 * \brief Every class exported by the ns3 library is enclosed in the
63
 * ns3 namespace.
64
 */
65
/**
66
 * \defgroup constants Constants
67
 * \brief Constants you can change
68
 */
(-)9dda69de4ca7 (+67 lines)
Added Link Here 
1
/**
2
 * @anchor modules_anchor
3
 *
4
 * @defgroup simulator Simulator
5
 * The "simulator" module contains: 
6
 *    - a time management class to hold a time and convert between various time units: ns3::Time 
7
 *    - a scheduler base class used to implement new simulation event schedulers:       
8
 *      ns3::Scheduler and ns3::SchedulerFactory 
9
 *    - a simulator class used to create, schedule and cancel events: ns3::Simulator
10
 *
11
 * @defgroup core Core
12
 * \brief The "core" module contains:
13
 *    - a Functor class: ns3::Callback  
14
 *    - an os-independent interface to get access to the elapsed wall clock time: ns3::SystemWallClockMs 
15
 *    - a class to register regression tests with the test manager: ns3::Test and ns3::TestManager
16
 *    - debugging facilities: \ref logging, \ref assert, \ref error
17
 *    - \ref randomvariable
18
 *    - \ref config
19
 *    - a base class for objects which need to support reference counting
20
 *      and QueryInterface: ns3::Object and ns3::InterfaceId 
21
 *    - a set of low-level trace facilities integrated in the ns3::Object system: \ref tracing
22
 *    - a ns3::ComponentManager which can be used to manage the creation
23
 *      of any object which derives from ns3::Object through an ns3::ClassId 
24
 *    - a smart-pointer class ns3::Ptr designed to work together with ns3::Object
25
 *
26
 * @defgroup common Common
27
 * The "core" module contains: 
28
 *    - a packet class to create and manipulate simulation packets: 
29
 *      ns3::Packet, ns3::Header,  and ns3::Trailer. This packet class 
30
 *      also supports per-packet ns3::Tag which are  globs of data 
31
 *      which can be attached to any packet.
32
 *
33
 * @defgroup node Node
34
 * The "node" module contains:
35
 *    - a ns3::Node base class which should be subclassed by any new type of
36
 *      network Node.
37
 *    - models which abstract the MAC-layer from the IP layer protocols:
38
 *      ns3::NetDevice and ns3::Channel. 
39
 *    - models which abstract the application-layer API: ns3::Application,
40
 *      ns3::Socket, ns3::SocketFactory, and, ns3::Udp
41
 * 
42
 *
43
 * @defgroup devices Devices
44
 * The "devices" module contains:
45
 *    - a PointToPoint MAC device: ns3::PointToPointNetDevice, ns3::PointToPointChannel,
46
 *      and ns3::PointToPointTopology.
47
 *
48
 * @defgroup internetNode InternetNode
49
 * 
50
 * The "internet-node" module contains a set of classes which implement the
51
 * APIs defined in the "node" module:
52
 *    - an Ipv4/Udp stack with socket support 
53
 *    - an ARP module
54
 *    - an InternetNode class which is a Node subclass.
55
 *    
56
 * @defgroup applications Applications
57
 *
58
 * @defgroup mobility Mobility
59
 *
60
 * @defgroup routing Routing
61
 *
62
 * @defgroup constants Constants
63
 * @brief Constants you can change
64
 *
65
 * @defgroup contrib Contrib
66
 */
67
(-)a/doc/tracing.h (+2 lines)
 Lines 1-8    Link Here 
1
/**
1
/**
2
 * \ingroup core
2
 * \defgroup TraceSourceList List of trace sources
3
 * \defgroup TraceSourceList List of trace sources
3
 */
4
 */
4
5
5
/**
6
/**
7
 * \ingroup core
6
 * \defgroup tracing Tracing
8
 * \defgroup tracing Tracing
7
 *
9
 *
8
 * The flexibility of the ns-3 tracing system comes at the cost of quite
10
 * The flexibility of the ns-3 tracing system comes at the cost of quite
(-)a/src/common/packet.h (+1 lines)
 Lines 362-367   std::ostream& operator<< (std::ostream& Link Here 
362
std::ostream& operator<< (std::ostream& os, const Packet &packet);
362
std::ostream& operator<< (std::ostream& os, const Packet &packet);
363
363
364
/**
364
/**
365
 * \ingroup common
365
 * \defgroup packetperf Packet Performance
366
 * \defgroup packetperf Packet Performance
366
 * The current implementation of the byte buffers and tag list is based
367
 * The current implementation of the byte buffers and tag list is based
367
 * on COW (Copy On Write. An introduction to COW can be found in Scott 
368
 * on COW (Copy On Write. An introduction to COW can be found in Scott 
(-)a/src/core/assert.h (+1 lines)
 Lines 28-33    Link Here 
28
#include "breakpoint.h"
28
#include "breakpoint.h"
29
29
30
/**
30
/**
31
 * \ingroup core
31
 * \defgroup assert Assert
32
 * \defgroup assert Assert
32
 * \brief assert functions and macros
33
 * \brief assert functions and macros
33
 *
34
 *
(-)a/src/core/callback.h (+1 lines)
 Lines 362-367   private: Link Here 
362
};
362
};
363
363
364
/**
364
/**
365
 * \ingroup core
365
 * \defgroup MakeCallback MakeCallback
366
 * \defgroup MakeCallback MakeCallback
366
 *
367
 *
367
 */
368
 */
(-)a/src/core/default-value.h (+1 lines)
 Lines 25-30    Link Here 
25
#include "callback.h"
25
#include "callback.h"
26
26
27
/**
27
/**
28
 * \ingroup core
28
 * \defgroup config Simulation configuration
29
 * \defgroup config Simulation configuration
29
 *
30
 *
30
 */
31
 */
(-)a/src/core/fatal-error.h (+1 lines)
 Lines 25-30    Link Here 
25
#include <iostream>
25
#include <iostream>
26
26
27
/**
27
/**
28
 * \ingroup core
28
 * \defgroup error Error
29
 * \defgroup error Error
29
 * \brief fatal error handling
30
 * \brief fatal error handling
30
 *
31
 *
(-)a/src/core/log.h (+1 lines)
 Lines 25-30    Link Here 
25
#include <iostream>
25
#include <iostream>
26
26
27
/**
27
/**
28
 * \ingroup core
28
 * \defgroup logging Logging
29
 * \defgroup logging Logging
29
 * \brief Logging functions and macros
30
 * \brief Logging functions and macros
30
 *
31
 *
(-)a/src/core/random-variable.h (+1 lines)
 Lines 26-31    Link Here 
26
#include <stdint.h>
26
#include <stdint.h>
27
27
28
/**
28
/**
29
 * \ingroup core
29
 * \defgroup randomvariable Random Variable Distributions
30
 * \defgroup randomvariable Random Variable Distributions
30
 *
31
 *
31
 */
32
 */
(-)a/src/devices/wifi/wifi.h (+1 lines)
 Lines 1-4    Link Here 
1
/**
1
/**
2
 * \ingroup devices
2
 * \defgroup Wifi Wifi Models
3
 * \defgroup Wifi Wifi Models
3
 *
4
 *
4
 * \section Wifi Models
5
 * \section Wifi Models
(-)a/src/internet-node/internet-node.h (-1 / +1 lines)
 Lines 32-38   namespace ns3 { Link Here 
32
namespace ns3 {
32
namespace ns3 {
33
33
34
/**
34
/**
35
 * \defgroup InternetNode InternetNode
35
 * \ingroup internetNode
36
 *
36
 *
37
 * \section InternetNode Overview
37
 * \section InternetNode Overview
38
 *
38
 *
(-)a/src/mobility/mobility.h (-1 / +1 lines)
 Lines 1-5    Link Here 
1
/**
1
/**
2
 * \defgroup mobility Mobility
2
 * \addtogroup mobility Mobility
3
 *
3
 *
4
 * The mobility support includes:
4
 * The mobility support includes:
5
 *  - a set of mobility models which are used to track and maintain
5
 *  - a set of mobility models which are used to track and maintain
(-)a/utils/print-introspected-doxygen.cc (+1 lines)
 Lines 99-104   PrintDefaultValuesDoxygen (std::ostream Link Here 
99
PrintDefaultValuesDoxygen (std::ostream &os)
99
PrintDefaultValuesDoxygen (std::ostream &os)
100
{
100
{
101
  os << "/// \\page ListOfDefaultValues The list of default values" << std::endl;
101
  os << "/// \\page ListOfDefaultValues The list of default values" << std::endl;
102
  os << "/// \\ingroup core" << std::endl;
102
  os << "/// \\defgroup ListOfDefaultValuesGroup The list of default values" << std::endl;
103
  os << "/// \\defgroup ListOfDefaultValuesGroup The list of default values" << std::endl;
103
  os << "/// <ul>" << std::endl;
104
  os << "/// <ul>" << std::endl;
104
  for (DefaultValueList::Iterator i = DefaultValueList::Begin ();
105
  for (DefaultValueList::Iterator i = DefaultValueList::Begin ();

Return to bug 126