11#include "ns3/lte-rlc-am-header.h" 
   12#include "ns3/packet.h" 
   41        std::vector<uint8_t> buffer(pkt->GetSize());
 
   42        std::ostringstream oss(std::ostringstream::out);
 
   43        pkt->CopyData(buffer.data(), buffer.size());
 
   46            oss << std::setfill(
'0') << std::setw(2) << std::hex << (
uint32_t)b;
 
 
   58        std::vector<uint8_t> buffer(pkt->GetSize());
 
   59        std::ostringstream oss(std::ostringstream::out);
 
   60        pkt->CopyData(buffer.data(), buffer.size());
 
   63            oss << (std::bitset<8>(b));
 
   65        return std::string(oss.str() + 
"\n");
 
 
   74        NS_LOG_DEBUG(
"---- SERIALIZED PACKET CONTENTS (HEX): -------");
 
 
   87        NS_LOG_DEBUG(
"--------- " << s.data() << 
" INFO: -------");
 
   88        std::ostringstream oss(std::ostringstream::out);
 
 
 
  110                           std::list<SequenceNumber10> nackSnList,
 
  114    void DoRun() 
override;
 
 
  122                                               std::list<SequenceNumber10> nackSnList,
 
  126      m_nackSnList(nackSnList),
 
 
  152                          "serialized packet content " << hex << 
" differs from test vector " 
  166                              "deserialized NACK SN  differs from test vector");
 
 
  190        std::list<SequenceNumber10> nackSnList;
 
  191        std::string hex(
"0020");
 
  197        std::list<SequenceNumber10> nackSnList;
 
  198        std::string hex(
"0da4");
 
  204        const std::list<SequenceNumber10> nackSnList{
 
  207        std::string hex(
"000bb480");
 
  213        const std::list<SequenceNumber10> nackSnList{
 
  217        std::string hex(
"000bfed790");
 
  223        const std::list<SequenceNumber10> nackSnList{
 
  228        std::string hex(
"000bfed795d980");
 
  234        const std::list<SequenceNumber10> nackSnList{
 
  240        std::string hex(
"000bfed795d9cad8");
 
 
Smart pointer class similar to boost::intrusive_ptr.
Rlc Am Status Pdu Test Case.
std::string m_hex
hex string
std::list< SequenceNumber10 > m_nackSnList
list of nack sequence numbers
void DoRun() override
Implementation to actually run this TestCase.
RlcAmStatusPduTestCase(SequenceNumber10 ackSn, std::list< SequenceNumber10 > nackSnList, std::string hex)
Constructor.
SequenceNumber10 m_ackSn
ack sequence number
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static std::string sprintPacketContentsBin(Ptr< Packet > pkt)
Function to convert packet contents in binary format.
static std::string sprintPacketContentsHex(Ptr< Packet > pkt)
Function to convert packet contents in hex format.
static void LogPacketInfo(T source, std::string s)
Log packet info function.
static void LogPacketContents(Ptr< Packet > pkt)
Function to log packet contents.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
ns3::LteRlcHeaderTestSuite staticLteRlcHeaderTestSuiteInstance
the test suite
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
#define NS_TEST_ASSERT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report and abort if not.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report and abort if not.
Every class exported by the ns3 library is enclosed in the ns3 namespace.