--- a/src/devices/csma/csma-net-device.cc Thu Aug 30 14:42:38 2007 +0200
+++ b/src/devices/csma/csma-net-device.cc Thu Aug 30 14:54:05 2007 +0200
@@ -64,6 +64,11 @@
{
return "ns3::CsmaTraceType";
}
+enum CsmaTraceType::Type
+CsmaTraceType::Get (void) const
+{
+ return m_type;
+}
CsmaNetDevice::CsmaNetDevice (Ptr<Node> node)
--- a/src/devices/csma/csma-net-device.h Thu Aug 30 14:42:38 2007 +0200
+++ b/src/devices/csma/csma-net-device.h Thu Aug 30 14:54:05 2007 +0200
@@ -41,6 +41,9 @@
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 @@
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;
};
--- a/src/devices/point-to-point/point-to-point-net-device.h Thu Aug 30 14:42:38 2007 +0200
+++ b/src/devices/point-to-point/point-to-point-net-device.h Thu Aug 30 14:54:05 2007 +0200
@@ -38,6 +38,9 @@
class Queue;
class PointToPointChannel;
+/**
+ * \brief hold in a TraceContext the type of trace source from a PointToPointNetDevice
+ */
class PointToPointTraceType : public TraceContextElement
{
public:
--- a/src/internet-node/ipv4-l3-protocol.h Thu Aug 30 14:42:38 2007 +0200
+++ b/src/internet-node/ipv4-l3-protocol.h Thu Aug 30 14:54:05 2007 +0200
@@ -44,6 +44,9 @@
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 @@
};
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 @@
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);
--- a/src/internet-node/ipv4-l4-demux.h Thu Aug 30 14:42:38 2007 +0200
+++ b/src/internet-node/ipv4-l4-demux.h Thu Aug 30 14:54:05 2007 +0200
@@ -37,11 +37,17 @@
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);
--- a/src/node/node-list.h Thu Aug 30 14:42:38 2007 +0200
+++ b/src/node/node-list.h Thu Aug 30 14:54:05 2007 +0200
@@ -32,6 +32,9 @@
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 @@
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:
--- a/src/node/node.h Thu Aug 30 14:42:38 2007 +0200
+++ b/src/node/node.h Thu Aug 30 14:54:05 2007 +0200
@@ -37,11 +37,17 @@
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;
--- a/src/node/queue.h Thu Aug 30 14:42:38 2007 +0200
+++ b/src/node/queue.h Thu Aug 30 14:54:05 2007 +0200
@@ -37,6 +37,9 @@
class StringEnumDefaultValue;
+/**
+ * \brief hold in a TraceContext the type of a trace source
+ */
class QueueTraceType : public TraceContextElement
{
public:
@@ -48,8 +51,17 @@
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;