A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches

Keep statistics based on traces. More...

+ Collaboration diagram for TestCounter:

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

Friends

class QueueDiscTracesTestCase
 Needs to access private members.
 

Detailed Description

Keep statistics based on traces.

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

Constructor & Destructor Documentation

◆ TestCounter()

TestCounter::TestCounter ( )

Constructor.

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

◆ ~TestCounter()

TestCounter::~TestCounter ( )
virtual

Definition at line 248 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 281 of file queue-disc-traces-test-suite.cc.

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

+ 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 274 of file queue-disc-traces-test-suite.cc.

References m_nDadBytes, and m_nDadPackets.

Referenced by ConnectTraces().

+ 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 267 of file queue-disc-traces-test-suite.cc.

References m_nDbeBytes, and m_nDbePackets.

Referenced by ConnectTraces().

+ 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 260 of file queue-disc-traces-test-suite.cc.

References m_nBytes, and m_nPackets.

Referenced by ConnectTraces().

+ 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 253 of file queue-disc-traces-test-suite.cc.

References m_nBytes, and m_nPackets.

Referenced by ConnectTraces().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ QueueDiscTracesTestCase

friend class QueueDiscTracesTestCase
friend

Needs to access private members.

Definition at line 235 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 229 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 233 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 232 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 231 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 230 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 228 of file queue-disc-traces-test-suite.cc.

Referenced by PacketDequeued(), and PacketEnqueued().


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