A Discrete-Event Network Simulator
API
ns3::TestUtils Class Reference

Test Utils. More...

Static Public Member Functions

static void LogPacketContents (Ptr< Packet > pkt)
 Function to log packet contents. More...
 
template<class T >
static void LogPacketInfo (T source, std::string s)
 Log packet info function. More...
 
static std::string sprintPacketContentsBin (Ptr< Packet > pkt)
 Function to convert packet contents in binary format. More...
 
static std::string sprintPacketContentsHex (Ptr< Packet > pkt)
 Function to convert packet contents in hex format. More...
 

Detailed Description

Test Utils.

Definition at line 41 of file test-lte-rlc-header.cc.

Member Function Documentation

◆ LogPacketContents()

static void ns3::TestUtils::LogPacketContents ( Ptr< Packet pkt)
inlinestatic

Function to log packet contents.

Parameters
pktthe packet

Definition at line 84 of file test-lte-rlc-header.cc.

References NS_LOG_DEBUG, sprintPacketContentsBin(), and sprintPacketContentsHex().

Referenced by ns3::RlcAmStatusPduTestCase::DoRun().

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

◆ LogPacketInfo()

template<class T >
static void ns3::TestUtils::LogPacketInfo ( source,
std::string  s 
)
inlinestatic

Log packet info function.

Parameters
sourceT
stext string to log

Definition at line 97 of file test-lte-rlc-header.cc.

References NS_LOG_DEBUG.

◆ sprintPacketContentsBin()

static std::string ns3::TestUtils::sprintPacketContentsBin ( Ptr< Packet pkt)
inlinestatic

Function to convert packet contents in binary format.

Parameters
pktthe packet
Returns
a text string

Definition at line 67 of file test-lte-rlc-header.cc.

References ns3::Packet::CopyData(), and ns3::Packet::GetSize().

Referenced by TestUtils::LogPacketContents(), and LogPacketContents().

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

◆ sprintPacketContentsHex()

static std::string ns3::TestUtils::sprintPacketContentsHex ( Ptr< Packet pkt)
inlinestatic

Function to convert packet contents in hex format.

Parameters
pktthe packet
Returns
a text string

Definition at line 49 of file test-lte-rlc-header.cc.

References ns3::Packet::CopyData(), and ns3::Packet::GetSize().

Referenced by ns3::RlcAmStatusPduTestCase::DoRun(), TestUtils::LogPacketContents(), and LogPacketContents().

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

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