--- a/doc/modules Fri May 30 10:38:59 2008 -0700
+++ b/doc/modules Fri May 30 10:39:43 2008 -0700
@@ -24,7 +24,7 @@
* in a simulation: ns3::Config.
*
* @defgroup common Common
- * The "core" module contains:
+ * The "common" module contains:
* - a packet class to create and manipulate simulation packets:
* ns3::Packet, ns3::Header, and ns3::Trailer. This packet class
* also supports per-packet ns3::Tag which are globs of data
@@ -62,4 +62,4 @@
* @brief Constants you can change
*
* @defgroup contrib Contrib
- */
\ No newline at end of file
+ */
--- a/examples/mixed-global-routing.cc Fri May 30 10:38:59 2008 -0700
+++ b/examples/mixed-global-routing.cc Fri May 30 10:39:43 2008 -0700
@@ -71,13 +71,13 @@
// We create the channels first without any IP addressing information
NS_LOG_INFO ("Create channels.");
PointToPointHelper p2p;
- p2p.SetChannelParameter ("BitRate", StringValue ("5Mbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps"));
p2p.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer d0d2 = p2p.Install (n0n2);
NetDeviceContainer d1d2 = p2p.Install (n1n2);
- p2p.SetChannelParameter ("BitRate", StringValue ("1500kbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps"));
p2p.SetChannelParameter ("Delay", StringValue ("10ms"));
NetDeviceContainer d5d6 = p2p.Install (n5n6);
--- a/examples/simple-alternate-routing.cc Fri May 30 10:38:59 2008 -0700
+++ b/examples/simple-alternate-routing.cc Fri May 30 10:39:43 2008 -0700
@@ -97,13 +97,13 @@
// We create the channels first without any IP addressing information
NS_LOG_INFO ("Create channels.");
PointToPointHelper p2p;
- p2p.SetChannelParameter ("BitRate", StringValue ("5Mbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps"));
p2p.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer d0d2 = p2p.Install (n0n2);
NetDeviceContainer d1d2 = p2p.Install (n1n2);
- p2p.SetChannelParameter ("BitRate", StringValue ("1500kbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps"));
p2p.SetChannelParameter ("Delay", StringValue ("10ms"));
NetDeviceContainer d3d2 = p2p.Install (n3n2);
--- a/examples/simple-error-model.cc Fri May 30 10:38:59 2008 -0700
+++ b/examples/simple-error-model.cc Fri May 30 10:39:43 2008 -0700
@@ -92,13 +92,13 @@
// We create the channels first without any IP addressing information
NS_LOG_INFO ("Create channels.");
PointToPointHelper p2p;
- p2p.SetChannelParameter ("BitRate", DataRateValue (DataRate (5000000)));
+ p2p.SetDeviceParameter ("DataRate", DataRateValue (DataRate (5000000)));
p2p.SetChannelParameter ("Delay", TimeValue (MilliSeconds (2)));
NetDeviceContainer d0d2 = p2p.Install (n0n2);
NetDeviceContainer d1d2 = p2p.Install (n1n2);
- p2p.SetChannelParameter ("BitRate", DataRateValue (DataRate (1500000)));
+ p2p.SetDeviceParameter ("DataRate", DataRateValue (DataRate (1500000)));
p2p.SetChannelParameter ("Delay", TimeValue (MilliSeconds (10)));
NetDeviceContainer d3d2 = p2p.Install (n3n2);
--- a/examples/simple-global-routing.cc Fri May 30 10:38:59 2008 -0700
+++ b/examples/simple-global-routing.cc Fri May 30 10:39:43 2008 -0700
@@ -92,13 +92,13 @@
// We create the channels first without any IP addressing information
NS_LOG_INFO ("Create channels.");
PointToPointHelper p2p;
- p2p.SetChannelParameter ("BitRate", StringValue ("5Mbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps"));
p2p.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer d0d2 = p2p.Install (n0n2);
NetDeviceContainer d1d2 = p2p.Install (n1n2);
- p2p.SetChannelParameter ("BitRate", StringValue ("1500kbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps"));
p2p.SetChannelParameter ("Delay", StringValue ("10ms"));
NetDeviceContainer d3d2 = p2p.Install (n3n2);
--- a/examples/simple-point-to-point-olsr.cc Fri May 30 10:38:59 2008 -0700
+++ b/examples/simple-point-to-point-olsr.cc Fri May 30 10:39:43 2008 -0700
@@ -93,11 +93,11 @@
// We create the channels first without any IP addressing information
NS_LOG_INFO ("Create channels.");
PointToPointHelper p2p;
- p2p.SetChannelParameter ("BitRate", StringValue ("5Mbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("5Mbps"));
p2p.SetChannelParameter ("Delay", StringValue ("2ms"));
NetDeviceContainer nd02 = p2p.Install (n02);
NetDeviceContainer nd12 = p2p.Install (n12);
- p2p.SetChannelParameter ("BitRate", StringValue ("1500kbps"));
+ p2p.SetDeviceParameter ("DataRate", StringValue ("1500kbps"));
p2p.SetChannelParameter ("Delay", StringValue ("10ms"));
NetDeviceContainer nd32 = p2p.Install (n32);
NetDeviceContainer nd34 = p2p.Install (n34);
--- a/examples/tcp-large-transfer.cc Fri May 30 10:38:59 2008 -0700
+++ b/examples/tcp-large-transfer.cc Fri May 30 10:39:43 2008 -0700
@@ -137,7 +137,7 @@
// We create the channels first without any IP addressing information
PointToPointHelper p2p;
- p2p.SetChannelParameter ("BitRate", DataRateValue (DataRate(10000000)));
+ p2p.SetDeviceParameter ("DataRate", DataRateValue (DataRate(10000000)));
p2p.SetChannelParameter ("Delay", TimeValue (MilliSeconds(10)));
NetDeviceContainer dev0 = p2p.Install (c0);
NetDeviceContainer dev1 = p2p.Install (c1);
--- a/src/common/buffer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/buffer.h Fri May 30 10:39:43 2008 -0700
@@ -36,6 +36,8 @@
namespace ns3 {
/**
+ * \ingroup packet
+ *
* \brief automatically resized byte buffer
*
* This represents a buffer of bytes. Its size is
--- a/src/common/chunk.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/chunk.h Fri May 30 10:39:43 2008 -0700
@@ -6,6 +6,11 @@
namespace ns3 {
+/**
+ * \ingroup packet
+ *
+ * \brief abstract base class for ns3::Header and ns3::Trailer
+ */
class Chunk : public ObjectBase
{
public:
--- a/src/common/data-rate.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/data-rate.h Fri May 30 10:39:43 2008 -0700
@@ -31,6 +31,9 @@
namespace ns3 {
/**
+ * \ingroup common
+ * \defgroup datarate Data Rate
+ *
* \brief Class for representing data rates
*
* Allows for natural and familiar use of data rates. Allows construction
--- a/src/common/error-model.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/error-model.h Fri May 30 10:39:43 2008 -0700
@@ -30,6 +30,9 @@
class Packet;
/**
+ * \ingroup common
+ * \defgroup errormodel Error Model
+ *
* \brief General error model that can be used to corrupt packets
*
* This object is used to flag packets as being lost/errored or not.
--- a/src/common/header.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/header.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,8 @@
namespace ns3 {
/**
+ * \ingroup packet
+ *
* \brief Protocol header serialization and deserialization.
*
* Every Protocol header which needs to be inserted or removed
--- a/src/common/packet-metadata.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/packet-metadata.h Fri May 30 10:39:43 2008 -0700
@@ -36,6 +36,7 @@
/**
* \internal
+ * \ingroup packet
* \brief handle packet metadata about packet headers and trailers
*
* This class is used by the Packet class to record every operation
--- a/src/common/packet.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/packet.h Fri May 30 10:39:43 2008 -0700
@@ -96,6 +96,9 @@
};
/**
+ * \ingroup common
+ * \defgroup packet Packet
+ *
* \brief network packets
*
* Each network packet contains a byte buffer, a set of tags, and
--- a/src/common/pcap-writer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/pcap-writer.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
class Packet;
/**
+ * \ingroup common
+ *
* \brief Pcap output for Packet logger
*
* Log Packets to a file in pcap format which can be
--- a/src/common/tag-buffer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/tag-buffer.h Fri May 30 10:39:43 2008 -0700
@@ -33,6 +33,8 @@
namespace ns3 {
/**
+ * \ingroup packet
+ *
* \brief read and write tag data
*
* This class allows subclasses of the ns3::Tag base class
--- a/src/common/tag-list.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/tag-list.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
struct TagListData;
/**
+ * \ingroup packet
+ *
* \brief keep track of the tags stored in a packet.
*
* This class is mostly private to the Packet implementation and users
--- a/src/common/tag.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/tag.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,8 @@
namespace ns3 {
/**
+ * \ingroup packet
+ *
* \brief tag a set of bytes in a packet
*
* New kinds of tags can be created by subclassing this base class.
--- a/src/common/trailer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/common/trailer.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
namespace ns3 {
/**
+ * \ingroup packet
+ *
* \brief Protocol trailer serialization and deserialization.
*
* Every Protocol trailer which needs to be inserted or removed
--- a/src/core/assert.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/assert.h Fri May 30 10:39:43 2008 -0700
@@ -28,7 +28,12 @@
/**
* \ingroup core
+ * \defgroup debugging Debugging
+ */
+/**
+ * \ingroup debugging
* \defgroup assert Assert
+ *
* \brief assert functions and macros
*
* The assert macros are used to verify
--- a/src/core/attribute-accessor-helper.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/attribute-accessor-helper.h Fri May 30 10:39:43 2008 -0700
@@ -24,10 +24,16 @@
namespace ns3 {
+/**
+ * \ingroup AttributeHelper
+ */
template <typename V, typename T1>
Ptr<const AttributeAccessor>
MakeAccessorHelper (T1 a1);
+/**
+ * \ingroup AttributeHelper
+ */
template <typename V, typename T1, typename T2>
Ptr<const AttributeAccessor>
MakeAccessorHelper (T1 a1, T2 a2);
--- a/src/core/attribute-list.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/attribute-list.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,8 @@
namespace ns3 {
/**
+ * \ingroup attribute
+ *
* \brief a container of attributes to be used during object's construction
* and in ns3::Object::Set.
*
--- a/src/core/attribute.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/attribute.h Fri May 30 10:39:43 2008 -0700
@@ -33,6 +33,15 @@
class ObjectBase;
/**
+ *
+ * \ingroup core
+ * \defgroup attribute Attribute
+ */
+
+/**
+ *
+ * \ingroup attribute
+ *
* \brief Hold a value for an Attribute.
*
* Instances of this class should always be wrapped into an Attribute object.
@@ -78,6 +87,8 @@
/**
* \brief allow setting and getting the value of an attribute.
*
+ * \ingroup attribute
+ *
* The goal of this class is to hide from the user how an attribute
* is actually set or get to or from a class instance. Implementations
* of this base class are usually provided through the MakeAccessorHelper
@@ -124,6 +135,8 @@
/**
* \brief Represent the type of an attribute
*
+ * \ingroup attribute
+ *
* Each type of attribute has an associated unique AttributeChecker
* subclass. The type of the subclass can be safely used by users
* to infer the type of the associated attribute. i.e., we expect
@@ -180,6 +193,11 @@
};
+/**
+ * \brief A class for an empty attribute value
+ *
+ * \ingroup attribute
+ */
class EmptyAttributeValue : public AttributeValue
{
public:
--- a/src/core/boolean.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/boolean.h Fri May 30 10:39:43 2008 -0700
@@ -26,6 +26,8 @@
namespace ns3 {
/**
+ * \ingroup attribute
+ *
* \brief Hold a bool native type
*
* \anchor bool
--- a/src/core/double.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/double.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,8 @@
namespace ns3 {
/**
+ * \ingroup attribute
+ *
* \class ns3::DoubleValue
* \brief Hold an floating point type
*
--- a/src/core/empty.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/empty.h Fri May 30 10:39:43 2008 -0700
@@ -2,6 +2,9 @@
#define EMPTY_H
namespace ns3 {
+/**
+ * \brief make Callback use a separate empty type
+ */
class empty {};
}
--- a/src/core/enum.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/enum.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,8 @@
namespace ns3 {
/**
+ * \ingroup attribute
+ *
* \brief hold variables of type 'enum'
*
* This class can be used to hold variables of any kind
--- a/src/core/fatal-error.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/fatal-error.h Fri May 30 10:39:43 2008 -0700
@@ -24,8 +24,7 @@
#include <iostream>
/**
- * \ingroup core
- * \defgroup error Error
+ * \ingroup debugging
* \brief fatal error handling
*
* \param msg message to output when this macro is hit.
--- a/src/core/global-value.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/global-value.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
namespace ns3 {
/**
+ * \ingroup Core
+ *
* \brief hold a so-called 'global value'.
*
* Instances of this class are expected to be allocated as static
--- a/src/core/integer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/integer.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,7 @@
namespace ns3 {
/**
+ * \ingroup attribute
* \class ns3::IntegerValue
* \brief Hold a signed integer type
*
--- a/src/core/log.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/log.h Fri May 30 10:39:43 2008 -0700
@@ -28,7 +28,7 @@
/**
- * \ingroup core
+ * \ingroup debugging
* \defgroup logging Logging
* \brief Logging functions and macros
*
--- a/src/core/object-base.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/object-base.h Fri May 30 10:39:43 2008 -0700
@@ -42,6 +42,8 @@
class AttributeList;
/**
+ * \ingroup object
+ *
* \brief implement the ns-3 type and attribute system
*
* Every class which wants to integrate in the ns-3 type and attribute
--- a/src/core/object-factory.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/object-factory.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
class AttributeValue;
/**
+ * \ingroup object
+ *
* \brief instantiate subclasses of ns3::Object.
*
* This class can also hold a set of attributes to set
--- a/src/core/object-vector.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/object-vector.h Fri May 30 10:39:43 2008 -0700
@@ -9,6 +9,8 @@
namespace ns3 {
/**
+ * \ingroup object
+ *
* \brief contain a vector of ns3::Object pointers.
*
* This class it used to get attribute access to an array of
--- a/src/core/object.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/object.h Fri May 30 10:39:43 2008 -0700
@@ -39,6 +39,11 @@
class TraceSourceAccessor;
/**
+ * \ingroup core
+ * \defgroup object Object
+ */
+/**
+ * \ingroup object
* \brief a base class which provides memory management and object aggregation
*
*/
--- a/src/core/pointer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/pointer.h Fri May 30 10:39:43 2008 -0700
@@ -26,6 +26,8 @@
namespace ns3 {
/**
+ * \ingroup attribute
+ *
* \brief hold objects of type Ptr<T>
*/
class PointerValue : public AttributeValue
--- a/src/core/ptr.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/ptr.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,12 @@
namespace ns3 {
/**
+ * \ingroup core
+ * \defgroup ptr Smart Pointer
+ */
+/**
+ * \ingroup ptr
+ *
* \brief smart pointer class similar to boost::intrusive_ptr
*
* This smart-pointer class assumes that the underlying
--- a/src/core/string.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/string.h Fri May 30 10:39:43 2008 -0700
@@ -7,6 +7,8 @@
namespace ns3 {
/**
+ * \ingroup attribute
+ *
* \class ns3::StringValue
* \brief hold variables of type string
*
--- a/src/core/test.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/test.h Fri May 30 10:39:43 2008 -0700
@@ -33,6 +33,12 @@
class TestManager;
/**
+ * \ingroup core
+ * \defgroup test Test
+ */
+/**
+ * \ingroup test
+ *
* \brief base class for new regressions tests
*
* To add a new regression test, you need to:
@@ -65,6 +71,8 @@
};
/**
+ * \ingroup test
+ *
* \brief gather and run all regression tests
*/
class TestManager {
--- a/src/core/trace-source-accessor.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/trace-source-accessor.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
class ObjectBase;
/**
+ * \ingroup tracing
+ *
* \brief control access to objects' trace sources
*
* This class abstracts the kind of trace source to which we want to connect
--- a/src/core/traced-value.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/traced-value.h Fri May 30 10:39:43 2008 -0700
@@ -32,6 +32,13 @@
namespace ns3 {
/**
+ * \ingroup core
+ * \defgroup tracing Tracing
+ */
+
+/**
+ * \ingroup tracing
+ *
* \brief trace classes with value semantics
*
* If you want to trace the change of value of a class or
--- a/src/core/uinteger.h Fri May 30 10:38:59 2008 -0700
+++ b/src/core/uinteger.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,8 @@
namespace ns3 {
/**
+ * \ingroup attribute
+ *
* \class ns3::UintegerValue
* \brief Hold an unsigned integer type
*
--- a/src/devices/point-to-point/point-to-point-channel.cc Fri May 30 10:38:59 2008 -0700
+++ b/src/devices/point-to-point/point-to-point-channel.cc Fri May 30 10:39:43 2008 -0700
@@ -34,10 +34,6 @@
static TypeId tid = TypeId ("ns3::PointToPointChannel")
.SetParent<Channel> ()
.AddConstructor<PointToPointChannel> ()
- .AddAttribute ("BitRate", "The maximum bitrate of the channel",
- DataRateValue (DataRate (0xffffffff)),
- MakeDataRateAccessor (&PointToPointChannel::m_bps),
- MakeDataRateChecker ())
.AddAttribute ("Delay", "Transmission delay through the channel",
TimeValue (Seconds (0)),
MakeTimeAccessor (&PointToPointChannel::m_delay),
@@ -52,7 +48,8 @@
PointToPointChannel::PointToPointChannel()
:
Channel ("PointToPoint Channel"),
- m_nDevices(0)
+ m_delay (Seconds (0.)),
+ m_nDevices (0)
{
NS_LOG_FUNCTION_NOARGS ();
}
@@ -79,9 +76,10 @@
}
bool
-PointToPointChannel::TransmitStart(Ptr<Packet> p,
- Ptr<PointToPointNetDevice> src,
- const Time& txTime)
+PointToPointChannel::TransmitStart(
+ Ptr<Packet> p,
+ Ptr<PointToPointNetDevice> src,
+ Time txTime)
{
NS_LOG_FUNCTION (this << p << src);
NS_LOG_LOGIC ("UID is " << p->GetUid () << ")");
@@ -91,12 +89,8 @@
uint32_t wire = src == m_link[0].m_src ? 0 : 1;
- // Here we schedule the packet receive event at the receiver,
- // which simplifies this model quite a bit. The channel just
- // adds the propagation delay time
- Simulator::Schedule (txTime + m_delay,
- &PointToPointNetDevice::Receive,
- m_link[wire].m_dst, p);
+ Simulator::Schedule (txTime + m_delay, &PointToPointNetDevice::Receive,
+ m_link[wire].m_dst, p);
return true;
}
@@ -115,20 +109,6 @@
return m_link[i].m_src;
}
-const DataRate&
-PointToPointChannel::GetDataRate (void)
-{
- NS_LOG_FUNCTION_NOARGS ();
- return m_bps;
-}
-
-const Time&
-PointToPointChannel::GetDelay (void)
-{
- NS_LOG_FUNCTION_NOARGS ();
- return m_delay;
-}
-
Ptr<NetDevice>
PointToPointChannel::GetDevice (uint32_t i) const
{
@@ -136,5 +116,4 @@
return GetPointToPointDevice (i);
}
-
} // namespace ns3
--- a/src/devices/point-to-point/point-to-point-channel.h Fri May 30 10:38:59 2008 -0700
+++ b/src/devices/point-to-point/point-to-point-channel.h Fri May 30 10:39:43 2008 -0700
@@ -36,14 +36,7 @@
* This class represents a very simple point to point channel. Think full
* duplex RS-232 or RS-422 with null modem and no handshaking. There is no
* multi-drop capability on this channel -- there can be a maximum of two
- * point-to-point net devices connected. Once we start talking about multi-
- * drop, or CSMA, or some other sharing mechanism, things begin getting
- * complicated quickly. Rather than invent some ad-hoc mechanism, we just
- * Keep It Simple everywhere.
- *
- * When the channel is instaniated, the constructor takes parameters for
- * a single speed, in bits per second, and a speed-of-light delay time as a
- * Time object. Both directions use the same speed and delay time.
+ * point-to-point net devices connected.
*
* There are two "wires" in the channel. The first device connected gets the
* [0] wire to transmit on. The second device gets the [1] wire. There is a
@@ -58,7 +51,7 @@
* \brief Create a PointToPointChannel
*
* By default, you get a channel with the name "PointToPoint Channel" that
- * has an "infitely" fast transmission speed and zero delay.
+ * has zero transmission delay.
*/
PointToPointChannel ();
@@ -75,38 +68,32 @@
* \param txTime Transmit time to apply
*/
bool TransmitStart (Ptr<Packet> p, Ptr<PointToPointNetDevice> src,
- const Time& txTime);
+ Time txTime);
/**
* \brief Get number of devices on this channel
* \returns number of devices on this channel
*/
virtual uint32_t GetNDevices (void) const;
+
/*
* \brief Get PointToPointNetDevice corresponding to index i on this channel
* \param i Index number of the device requested
* \returns Ptr to PointToPointNetDevice requested
*/
Ptr<PointToPointNetDevice> GetPointToPointDevice (uint32_t i) const;
- virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
+
/*
- * \brief Get reference to DataRate for this channel
- * \returns const reference to underlying DataRate object
+ * \brief Get NetDevice corresponding to index i on this channel
+ * \param i Index number of the device requested
+ * \returns Ptr to NetDevice requested
*/
- const DataRate& GetDataRate (void);
- /*
- * \brief Get reference to Time object storing the delay on this channel
- * \returns const reference to underlying Time object
- */
- const Time& GetDelay (void);
+ virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
private:
-
// Each point to point link has exactly two net devices
static const int N_DEVICES = 2;
-
- DataRate m_bps;
Time m_delay;
int32_t m_nDevices;
@@ -122,7 +109,7 @@
{
public:
Link() : m_state (INITIALIZING), m_src (0), m_dst (0) {}
- WireState m_state;
+ WireState m_state;
Ptr<PointToPointNetDevice> m_src;
Ptr<PointToPointNetDevice> m_dst;
};
--- a/src/devices/point-to-point/point-to-point-net-device.cc Fri May 30 10:38:59 2008 -0700
+++ b/src/devices/point-to-point/point-to-point-net-device.cc Fri May 30 10:39:43 2008 -0700
@@ -45,7 +45,7 @@
MakeMac48AddressAccessor (&PointToPointNetDevice::m_address),
MakeMac48AddressChecker ())
.AddAttribute ("DataRate", "The default data rate for point to point links",
- DataRateValue (DataRate ("10Mb/s")),
+ DataRateValue (DataRate ("32768b/s")),
MakeDataRateAccessor (&PointToPointNetDevice::m_bps),
MakeDataRateChecker ())
.AddAttribute ("ReceiveErrorModel", "XXX",
@@ -82,15 +82,10 @@
}
PointToPointNetDevice::~PointToPointNetDevice ()
-{}
-
-void
-PointToPointNetDevice::SetAddress (Mac48Address self)
{
- m_address = self;
}
-void
+ void
PointToPointNetDevice::AddHeader(Ptr<Packet> p, uint16_t protocolNumber)
{
NS_LOG_FUNCTION_NOARGS ();
@@ -100,7 +95,7 @@
p->AddHeader (ppp);
}
-bool
+ bool
PointToPointNetDevice::ProcessHeader(Ptr<Packet> p, uint16_t& param)
{
NS_LOG_FUNCTION_NOARGS ();
@@ -110,7 +105,8 @@
return true;
}
-void PointToPointNetDevice::DoDispose()
+ void
+PointToPointNetDevice::DoDispose()
{
NS_LOG_FUNCTION_NOARGS ();
m_node = 0;
@@ -119,22 +115,21 @@
NetDevice::DoDispose ();
}
-void PointToPointNetDevice::SetDataRate(const DataRate& bps)
+ void
+PointToPointNetDevice::SetDataRate(DataRate bps)
{
NS_LOG_FUNCTION_NOARGS ();
- if (!m_channel || bps <= m_channel->GetDataRate ())
- {
- m_bps = bps;
- }
+ m_bps = bps;
}
-void PointToPointNetDevice::SetInterframeGap(const Time& t)
+ void
+PointToPointNetDevice::SetInterframeGap(Time t)
{
NS_LOG_FUNCTION_NOARGS ();
m_tInterframeGap = t;
}
-bool
+ bool
PointToPointNetDevice::TransmitStart (Ptr<Packet> p)
{
NS_LOG_FUNCTION (this << p);
@@ -151,33 +146,40 @@
NS_LOG_LOGIC ("Schedule TransmitCompleteEvent in " <<
txCompleteTime.GetSeconds () << "sec");
- // Schedule the tx complete event
+
Simulator::Schedule (txCompleteTime,
- &PointToPointNetDevice::TransmitComplete,
- this);
+ &PointToPointNetDevice::TransmitComplete, this);
+
return m_channel->TransmitStart(p, this, txTime);
}
-void PointToPointNetDevice::TransmitComplete (void)
+ void
+PointToPointNetDevice::TransmitComplete (void)
{
NS_LOG_FUNCTION_NOARGS ();
//
-// This function is called to finish the process of transmitting a packet.
-// We need to tell the channel that we've stopped wiggling the wire and
-// get the next packet from the queue. If the queue is empty, we are
-// done, otherwise transmit the next packet.
+// This function is called to when we're all done transmitting a packet.
+// We try and pull another packet off of the transmit queue. If the queue
+// is empty, we are done, otherwise we need to start transmitting the
+// next packet.
//
NS_ASSERT_MSG(m_txMachineState == BUSY, "Must be BUSY if transmitting");
m_txMachineState = READY;
Ptr<Packet> p = m_queue->Dequeue ();
if (p == 0)
{
- return; // Nothing to do at this point
+//
+// No packet was on the queue, so we just exit.
+//
+ return;
}
+//
+// Got another packet off of the queue, so start the transmit process agin.
+//
TransmitStart(p);
}
-bool
+ bool
PointToPointNetDevice::Attach (Ptr<PointToPointChannel> ch)
{
NS_LOG_FUNCTION (this << &ch);
@@ -185,64 +187,64 @@
m_channel = ch;
m_channel->Attach(this);
- m_bps = m_channel->GetDataRate ();
- // GFR Comment. Below is definitely wrong. Interframe gap
- // is unrelated to channel delay.
- // -- unlesss you want to introduce a default gap which is there to avoid
- // parts of multiple packets flowing on the "wire" at the same time.
- //m_tInterframeGap = m_channel->GetDelay ();
- /*
- * For now, this device is up whenever a channel is attached to it.
- * In fact, it should become up only when the second device
- * is attached to the channel. So, there should be a way for
- * a PointToPointChannel to notify both of its attached devices
- * that the channel is 'complete', hence that the devices are
- * up, hence that they can call NotifyLinkUp.
- */
+//
+// This device is up whenever it is attached to a channel. A better plan
+// would be to have the link come up when both devices are attached, but this
+// is not done for now.
+//
NotifyLinkUp ();
return true;
}
-void PointToPointNetDevice::SetQueue (Ptr<Queue> q)
+ void
+PointToPointNetDevice::SetQueue (Ptr<Queue> q)
{
NS_LOG_FUNCTION (this << q);
-
m_queue = q;
}
-void PointToPointNetDevice::SetReceiveErrorModel (Ptr<ErrorModel> em)
+ void
+PointToPointNetDevice::SetReceiveErrorModel (Ptr<ErrorModel> em)
{
NS_LOG_FUNCTION ("(" << em << ")");
-
m_receiveErrorModel = em;
}
-void PointToPointNetDevice::Receive (Ptr<Packet> packet)
+ void
+PointToPointNetDevice::Receive (Ptr<Packet> packet)
{
NS_LOG_FUNCTION (this << packet);
uint16_t protocol = 0;
if (m_receiveErrorModel && m_receiveErrorModel->IsCorrupt (packet) )
{
+//
+// If we have an error model and it indicates that it is time to lose a
+// corrupted packet, don't forward this packet up, let it go.
+//
m_dropTrace (packet);
- // Do not forward up; let this packet go
}
else
{
+//
+// Hit the receive trace hook, strip off the point-to-point protocol header
+// and forward this packet up the protocol stack.
+//
m_rxTrace (packet);
ProcessHeader(packet, protocol);
m_rxCallback (this, packet, protocol, GetBroadcast ());
}
}
-Ptr<Queue> PointToPointNetDevice::GetQueue(void) const
+ Ptr<Queue>
+PointToPointNetDevice::GetQueue(void) const
{
NS_LOG_FUNCTION_NOARGS ();
return m_queue;
}
-void
+ void
PointToPointNetDevice::NotifyLinkUp (void)
{
m_linkUp = true;
@@ -252,110 +254,167 @@
}
}
-void
+ void
PointToPointNetDevice::SetName(const std::string name)
{
m_name = name;
}
-std::string
+
+ std::string
PointToPointNetDevice::GetName(void) const
{
return m_name;
}
-void
+
+ void
PointToPointNetDevice::SetIfIndex(const uint32_t index)
{
m_ifIndex = index;
}
-uint32_t
+
+ uint32_t
PointToPointNetDevice::GetIfIndex(void) const
{
return m_ifIndex;
}
-Ptr<Channel>
+
+ Ptr<Channel>
PointToPointNetDevice::GetChannel (void) const
{
return m_channel;
}
-Address
+
+//
+// This is a point-to-point device, so we really don't need any kind of address
+// information. However, the base class NetDevice wants us to define the
+// methods to get and set the address. Rather than be rude and assert, we let
+// clients get and set the address, but simply ignore them.
+ void
+PointToPointNetDevice::SetAddress (Mac48Address addr)
+{
+ m_address = addr;
+}
+
+ Address
PointToPointNetDevice::GetAddress (void) const
{
return m_address;
}
-bool
+
+ bool
PointToPointNetDevice::SetMtu (const uint16_t mtu)
{
m_mtu = mtu;
return true;
}
-uint16_t
+
+ uint16_t
PointToPointNetDevice::GetMtu (void) const
{
return m_mtu;
}
-bool
+
+ bool
PointToPointNetDevice::IsLinkUp (void) const
{
return m_linkUp;
}
-void
+
+ void
PointToPointNetDevice::SetLinkChangeCallback (Callback<void> callback)
{
m_linkChangeCallback = callback;
}
-bool
+
+//
+// This is a point-to-point device, so every transmission is a broadcast to
+// all of the devices on the network.
+//
+ bool
PointToPointNetDevice::IsBroadcast (void) const
{
return true;
}
-Address
+
+//
+// We don't really need any addressing information since this is a
+// point-to-point device. The base class NetDevice wants us to return a
+// broadcast address, so we make up something reasonable.
+//
+ Address
PointToPointNetDevice::GetBroadcast (void) const
{
return Mac48Address ("ff:ff:ff:ff:ff:ff");
}
-bool
+
+//
+// We don't deal with multicast here. It doesn't make sense to include some
+// of the one destinations on the network but exclude some of the others.
+ bool
PointToPointNetDevice::IsMulticast (void) const
{
return false;
}
-Address
+
+//
+// Since we return false in the IsMulticast call, calls to other multicast
+// related methods returns are undefined according to the base class. So we
+// can freely make something up, which is the base of the MAC multicast
+// address space.
+//
+ Address
PointToPointNetDevice::GetMulticast (void) const
{
return Mac48Address ("01:00:5e:00:00:00");
}
-Address
+
+ Address
PointToPointNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
{
return Mac48Address ("01:00:5e:00:00:00");
}
-bool
+
+ bool
PointToPointNetDevice::IsPointToPoint (void) const
{
return true;
}
-bool
-PointToPointNetDevice::Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
+
+ bool
+PointToPointNetDevice::Send(
+ Ptr<Packet> packet,
+ const Address &dest,
+ uint16_t protocolNumber)
{
NS_LOG_FUNCTION_NOARGS ();
NS_LOG_LOGIC ("p=" << packet << ", dest=" << &dest);
NS_LOG_LOGIC ("UID is " << packet->GetUid ());
- // GFR Comment. Why is this an assertion? Can't a link legitimately
- // "go down" during the simulation? Shouldn't we just wait for it
- // to come back up?
- NS_ASSERT (IsLinkUp ());
+//
+// If IsLinkUp() is false it means there is no channel to send any packet
+// over so we just return an error.
+//
+ if (IsLinkUp () == false)
+ {
+ return false;
+ }
+
+//
+// Stick a point to point protocol header on the packet in preparation for
+// shoving it out the door.
+//
AddHeader(packet, protocolNumber);
//
-// This class simulates a point to point device. In the case of a serial
-// link, this means that we're simulating something like a UART.
-//
-//
// If there's a transmission in progress, we enque the packet for later
// transmission; otherwise we send it now.
+//
if (m_txMachineState == READY)
{
-// We still enqueue and dequeue it to hit the tracing hooks
+//
+// Even if the transmitter is immediately available, we still enqueue and
+// dequeue the packet to hit the tracing hooks.
+//
m_queue->Enqueue (packet);
packet = m_queue->Dequeue ();
return TransmitStart (packet);
@@ -365,22 +424,26 @@
return m_queue->Enqueue(packet);
}
}
-Ptr<Node>
+
+ Ptr<Node>
PointToPointNetDevice::GetNode (void) const
{
return m_node;
}
-void
+
+ void
PointToPointNetDevice::SetNode (Ptr<Node> node)
{
m_node = node;
}
-bool
+
+ bool
PointToPointNetDevice::NeedsArp (void) const
{
return false;
}
-void
+
+ void
PointToPointNetDevice::SetReceiveCallback (NetDevice::ReceiveCallback cb)
{
m_rxCallback = cb;
--- a/src/devices/point-to-point/point-to-point-net-device.h Fri May 30 10:38:59 2008 -0700
+++ b/src/devices/point-to-point/point-to-point-net-device.h Fri May 30 10:39:43 2008 -0700
@@ -60,16 +60,16 @@
* This is the constructor for the PointToPointNetDevice. It takes as a
* parameter a pointer to the Node to which this device is connected,
* as well as an optional DataRate object.
- *
- * @see PointToPointTopology::AddPointToPointLink ()
*/
PointToPointNetDevice ();
+
/**
* Destroy a PointToPointNetDevice
*
* This is the destructor for the PointToPointNetDevice.
*/
virtual ~PointToPointNetDevice ();
+
/**
* Set the Data Rate used for transmission of packets. The data rate is
* set in the Attach () method from the corresponding field in the channel
@@ -78,48 +78,35 @@
* @see Attach ()
* @param bps the data rate at which this object operates
*/
- void SetDataRate (const DataRate& bps);
+ void SetDataRate (DataRate bps);
+
/**
* Set the inteframe gap used to separate packets. The interframe gap
* defines the minimum space required between packets sent by this device.
- * It is usually set in the Attach () method based on the speed of light
- * delay of the channel to which the device is attached. It can be
- * overridden using this method if desired.
*
- * @see Attach ()
* @param t the interframe gap time
*/
- void SetInterframeGap (const Time& t);
+ void SetInterframeGap (Time t);
+
/**
* Attach the device to a channel.
*
- * The PointToPointTopology object creates a PointToPointChannel and two
- * PointtoPointNetDevices. In order to introduce these components to each
- * other, the topology object calls Attach () on each PointToPointNetDevice.
- * Inside this method, the Net Device calls out to the PointToPointChannel
- * to introduce itself.
- *
- * @see PointToPointTopology::AddPointToPointLink ()
- * @see SetDataRate ()
- * @see SetInterframeGap ()
- * @param ch a pointer to the channel to which this object is being attached.
+ * @param ch Ptr to the channel to which this object is being attached.
*/
bool Attach (Ptr<PointToPointChannel> ch);
+
/**
* Attach a queue to the PointToPointNetDevice.
*
- * The PointToPointNetDevice "owns" a queue. This queue is created by the
- * PointToPointTopology object and implements a queueing method such as
- * DropTail or RED. The PointToPointNetDevice assumes ownership of this
- * queue and must delete it when the device is destroyed.
+ * The PointToPointNetDevice "owns" a queue that implements a queueing
+ * method such as DropTail or RED.
*
- * @see PointToPointTopology::AddPointToPointLink ()
* @see Queue
* @see DropTailQueue
- * @param queue a pointer to the queue for which object is assuming
- * ownership.
+ * @param queue Ptr to the new queue.
*/
void SetQueue (Ptr<Queue> queue);
+
/**
* Attach a receive ErrorModel to the PointToPointNetDevice.
*
@@ -127,9 +114,10 @@
* the packet receive chain.
*
* @see ErrorModel
- * @param em a pointer to the ErrorModel
+ * @param em Ptr to the ErrorModel.
*/
void SetReceiveErrorModel(Ptr<ErrorModel> em);
+
/**
* Receive a packet from a connected PointToPointChannel.
*
@@ -139,46 +127,67 @@
* arrived at the device.
*
* @see PointToPointChannel
- * @param p a reference to the received packet
+ * @param p Ptr to the received packet.
*/
void Receive (Ptr<Packet> p);
- void SetAddress (Mac48Address self);
+ /**
+ * Assign a MAC address to this device.
+ *
+ * @see Mac48Address
+ * @param addr The new address.
+ */
+ void SetAddress (Mac48Address addr);
- // inherited from NetDevice base class.
+//
+// Pure virtual methods inherited from NetDevice we must implement.
+//
virtual void SetName(const std::string name);
virtual std::string GetName(void) const;
+
virtual void SetIfIndex(const uint32_t index);
virtual uint32_t GetIfIndex(void) const;
+
virtual Ptr<Channel> GetChannel (void) const;
virtual Address GetAddress (void) const;
+
virtual bool SetMtu (const uint16_t mtu);
virtual uint16_t GetMtu (void) const;
+
virtual bool IsLinkUp (void) const;
+
virtual void SetLinkChangeCallback (Callback<void> callback);
+
virtual bool IsBroadcast (void) const;
virtual Address GetBroadcast (void) const;
+
virtual bool IsMulticast (void) const;
virtual Address GetMulticast (void) const;
virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
+
virtual bool IsPointToPoint (void) const;
- virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
+
+ virtual bool Send(Ptr<Packet> packet, const Address &dest,
+ uint16_t protocolNumber);
+
virtual Ptr<Node> GetNode (void) const;
virtual void SetNode (Ptr<Node> node);
+
virtual bool NeedsArp (void) const;
+
virtual void SetReceiveCallback (NetDevice::ReceiveCallback cb);
private:
virtual void DoDispose (void);
+
/**
* Get a copy of the attached Queue.
*
* This method is provided for any derived class that may need to get
* direct access to the underlying queue.
*
- * @see PointToPointTopology
- * @returns a pointer to the queue.
+ * @returns Ptr to the queue.
*/
Ptr<Queue> GetQueue(void) const;
@@ -188,6 +197,7 @@
* respect the protocol implemented by the agent.
*/
void AddHeader(Ptr<Packet> p, uint16_t protocolNumber);
+
/**
* Removes, from a packet of data, all headers and trailers that
* relate to the protocol implemented by the agent
@@ -195,6 +205,7 @@
* protocol stack.
*/
bool ProcessHeader(Ptr<Packet> p, uint16_t& param);
+
/**
* Start Sending a Packet Down the Wire.
*
@@ -211,14 +222,15 @@
* @returns true if success, false on failure
*/
bool TransmitStart (Ptr<Packet> p);
+
/**
* Stop Sending a Packet Down the Wire and Begin the Interframe Gap.
*
* The TransmitComplete method is used internally to finish the process
* of sending a packet out on the channel.
- *
*/
void TransmitComplete(void);
+
void NotifyLinkUp (void);
/**
@@ -234,24 +246,28 @@
* @see TxMachineState
*/
TxMachineState m_txMachineState;
+
/**
* The data rate that the Net Device uses to simulate packet transmission
* timing.
* @see class DataRate
*/
DataRate m_bps;
+
/**
* The interframe gap that the Net Device uses to throttle packet
* transmission
* @see class Time
*/
Time m_tInterframeGap;
+
/**
* The PointToPointChannel to which this PointToPointNetDevice has been
* attached.
* @see class PointToPointChannel
*/
Ptr<PointToPointChannel> m_channel;
+
/**
* The Queue which this PointToPointNetDevice uses as a packet source.
* Management of this Queue has been delegated to the PointToPointNetDevice
@@ -260,6 +276,7 @@
* @see class DropTailQueue
*/
Ptr<Queue> m_queue;
+
/**
* The trace source for the packet reception events that the device can
* fire.
@@ -267,6 +284,7 @@
* @see class CallBackTraceSource
*/
TracedCallback<Ptr<const Packet> > m_rxTrace;
+
/**
* The trace source for the packet drop events that the device can
* fire.
--- a/src/devices/point-to-point/point-to-point.h Fri May 30 10:38:59 2008 -0700
+++ b/src/devices/point-to-point/point-to-point.h Fri May 30 10:39:43 2008 -0700
@@ -40,6 +40,6 @@
* beyond the eight bits per byte of the packet sent. That is, we do not
* model Flag Sequences, Frame Check Sequences nor do we "escape" any data.
*
- * The ns3::PointToPointChannel does model a speed-of-light delay which can
- * be accessed via the attribute "Delay."
+ * The ns3::PointToPointChannel does model a speed-of-light or transmission
+ * delay which can be set and get via the attribute "Delay."
*/
--- a/src/node/address.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/address.h Fri May 30 10:39:43 2008 -0700
@@ -10,6 +10,11 @@
namespace ns3 {
/**
+ * \ingroup node
+ * \defgroup address Address
+ */
+/**
+ * \ingroup address
* \brief a polymophic address class
*
* This class is very similar in design and spirit to the BSD sockaddr
--- a/src/node/application.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/application.h Fri May 30 10:39:43 2008 -0700
@@ -33,6 +33,9 @@
class RandomVariable;
/**
+ * \ingroup node
+ * \defgroup application
+ *
* \brief The base class for all ns3 applicationes
*
* Class Application is the base class for all ns3 applications.
--- a/src/node/channel.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/channel.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,9 @@
class NetDevice;
/**
+ * \ingroup node
+ * \defgroup channel Channel
+ *
* \brief Abstract Channel Base Class.
*
* A channel is a logical path over which information flows. The path can
--- a/src/node/drop-tail-queue.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/drop-tail-queue.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,8 @@
class TraceContainer;
/**
+ * \ingroup queue
+ *
* \brief A FIFO packet queue that drops tail-end packets on overflow
*/
class DropTailQueue : public Queue {
--- a/src/node/ethernet-header.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/ethernet-header.h Fri May 30 10:39:43 2008 -0700
@@ -38,6 +38,8 @@
QINQ /**< Double tagged packet. Header includes two VLAN tags */
};
/**
+ * \ingroup node
+ *
* \brief Packet header for Ethernet
*
* This class can be used to add a header to an ethernet packet that
--- a/src/node/ethernet-trailer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/ethernet-trailer.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
class Packet;
/**
+ * \ingroup node
+ *
* \brief Packet trailer for Ethernet
*
* This class can be used to add and verify the FCS at the end of an
--- a/src/node/inet-socket-address.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/inet-socket-address.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,8 @@
/**
+ * \ingroup address
+ *
* \brief an Inet address class
*
* This class is similar to inet_sockaddr in the BSD socket
--- a/src/node/ipv4-address-generator.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/ipv4-address-generator.h Fri May 30 10:39:43 2008 -0700
@@ -23,6 +23,12 @@
namespace ns3 {
+/**
+ * \ingroup address
+ *
+ * \brief This generator assigns addresses sequentially from a provided
+ * network address; used in topology code.
+ */
class Ipv4AddressGenerator {
public:
static void Init (const Ipv4Address net, const Ipv4Mask mask,
--- a/src/node/ipv4-address.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/ipv4-address.h Fri May 30 10:39:43 2008 -0700
@@ -30,9 +30,11 @@
class Ipv4Mask;
-/** Ipv4 addresses are stored in host order in
- * this class.
- */
+/**
+ * \ingroup address
+ *
+ * \brief Ipv4 addresses are stored in host order in this class.
+ */
class Ipv4Address {
public:
Ipv4Address ();
@@ -144,7 +146,11 @@
friend bool operator < (Ipv4Address const &addrA, Ipv4Address const &addrB);
};
-
+/**
+ * \ingroup address
+ *
+ * \brief a class to represent an Ipv4 address mask
+ */
class Ipv4Mask {
public:
Ipv4Mask ();
--- a/src/node/ipv4-route.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/ipv4-route.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,7 @@
namespace ns3 {
/**
+ * \ingroup ipv4
* \brief A record of an IPv4 route
*/
class Ipv4Route {
@@ -106,6 +107,7 @@
std::ostream& operator<< (std::ostream& os, Ipv4Route const& route);
/**
+ * \ingroup ipv4
* \brief A record of an IPv4 multicast route
*/
class Ipv4MulticastRoute {
--- a/src/node/ipv4.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/ipv4.h Fri May 30 10:39:43 2008 -0700
@@ -32,10 +32,17 @@
class NetDevice;
class Packet;
class Ipv4Route;
-class Ipv4Header; // FIXME: ipv4-header.h needs to move from module
+class Ipv4Header; // XXX: ipv4-header.h needs to move from module
// "internet-node" to module "node"
/**
+ * \ingroup node
+ * \defgroup ipv4 Ipv4
+ */
+
+/**
+ * \ingroup ipv4
+ *
* \brief Base class for IPv4 routing protocols.
*
* This class represents the interface between the IPv4 routing core
--- a/src/node/llc-snap-header.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/llc-snap-header.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,11 @@
namespace ns3 {
+/**
+ * \ingroup node
+ *
+ * \brief Header for the LLC/SNAP encapsulation
+ */
class LlcSnapHeader : public Header
{
public:
--- a/src/node/mac48-address.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/mac48-address.h Fri May 30 10:39:43 2008 -0700
@@ -30,6 +30,8 @@
class Address;
/**
+ * \ingroup address
+ *
* \brief an EUI-48 address
*
* This class can contain 48 bit IEEE addresses.
--- a/src/node/mac64-address.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/mac64-address.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,8 @@
class Address;
/**
+ * \ingroup address
+ *
* \brief an EUI-64 address
*
* This class can contain 64 bit IEEE addresses.
--- a/src/node/net-device.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/net-device.h Fri May 30 10:39:43 2008 -0700
@@ -36,6 +36,12 @@
class Packet;
/**
+ * \ingroup node
+ * \defgroup netdevice NetDevice
+ */
+/**
+ * \ingroup NetDevice
+ *
* \brief Network layer to device interface
*
* This interface defines the API which the IP and ARP
--- a/src/node/node-list.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/node-list.h Fri May 30 10:39:43 2008 -0700
@@ -31,6 +31,8 @@
/**
+ * \ingroup node
+ *
* \brief the list of simulation nodes.
*
* Every Node created is automatically added to this list.
--- a/src/node/node.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/node.h Fri May 30 10:39:43 2008 -0700
@@ -36,6 +36,8 @@
/**
+ * \ingroup node
+ *
* \brief A network Node.
*
* This class holds together:
--- a/src/node/packet-socket-address.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/packet-socket-address.h Fri May 30 10:39:43 2008 -0700
@@ -30,6 +30,11 @@
class NetDevice;
+/**
+ * \ingroup address
+ *
+ * \brief an address for a packet socket
+ */
class PacketSocketAddress
{
public:
--- a/src/node/packet-socket-factory.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/packet-socket-factory.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,8 @@
class Socket;
/**
+ * \ingroup socket
+ *
* This can be used as an interface in a node in order for the node to
* generate PacketSockets that can connect to net devices.
*/
--- a/src/node/packet-socket.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/packet-socket.h Fri May 30 10:39:43 2008 -0700
@@ -36,6 +36,8 @@
class PacketSocketAddress;
/**
+ * \ingroup socket
+ *
* \brief A PacketSocket is a link between an application and a net device.
*
* A PacketSocket can be used to connect an application to a net
--- a/src/node/queue.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/queue.h Fri May 30 10:39:43 2008 -0700
@@ -33,6 +33,9 @@
namespace ns3 {
/**
+ * \ingroup node
+ * \defgroup queue Queue
+ *
* \brief Abstract base class for packet Queues
*
* This class defines the base APIs for packet queues in the ns-3 system
--- a/src/node/simple-channel.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/simple-channel.h Fri May 30 10:39:43 2008 -0700
@@ -10,6 +10,10 @@
class SimpleNetDevice;
class Packet;
+/**
+ * \ingroup channel
+ * \brief A simple channel, for simple things and testing
+ */
class SimpleChannel : public Channel
{
public:
--- a/src/node/simple-net-device.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/simple-net-device.h Fri May 30 10:39:43 2008 -0700
@@ -30,6 +30,11 @@
class SimpleChannel;
class Node;
+/**
+ * \ingroup netdevice
+ *
+ * \brief simple net device for simple things and testing
+ */
class SimpleNetDevice : public NetDevice
{
public:
--- a/src/node/socket-factory.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/socket-factory.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,8 @@
class Socket;
/**
+ * \ingroup socket
+ *
* \brief Object to create transport layer instances that provide a
* socket API to applications.
*
--- a/src/node/tcp-socket-factory.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/tcp-socket-factory.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,8 @@
class Socket;
/**
+ * \ingroup socket
+ *
* \brief API to create TCP socket instances
*
* This abstract class defines the API for TCP sockets.
--- a/src/node/tcp-socket.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/tcp-socket.h Fri May 30 10:39:43 2008 -0700
@@ -36,6 +36,8 @@
class Packet;
/**
+ * \ingroup socket
+ *
* \brief (abstract) base class of all TcpSockets
*
* This class exists solely for hosting TcpSocket attributes that can
--- a/src/node/udp-socket-factory.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/udp-socket-factory.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,8 @@
class Socket;
/**
+ * \ingroup socket
+ *
* \brief API to create UDP socket instances
*
* This abstract class defines the API for UDP socket factory.
--- a/src/node/udp-socket.h Fri May 30 10:38:59 2008 -0700
+++ b/src/node/udp-socket.h Fri May 30 10:39:43 2008 -0700
@@ -35,6 +35,8 @@
class Packet;
/**
+ * \ingroup socket
+ *
* \brief (abstract) base class of all UdpSockets
*
* This class exists solely for hosting UdpSocket attributes that can
--- a/src/simulator/event-impl.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/event-impl.h Fri May 30 10:39:43 2008 -0700
@@ -24,6 +24,9 @@
namespace ns3 {
+/**
+ * \ingroup simulator
+ */
class EventImpl
{
public:
--- a/src/simulator/heap-scheduler.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/heap-scheduler.h Fri May 30 10:39:43 2008 -0700
@@ -29,6 +29,9 @@
class EventHolder;
+/**
+ * \ingroup scheduler
+ */
class HeapScheduler : public Scheduler {
public:
HeapScheduler ();
--- a/src/simulator/list-scheduler.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/list-scheduler.h Fri May 30 10:39:43 2008 -0700
@@ -31,6 +31,9 @@
class EventImpl;
+/**
+ * \ingroup scheduler
+ */
class ListScheduler : public Scheduler {
public:
ListScheduler ();
--- a/src/simulator/map-scheduler.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/map-scheduler.h Fri May 30 10:39:43 2008 -0700
@@ -30,6 +30,9 @@
class EventImpl;
+/**
+ * \ingroup scheduler
+ */
class MapScheduler : public Scheduler {
public:
MapScheduler ();
--- a/src/simulator/nstime.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/nstime.h Fri May 30 10:39:43 2008 -0700
@@ -60,6 +60,9 @@
/**
+ * \ingroup simulator
+ * \defgroup time Time
+ *
* \brief keep track of time unit.
*
* This template class is used to keep track of the value
--- a/src/simulator/scheduler.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/scheduler.h Fri May 30 10:39:43 2008 -0700
@@ -28,6 +28,9 @@
namespace ns3 {
/**
+ * \ingroup simulator
+ * \defgroup scheduler Scheduler
+ *
* \brief Maintain the event list
*
* This base class specifies the interface used to maintain the
--- a/src/simulator/simulator.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/simulator.h Fri May 30 10:39:43 2008 -0700
@@ -35,6 +35,8 @@
class SchedulerFactory;
/**
+ * \ingroup simulator
+ *
* \brief Control the scheduling of simulation events.
*
* The internal simulation clock is maintained
--- a/src/simulator/timer.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/timer.h Fri May 30 10:39:43 2008 -0700
@@ -30,6 +30,8 @@
class TimerImpl;
/**
+ * \ingroup simulator
+ *
* \brief a simple Timer class
*
* A timer is used to hold together a delay, a function to invoke
--- a/src/simulator/watchdog.h Fri May 30 10:38:59 2008 -0700
+++ b/src/simulator/watchdog.h Fri May 30 10:39:43 2008 -0700
@@ -27,6 +27,9 @@
class TimerImpl;
+/**
+ * \ingroup simulator
+ */
class Watchdog
{
public: