A Discrete-Event Network Simulator
API

Keep statistics based on traces. More...

Public Member Functions

 TestCounter ()
 Constructor. More...
 
virtual ~TestCounter ()
 
void ConnectTraces (Ptr< QueueDisc > qd)
 Connect private methods to the queue disc traces. More...
 

Private Member Functions

void PacketDad (Ptr< const QueueDiscItem > item, const char *reason)
 Update statistics after a packet has been dropped after dequeue. More...
 
void PacketDbe (Ptr< const QueueDiscItem > item, const char *reason)
 Update statistics after a packet has been dropped before enqueue. More...
 
void PacketDequeued (Ptr< const QueueDiscItem > item)
 Update statistics after a packet has been dequeued. More...
 
void PacketEnqueued (Ptr< const QueueDiscItem > item)
 Update statistics after a packet has been enqueued. More...
 

Private Attributes

uint32_t m_nBytes
 Number of queued bytes. More...
 
uint32_t m_nDadBytes
 Number of packets dropped after dequeue. More...
 
uint32_t m_nDadPackets
 Number of packets dropped after dequeue. More...
 
uint32_t m_nDbeBytes
 Number of packets dropped before enqueue. More...
 
uint32_t m_nDbePackets
 Number of packets dropped before enqueue. More...
 
uint32_t m_nPackets
 Number of queued packets. More...
 

Friends

class QueueDiscTracesTestCase
 Needs to access private members. More...
 

Detailed Description

Keep statistics based on traces.

Definition at line 207 of file queue-disc-traces-test-suite.cc.

Constructor & Destructor Documentation

◆ TestCounter()

TestCounter::TestCounter ( )

Constructor.

Definition at line 256 of file queue-disc-traces-test-suite.cc.

◆ ~TestCounter()

TestCounter::~TestCounter ( )
virtual

Definition at line 266 of file queue-disc-traces-test-suite.cc.

Member Function Documentation

◆ ConnectTraces()

void TestCounter::ConnectTraces ( Ptr< QueueDisc qd)

Connect private methods to the queue disc traces.

Parameters
qdthe queue disc

Definition at line 300 of file queue-disc-traces-test-suite.cc.

References ns3::MakeCallback(), PacketDad(), PacketDbe(), PacketDequeued(), PacketEnqueued(), and ns3::ObjectBase::TraceConnectWithoutContext().

+ Here is the call graph for this function:

◆ PacketDad()

void TestCounter::PacketDad ( Ptr< const QueueDiscItem item,
const char *  reason 
)
private

Update statistics after a packet has been dropped after dequeue.

Parameters
itemthe dropped packet
reasonthe reason why the packet was dropped

Definition at line 293 of file queue-disc-traces-test-suite.cc.

References ns3::QueueItem::GetSize(), m_nDadBytes, and m_nDadPackets.

Referenced by ConnectTraces().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PacketDbe()

void TestCounter::PacketDbe ( Ptr< const QueueDiscItem item,
const char *  reason 
)
private

Update statistics after a packet has been dropped before enqueue.

Parameters
itemthe dropped packet
reasonthe reason why the packet was dropped

Definition at line 285 of file queue-disc-traces-test-suite.cc.

References ns3::QueueItem::GetSize(), m_nDbeBytes, and m_nDbePackets.

Referenced by ConnectTraces().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PacketDequeued()

void TestCounter::PacketDequeued ( Ptr< const QueueDiscItem item)
private

Update statistics after a packet has been dequeued.

Parameters
itemthe dequeued packet

Definition at line 278 of file queue-disc-traces-test-suite.cc.

References ns3::QueueItem::GetSize(), m_nBytes, and m_nPackets.

Referenced by ConnectTraces().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PacketEnqueued()

void TestCounter::PacketEnqueued ( Ptr< const QueueDiscItem item)
private

Update statistics after a packet has been enqueued.

Parameters
itemthe enqueued packet

Definition at line 271 of file queue-disc-traces-test-suite.cc.

References ns3::QueueItem::GetSize(), m_nBytes, and m_nPackets.

Referenced by ConnectTraces().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ QueueDiscTracesTestCase

friend class QueueDiscTracesTestCase
friend

Needs to access private members.

Definition at line 253 of file queue-disc-traces-test-suite.cc.

Member Data Documentation

◆ m_nBytes

uint32_t TestCounter::m_nBytes
private

Number of queued bytes.

Definition at line 247 of file queue-disc-traces-test-suite.cc.

Referenced by PacketDequeued(), and PacketEnqueued().

◆ m_nDadBytes

uint32_t TestCounter::m_nDadBytes
private

Number of packets dropped after dequeue.

Definition at line 251 of file queue-disc-traces-test-suite.cc.

Referenced by PacketDad().

◆ m_nDadPackets

uint32_t TestCounter::m_nDadPackets
private

Number of packets dropped after dequeue.

Definition at line 250 of file queue-disc-traces-test-suite.cc.

Referenced by PacketDad().

◆ m_nDbeBytes

uint32_t TestCounter::m_nDbeBytes
private

Number of packets dropped before enqueue.

Definition at line 249 of file queue-disc-traces-test-suite.cc.

Referenced by PacketDbe().

◆ m_nDbePackets

uint32_t TestCounter::m_nDbePackets
private

Number of packets dropped before enqueue.

Definition at line 248 of file queue-disc-traces-test-suite.cc.

Referenced by PacketDbe().

◆ m_nPackets

uint32_t TestCounter::m_nPackets
private

Number of queued packets.

Definition at line 246 of file queue-disc-traces-test-suite.cc.

Referenced by PacketDequeued(), and PacketEnqueued().


The documentation for this class was generated from the following file: