A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TestUtils Class Reference

Contains ASN encoding test utility functions. 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)
 Function to log packet info. 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

Contains ASN encoding test utility functions.

Definition at line 42 of file test-asn1-encoding.cc.

Member Function Documentation

◆ LogPacketContents()

◆ LogPacketInfo()

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

Function to log packet info.

Parameters
sourceT
sthe string

Definition at line 98 of file test-asn1-encoding.cc.

References NS_LOG_DEBUG.

◆ sprintPacketContentsBin()

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

Function to convert packet contents in binary format.

Parameters
pktthe packet
Returns
the text string

Definition at line 68 of file test-asn1-encoding.cc.

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

+ Here is the call graph for this function:

◆ sprintPacketContentsHex()

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

Function to convert packet contents in hex format.

Parameters
pktthe packet
Returns
the text string

Definition at line 50 of file test-asn1-encoding.cc.

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

+ Here is the call graph for this function:

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