21 #include "ns3/config.h" 
   22 #include "ns3/simulator.h" 
   23 #include "ns3/pointer.h" 
   25 #include "ns3/packet.h" 
   26 #include "ns3/node-container.h" 
   27 #include "ns3/net-device-container.h" 
   28 #include "ns3/error-model.h" 
   29 #include "ns3/rng-seed-manager.h" 
   30 #include "ns3/radio-bearer-stats-calculator.h" 
   31 #include "ns3/lte-rlc-header.h" 
   32 #include "ns3/lte-rlc-um.h" 
   33 #include "ns3/config-store.h" 
   35 #include "lte-test-rlc-am-e2e.h" 
   36 #include "lte-simple-helper.h" 
   37 #include "lte-test-entities.h" 
   58   double losses[] = {0.0, 0.10, 0.25, 0.50, 0.75, 0.90, 0.95};
 
   59   uint32_t seeds[] = {1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 10101};
 
   61   for ( uint32_t l = 0 ; l < (
sizeof (losses) / 
sizeof (
double)) ; l++ )
 
   63       for ( uint32_t s = 0 ; s < (
sizeof (seeds) / 
sizeof (uint32_t)) ; s++ )
 
   65           std::ostringstream name;
 
   66           name << 
" Losses = " << losses[l] * 100 << 
"%. Seed = " << seeds[s];
 
   70               testDuration = TestCase::QUICK;
 
   88 LteRlcAmE2eTestCase::LteRlcAmE2eTestCase (std::string name, uint32_t seed, 
double losses)
 
  100 LteRlcAmE2eTestCase::~LteRlcAmE2eTestCase ()
 
  106 LteRlcAmE2eTestCase::DlDropEvent (Ptr<const Packet> p)
 
  113 LteRlcAmE2eTestCase::UlDropEvent (Ptr<const Packet> p)
 
  122   uint16_t numberOfNodes = 1;
 
  143   lteSimpleHelper->SetAttribute (
"RlcEntity", 
StringValue (
"RlcAm"));
 
  148   enbNodes.
Create (numberOfNodes);
 
  149   ueNodes.
Create (numberOfNodes);
 
  168   dlEm->SetAttribute (
"ErrorRate", 
DoubleValue (m_losses));
 
  169   dlEm->SetAttribute (
"ErrorUnit", 
StringValue (
"ERROR_UNIT_PACKET"));
 
  176   ueLteDevs.
Get (0)->SetAttribute (
"ReceiveErrorModel", 
PointerValue (dlEm));
 
  177   ueLteDevs.
Get (0)->TraceConnectWithoutContext (
"PhyRxDrop", 
MakeCallback (&LteRlcAmE2eTestCase::DlDropEvent, 
this));
 
  182   lteSimpleHelper->m_enbRrc->SetArrivalTime (
Seconds (0.010));
 
  183   lteSimpleHelper->m_enbRrc->SetPduSize (100);
 
  186   lteSimpleHelper->m_enbMac->SetTxOppSize (150);
 
  187   lteSimpleHelper->m_enbMac->SetTxOppTime (
Seconds (0.005));
 
  188   lteSimpleHelper->m_enbMac->SetTxOpportunityMode (LteTestMac::RANDOM_MODE);
 
  191   lteSimpleHelper->m_ueMac->SetTxOppSize (140);
 
  192   lteSimpleHelper->m_ueMac->SetTxOppTime (
Seconds (0.015));
 
  193   lteSimpleHelper->m_ueMac->SetTxOpportunityMode (LteTestMac::RANDOM_MODE);
 
  203   uint32_t txEnbRrcPdus = lteSimpleHelper->m_enbRrc->GetTxPdus ();
 
  204   uint32_t rxUeRrcPdus = lteSimpleHelper->m_ueRrc->GetRxPdus ();
 
  217   NS_LOG_INFO (m_seed << 
"\t" << m_losses << 
"\t" << txEnbRrcPdus << 
"\t" << rxUeRrcPdus << 
"\t" << m_dlDrops);
 
  219   NS_TEST_ASSERT_MSG_EQ (txEnbRrcPdus, rxUeRrcPdus,
 
  220                          "TX PDUs (" << txEnbRrcPdus << 
") != RX PDUs (" << rxUeRrcPdus << 
")");
 
smart pointer class similar to boost::intrusive_ptr 
hold variables of type string 
Ptr< NetDevice > Get(uint32_t i) const 
Get the Ptr<NetDevice> stored in this container at a given index. 
#define NS_LOG_COMPONENT_DEFINE(name)
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
virtual void DoRun(void)
Implementation to actually run this test case. 
holds a vector of ns3::NetDevice pointers 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
static void Destroy(void)
TestDuration
How long the test takes to execute. 
keep track of a set of node pointers. 
hold objects of type Ptr<T> 
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual test case to this test suite. 
static void SetSeed(uint32_t seed)
set the seed it will duplicate the seed value 6 times 
Time Seconds(double seconds)
create ns3::Time instances in units of seconds. 
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer. 
Hold an floating point type.