From 87a9c29cf76c82c56fc626332369c5c9ec36e329 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 30 Aug 2007 14:54:05 +0200 Subject: [PATCH] add doxygen for each TraceSourceElement subclass --- src/devices/csma/csma-net-device.cc | 5 +++++ src/devices/csma/csma-net-device.h | 7 +++++++ .../point-to-point/point-to-point-net-device.h | 3 +++ src/internet-node/ipv4-l3-protocol.h | 18 ++++++++++++++++++ src/internet-node/ipv4-l4-demux.h | 6 ++++++ src/node/node-list.h | 6 ++++++ src/node/node.h | 6 ++++++ src/node/queue.h | 12 ++++++++++++ 8 files changed, 63 insertions(+) diff --git a/src/devices/csma/csma-net-device.cc b/src/devices/csma/csma-net-device.cc index a66c43018..6b5747581 100644 --- a/src/devices/csma/csma-net-device.cc +++ b/src/devices/csma/csma-net-device.cc @@ -64,6 +64,11 @@ CsmaTraceType::GetTypeName (void) const { return "ns3::CsmaTraceType"; } +enum CsmaTraceType::Type +CsmaTraceType::Get (void) const +{ + return m_type; +} CsmaNetDevice::CsmaNetDevice (Ptr node) diff --git a/src/devices/csma/csma-net-device.h b/src/devices/csma/csma-net-device.h index 45d384a0a..713611a2a 100644 --- a/src/devices/csma/csma-net-device.h +++ b/src/devices/csma/csma-net-device.h @@ -41,6 +41,9 @@ namespace ns3 { class Queue; class CsmaChannel; +/** + * \brief hold in a TraceContext the type of trace source from a CsmaNetDevice + */ class CsmaTraceType : public TraceContextElement { public: @@ -53,6 +56,10 @@ public: void Print (std::ostream &os) const; static uint16_t GetUid (void); std::string GetTypeName (void) const; + /** + * \returns the type of the trace source which generated an event. + */ + enum Type Get (void) const; private: enum Type m_type; }; diff --git a/src/devices/point-to-point/point-to-point-net-device.h b/src/devices/point-to-point/point-to-point-net-device.h index 88357136b..a5868bea4 100644 --- a/src/devices/point-to-point/point-to-point-net-device.h +++ b/src/devices/point-to-point/point-to-point-net-device.h @@ -38,6 +38,9 @@ namespace ns3 { class Queue; class PointToPointChannel; +/** + * \brief hold in a TraceContext the type of trace source from a PointToPointNetDevice + */ class PointToPointTraceType : public TraceContextElement { public: diff --git a/src/internet-node/ipv4-l3-protocol.h b/src/internet-node/ipv4-l3-protocol.h index 0383e8d9a..8eb6dbe10 100644 --- a/src/internet-node/ipv4-l3-protocol.h +++ b/src/internet-node/ipv4-l3-protocol.h @@ -44,6 +44,9 @@ class Node; class TraceResolver; class TraceContext; +/** + * \brief hold in a TraceContext the type of trace source used by this Ipv4L3Protocol + */ class Ipv4L3ProtocolTraceContextElement : public TraceContextElement { public: @@ -54,8 +57,17 @@ public: }; Ipv4L3ProtocolTraceContextElement (); Ipv4L3ProtocolTraceContextElement (enum Type type); + /** + * \returns true if this is a tx event, false otherwise. + */ bool IsTx (void) const; + /** + * \returns true if this is a rx event, false otherwise. + */ bool IsRx (void) const; + /** + * \returns true if this is a drop event, false otherwise. + */ bool IsDrop (void) const; void Print (std::ostream &os) const; static uint16_t GetUid (void); @@ -64,11 +76,17 @@ private: enum Type m_type; }; +/** + * \brief hold in a TraceContext the index of an Ipv4Interface within the ipv4 stack of a Node + */ class Ipv4L3ProtocolInterfaceIndex : public TraceContextElement { public: Ipv4L3ProtocolInterfaceIndex (); Ipv4L3ProtocolInterfaceIndex (uint32_t index); + /** + * \returns the index of the Ipv4Interface within a Node. + */ uint32_t Get (void) const; void Print (std::ostream &os) const; static uint16_t GetUid (void); diff --git a/src/internet-node/ipv4-l4-demux.h b/src/internet-node/ipv4-l4-demux.h index 11ada2ca6..6e1208c13 100644 --- a/src/internet-node/ipv4-l4-demux.h +++ b/src/internet-node/ipv4-l4-demux.h @@ -37,11 +37,17 @@ class Node; class TraceResolver; class TraceContext; +/** + * \brief hold in a TraceContext the protocol number of a L4 Protocol + */ class Ipv4L4ProtocolTraceContextElement : public TraceContextElement { public: Ipv4L4ProtocolTraceContextElement (); Ipv4L4ProtocolTraceContextElement (int protocolNumber); + /** + * \returns the protocol number as registered in the Ipv4L4Demux. + */ int Get (void) const; void Print (std::ostream &os) const; static uint16_t GetUid (void); diff --git a/src/node/node-list.h b/src/node/node-list.h index d423d82fc..4a6c113bf 100644 --- a/src/node/node-list.h +++ b/src/node/node-list.h @@ -32,6 +32,9 @@ class Node; class CallbackBase; class TraceResolver; +/** + * \brief hold in a TraceContext the index of a node within a NodeList. + */ class NodeListIndex : public TraceContextElement { public: @@ -39,6 +42,9 @@ public: NodeListIndex (uint32_t index); void Print (std::ostream &os); static uint16_t GetUid (void); + /** + * \returns the index of the node within the NodeList + */ uint32_t Get (void) const; std::string GetTypeName (void) const; private: diff --git a/src/node/node.h b/src/node/node.h index 07739ec81..cd032e2e0 100644 --- a/src/node/node.h +++ b/src/node/node.h @@ -37,11 +37,17 @@ class Packet; class Address; class CompositeTraceResolver; +/** + * \brief hold in a TraceContext the index of a NetDevice within a Node + */ class NodeNetDeviceIndex : public TraceContextElement { public: NodeNetDeviceIndex (); NodeNetDeviceIndex (uint32_t index); + /** + * \returns the index of the NetDevice within its container Node. + */ uint32_t Get (void) const; void Print (std::ostream &os) const; std::string GetTypeName (void) const; diff --git a/src/node/queue.h b/src/node/queue.h index bfe0d009e..b8531c9c7 100644 --- a/src/node/queue.h +++ b/src/node/queue.h @@ -37,6 +37,9 @@ namespace ns3 { class StringEnumDefaultValue; +/** + * \brief hold in a TraceContext the type of a trace source + */ class QueueTraceType : public TraceContextElement { public: @@ -48,8 +51,17 @@ public: static uint16_t GetUid (void); QueueTraceType (); QueueTraceType (enum Type type); + /** + * \returns true if this is an enqueue event, false otherwise. + */ bool IsEnqueue (void) const; + /** + * \returns true if this is a dequeue event, false otherwise. + */ bool IsDequeue (void) const; + /** + * \returns true if this is a drop event, false otherwise. + */ bool IsDrop (void) const; void Print (std::ostream &os) const; std::string GetTypeName (void) const;