A Discrete-Event Network Simulator
API
lte-test-phy-error-model.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011-2013 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Marco Miozzo <marco.miozzo@cttc.es>
19  * Nicola Baldo <nbaldo@cttc.es>
20  */
21 
22 #include <ns3/object.h>
23 #include <ns3/spectrum-interference.h>
24 #include <ns3/spectrum-error-model.h>
25 #include <ns3/log.h>
26 #include <ns3/test.h>
27 #include <ns3/simulator.h>
28 #include <ns3/packet.h>
29 #include <ns3/ptr.h>
30 #include <iostream>
31 #include <ns3/radio-bearer-stats-calculator.h>
32 #include <ns3/mobility-building-info.h>
33 #include <ns3/hybrid-buildings-propagation-loss-model.h>
34 #include <ns3/eps-bearer.h>
35 #include <ns3/node-container.h>
36 #include <ns3/mobility-helper.h>
37 #include <ns3/net-device-container.h>
38 #include <ns3/lte-ue-net-device.h>
39 #include <ns3/lte-enb-net-device.h>
40 #include <ns3/lte-ue-rrc.h>
41 #include <ns3/lte-helper.h>
42 #include <ns3/string.h>
43 #include <ns3/double.h>
44 #include <ns3/lte-enb-phy.h>
45 #include <ns3/lte-ue-phy.h>
46 #include <ns3/config.h>
47 #include <ns3/boolean.h>
48 #include <ns3/enum.h>
49 #include <ns3/integer.h>
50 #include <ns3/unused.h>
51 #include <ns3/ff-mac-scheduler.h>
52 #include <ns3/buildings-helper.h>
53 
55 
56 using namespace ns3;
57 
58 NS_LOG_COMPONENT_DEFINE ("LteTestPhyErrorModel");
59 
61  : TestSuite ("lte-phy-error-model", SYSTEM)
62 {
63  NS_LOG_INFO ("creating LenaTestPhyErrorModelTestCase");
64 
65 
66  for (uint32_t rngRun = 1; rngRun <= 3; ++rngRun)
67  {
68 
69  // Tests on DL Control Channels (PCFICH+PDCCH)
70  // the tolerance is calculated with the following octave code:
71  //
72  // n = 1000; # TX packets
73  // for p=1-[0.007 0.045 0.206 0.343]
74  // tol = n*p - binoinv(0.001, n, p)
75  // endfor
76 
77  // 1 interfering eNB SINR -2.0 BLER 0.007 TB size 217
78  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (2, 1078, 0.007, 9,
79  Seconds (0.04), rngRun),
80  (rngRun == 1) ? TestCase::QUICK : TestCase::TAKES_FOREVER);
81  // 2 interfering eNBs SINR -4.0 BLER 0.037 TB size 217
82  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (3, 1040, 0.045, 21,
83  Seconds (0.04), rngRun),
84  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
85  // 3 interfering eNBs SINR -6.0 BLER 0.21 TB size 133
86  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (4, 1250, 0.206, 40,
87  Seconds (0.12), rngRun),
88  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
89  // 4 interfering eNBs SINR -7.0 BLER 0.34 TB size 133
90  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (5, 1260, 0.343, 47,
91  Seconds (0.12), rngRun),
92  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
93 
94  // Tests on DL Data channels (PDSCH)
95  // the tolerance is calculated with the following octave code:
96  //
97  // n = 1000; # TX packets
98  // for p=1-[0.33 0.11 0.2 0.3 0.55 0.14]
99  // tol = n*p - binoinv(0.005, n, p)
100  // endfor
101 
102  // MCS 2 TB size of 256 bits BLER 0.33 SINR -5.51
103  AddTestCase (new LenaDataPhyErrorModelTestCase (4, 1800, 0.33, 39,
104  Seconds (0.04), rngRun),
105  (rngRun == 1) ? TestCase::QUICK : TestCase::TAKES_FOREVER);
106  // MCS 2 TB size of 528 bits BLER 0.11 SINR -5.51
107  AddTestCase (new LenaDataPhyErrorModelTestCase (2, 1800, 0.11, 26,
108  Seconds (0.04), rngRun),
109  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
110  // MCS 2 TB size of 1088 bits BLER 0.02 SINR -5.51
111  AddTestCase (new LenaDataPhyErrorModelTestCase (1, 1800, 0.02, 33,
112  Seconds (0.04), rngRun),
113  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
114  // MCS 12 TB size of 4800 bits BLER 0.3 SINR 4.43
115  AddTestCase (new LenaDataPhyErrorModelTestCase (1, 600, 0.3, 38,
116  Seconds (0.04), rngRun),
117  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
118  // MCS 12 TB size of 1632 bits BLER 0.55 SINR 4.43
119  AddTestCase (new LenaDataPhyErrorModelTestCase (3, 600, 0.55, 40,
120  Seconds (0.04), rngRun),
121  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
122  // MCS 16 TB size of 7272 bits (3648 x 3584) BLER 0.14 SINR 8.48
123  // BLER 0.14 = 1 - ((1-0.075)*(1-0.075))
124  AddTestCase (new LenaDataPhyErrorModelTestCase (1, 470, 0.14, 29,
125  Seconds (0.04), rngRun),
126  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
127 
128  }
129 
130 }
131 
133 
134 std::string
135 LenaDataPhyErrorModelTestCase::BuildNameString (uint16_t nUser, uint16_t dist, uint32_t rngRun)
136 {
137  std::ostringstream oss;
138  oss << "DataPhyErrorModel " << nUser << " UEs, distance " << dist << " m, RngRun " << rngRun;
139  return oss.str ();
140 }
141 
143  uint16_t nUser, uint16_t dist, double blerRef,
144  uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
145  : TestCase (BuildNameString (nUser, dist, rngRun)),
146  m_nUser (nUser),
147  m_dist (dist),
148  m_blerRef (blerRef),
149  m_toleranceRxPackets (toleranceRxPackets),
150  m_statsStartTime (statsStartTime),
151  m_rngRun (rngRun)
152 {
153 }
154 
156 {
157 }
158 
159 void
161 {
162 
163  double ber = 0.03;
164  Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (ber));
165  Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
166  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
167  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (true));
168  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
170 
171  //Disable Uplink Power Control
172  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
173 
174  /*
175  * Initialize Simulation Scenario: 1 eNB and m_nUser UEs
176  */
177 
178  int64_t stream = 1;
179  Ptr<LteHelper> lena = CreateObject<LteHelper> ();
180 
181  // Create Nodes: eNodeB and UE
182  NodeContainer enbNodes;
183  NodeContainer ueNodes;
184  enbNodes.Create (1);
185  ueNodes.Create (m_nUser);
186 
187  // Install Mobility Model
189  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
190  mobility.Install (enbNodes);
191  BuildingsHelper::Install (enbNodes);
192  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
193  mobility.Install (ueNodes);
194  BuildingsHelper::Install (ueNodes);
195 
196  // remove random shadowing component
197  lena->SetAttribute ("PathlossModel", StringValue ("ns3::HybridBuildingsPropagationLossModel"));
198  lena->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0));
199  lena->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0));
200  lena->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0));
201 
202  // Create Devices and install them in the Nodes (eNB and UE)
203  NetDeviceContainer enbDevs;
204  NetDeviceContainer ueDevs;
205  lena->SetSchedulerType ("ns3::RrFfMacScheduler");
206  lena->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
207 
208  enbDevs = lena->InstallEnbDevice (enbNodes);
209  stream += lena->AssignStreams (enbDevs, stream);
210  ueDevs = lena->InstallUeDevice (ueNodes);
211  stream += lena->AssignStreams (ueDevs, stream);
212 
213  // Attach a UE to a eNB
214  lena->Attach (ueDevs, enbDevs.Get (0));
215 
216  // Activate an EPS bearer
217  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
218  EpsBearer bearer (q);
219  lena->ActivateDataRadioBearer (ueDevs, bearer);
220 
221 
222  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
223  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
224  enbPhy->SetAttribute ("TxPower", DoubleValue (43.0));
225  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
226  // place the HeNB over the default rooftop level (20 mt.)
227  Ptr<MobilityModel> mm = enbNodes.Get (0)->GetObject<MobilityModel> ();
228  mm->SetPosition (Vector (0.0, 0.0, 30.0));
229 
230  // Set UEs' position and power
231  for (int i = 0; i < m_nUser; i++)
232  {
233  Ptr<MobilityModel> mm1 = ueNodes.Get (i)->GetObject<MobilityModel> ();
234  mm1->SetPosition (Vector (m_dist, 0.0, 1.0));
235  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (i)->GetObject<LteUeNetDevice> ();
236  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
237  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
238  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
239  }
240 
241  Time statsDuration = Seconds (1.0);
242  Simulator::Stop (m_statsStartTime + statsDuration - Seconds (0.0001));
243 
244  lena->EnableRlcTraces ();
245  Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats ();
246  rlcStats->SetAttribute ("StartTime", TimeValue (m_statsStartTime));
247  rlcStats->SetAttribute ("EpochDuration", TimeValue (statsDuration));
248 
249  Simulator::Run ();
250 
251  NS_LOG_INFO ("\tTest downlink data shared channels (PDSCH)");
252  NS_LOG_INFO ("Test with " << m_nUser << " user(s) at distance " << m_dist << " expected BLER " << m_blerRef);
253  for (int i = 0; i < m_nUser; i++)
254  {
255  // get the imsi
256  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
257  uint8_t lcId = 3;
258 
259  double dlRxPackets = rlcStats->GetDlRxPackets (imsi, lcId);
260  double dlTxPackets = rlcStats->GetDlTxPackets (imsi, lcId);
261  double dlBler = 1.0 - (dlRxPackets/dlTxPackets);
262  double expectedDlRxPackets = dlTxPackets -dlTxPackets*m_blerRef;
263  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " DOWNLINK"
264  << " pkts rx " << dlRxPackets << " tx " << dlTxPackets
265  << " BLER " << dlBler << " Err " << std::fabs (m_blerRef - dlBler)
266  << " expected rx " << expectedDlRxPackets
267  << " difference " << std::abs (expectedDlRxPackets - dlRxPackets)
268  << " tolerance " << m_toleranceRxPackets);
269  NS_UNUSED (dlBler);
270 
271  // sanity check for whether the tx packets reported by the stats are correct
272  // we expect one packet per TTI
273  double expectedDlTxPackets = static_cast<double> (statsDuration.GetMilliSeconds ());
274  NS_TEST_ASSERT_MSG_EQ_TOL (dlTxPackets, expectedDlTxPackets, expectedDlTxPackets * 0.005,
275  " too different DL TX packets reported");
276 
277  // this is the main test condition: check that the RX packets are within the expected range
278  NS_TEST_ASSERT_MSG_EQ_TOL (dlRxPackets, expectedDlRxPackets, m_toleranceRxPackets,
279  " too different DL RX packets reported");
280  }
281 
282 
283  Simulator::Destroy ();
284 }
285 
286 
287 
288 
289 std::string
290 LenaDlCtrlPhyErrorModelTestCase::BuildNameString (uint16_t nEnb, uint16_t dist, uint32_t rngRun)
291 {
292  std::ostringstream oss;
293  oss << "DlCtrlPhyErrorModel " << nEnb << " eNBs, distance " << dist << " m, RngRun " << rngRun;
294  return oss.str ();
295 }
296 
297 
299  uint16_t nEnb, uint16_t dist, double blerRef,
300  uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
301  : TestCase (BuildNameString (nEnb, dist, rngRun)),
302  m_nEnb (nEnb),
303  m_dist (dist),
304  m_blerRef (blerRef),
305  m_toleranceRxPackets (toleranceRxPackets),
306  m_statsStartTime (statsStartTime),
307  m_rngRun (rngRun)
308 {
309 }
310 
312 {
313 }
314 
315 void
317 {
318 
319  double ber = 0.03;
320  Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (ber));
321  Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
322  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (true));
323  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
324  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
326 
327  //Disable Uplink Power Control
328  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
329 
330  /*
331  * Initialize Simulation Scenario: 1 eNB and m_nUser UEs
332  */
333 
334  int64_t stream = 1;
335  Ptr<LteHelper> lena = CreateObject<LteHelper> ();
336 
337  // Create Nodes: eNodeB and UE
338  NodeContainer enbNodes;
339  NodeContainer ueNodes;
340  enbNodes.Create (m_nEnb);
341  ueNodes.Create (1);
342 
343  // Install Mobility Model
345  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
346  mobility.Install (enbNodes);
347  BuildingsHelper::Install (enbNodes);
348  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
349  mobility.Install (ueNodes);
350  BuildingsHelper::Install (ueNodes);
351 
352  // remove random shadowing component
353  lena->SetAttribute ("PathlossModel", StringValue ("ns3::HybridBuildingsPropagationLossModel"));
354  lena->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0));
355  lena->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0));
356  lena->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0));
357 
358  // Create Devices and install them in the Nodes (eNB and UE)
359  NetDeviceContainer enbDevs;
360  NetDeviceContainer ueDevs;
361  lena->SetSchedulerType ("ns3::RrFfMacScheduler");
362  lena->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
363 
364  enbDevs = lena->InstallEnbDevice (enbNodes);
365  stream += lena->AssignStreams (enbDevs, stream);
366  ueDevs = lena->InstallUeDevice (ueNodes);
367  stream += lena->AssignStreams (ueDevs, stream);
368 
369  // Attach a UE to one eNB (the others are interfering ones)
370  lena->Attach (ueDevs, enbDevs.Get (0));
371 
372  // Activate an EPS bearer
373  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
374  EpsBearer bearer (q);
375  lena->ActivateDataRadioBearer (ueDevs, bearer);
376 
377  // Set UEs' position and power
378  for (int i = 0; i < m_nEnb; i++)
379  {
380  // place the HeNB over the default rooftop level (20 mt.)
381  Ptr<MobilityModel> mm = enbNodes.Get (i)->GetObject<MobilityModel> ();
382  mm->SetPosition (Vector (0.0, 0.0, 30.0));
383  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (i)->GetObject<LteEnbNetDevice> ();
384  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
385  enbPhy->SetAttribute ("TxPower", DoubleValue (43.0));
386  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
387  }
388 
389  // Set UEs' position and power
390  Ptr<MobilityModel> mm = ueNodes.Get (0)->GetObject<MobilityModel> ();
391  mm->SetPosition (Vector (m_dist, 0.0, 1.0));
392  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (0)->GetObject<LteUeNetDevice> ();
393  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
394  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
395  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
396 
397  Time statsDuration = Seconds (1.0);
398  Simulator::Stop (m_statsStartTime + statsDuration - Seconds (0.0001));
399 
400  lena->EnableRlcTraces ();
401  Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats ();
402  rlcStats->SetAttribute ("StartTime", TimeValue (m_statsStartTime));
403  rlcStats->SetAttribute ("EpochDuration", TimeValue (statsDuration));
404 
405  Simulator::Run ();
406 
407  NS_LOG_INFO ("\tTest downlink control channels (PCFICH+PDCCH)");
408  NS_LOG_INFO ("Test with " << m_nEnb << " eNB(s) at distance " << m_dist << " expected BLER " << m_blerRef);
409  int nUser = 1;
410  for (int i = 0; i < nUser; i++)
411  {
412  // get the imsi
413  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
414  uint8_t lcId = 3;
415  double dlRxPackets = rlcStats->GetDlRxPackets (imsi, lcId);
416  double dlTxPackets = rlcStats->GetDlTxPackets (imsi, lcId);
417  double dlBler = 1.0 - (dlRxPackets/dlTxPackets);
418  double expectedDlRxPackets = dlTxPackets -dlTxPackets*m_blerRef;
419  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " DOWNLINK"
420  << " pkts rx " << dlRxPackets << " tx " << dlTxPackets
421  << " BLER " << dlBler << " Err " << std::fabs (m_blerRef - dlBler)
422  << " expected rx " << expectedDlRxPackets
423  << " difference " << std::abs (expectedDlRxPackets - dlRxPackets)
424  << " tolerance " << m_toleranceRxPackets);
425  NS_UNUSED (dlBler);
426 
427  // sanity check for whether the tx packets reported by the stats are correct
428  // we expect one packet per TTI
429  double expectedDlTxPackets = static_cast<double> (statsDuration.GetMilliSeconds ());
430  NS_TEST_ASSERT_MSG_EQ_TOL (dlTxPackets, expectedDlTxPackets, expectedDlTxPackets * 0.005,
431  " too different DL TX packets reported");
432 
433  // this is the main test condition: check that the RX packets are within the expected range
434  NS_TEST_ASSERT_MSG_EQ_TOL (dlRxPackets, expectedDlRxPackets, m_toleranceRxPackets,
435  "too different DL RX packets reported");
436 
437  }
438 
439  Simulator::Destroy ();
440 }
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
void SetPathlossModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the path loss models to be created.
Definition: lte-helper.cc:393
AttributeValue implementation for Boolean.
Definition: boolean.h:36
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:474
Hold variables of type string.
Definition: string.h:41
virtual void DoRun(void)
Implementation to actually run this TestCase.
LenaDlCtrlPhyErrorModelTestCase(uint16_t nEnb, uint16_t dist, double blerRef, uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
Constructor.
A suite of tests to run.
Definition: test.h:1342
static LenaTestPhyErrorModelSuite lenaTestPhyErrorModelSuite
double m_dist
the distance between nodes
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
Definition: lte-helper.cc:957
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:1431
uint32_t GetDlRxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of received downlink data bytes.
#define NS_UNUSED(x)
Mark a local variable as unused.
Definition: unused.h:36
Time m_statsStartTime
Extra time in the beginning of simulation to allow RRC connection establishment + SRS...
LenaDataPhyErrorModelTestCase(uint16_t nUser, uint16_t dist, double blerRef, uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
Constructor.
uint16_t m_nEnb
the number of ENB nodes
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:278
encapsulates test code
Definition: test.h:1155
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used.
Definition: lte-helper.cc:1439
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
Definition: lte-helper.cc:1310
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:279
mobility
Definition: third.py:101
This system test program creates different test cases with a single eNB and several UEs...
virtual void DoRun(void)
Implementation to actually run this TestCase.
double m_dist
the distance between nodes
Keep track of the current position and velocity of an object.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
Lena Dl Ctrl Phy Error Model Test Case.
uint16_t m_toleranceRxPackets
receive packet tolerance loss
Hold variables of type enum.
Definition: enum.h:54
AttributeValue implementation for Time.
Definition: nstime.h:1076
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:299
Hold an unsigned integer type.
Definition: uinteger.h:44
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
Definition: lte-helper.cc:293
uint16_t m_nUser
number of UE nodes
holds a vector of ns3::NetDevice pointers
Ptr< LteEnbPhy > GetPhy(void) const
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
Definition: test.h:380
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
Lena Test Phy Error Model Suite.
static std::string BuildNameString(uint16_t nUser, uint16_t dist, uint32_t rngRun)
Builds the test name string based on provided parameter values.
Ptr< LteUePhy > GetPhy(void) const
Get the Phy.
void SetPosition(const Vector &position)
Ptr< RadioBearerStatsCalculator > GetRlcStats(void)
Definition: lte-helper.cc:1568
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:489
Helper class used to assign positions and mobility models to nodes.
void SetGlobal(std::string name, const AttributeValue &value)
Definition: config.cc:822
uint32_t GetDlTxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted downlink data bytes.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:359
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1014
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:782
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
static std::string BuildNameString(uint16_t nUser, uint16_t dist, uint32_t rngRun)
Build name string.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
uint16_t m_toleranceRxPackets
receive packet tolerance loss
This class can be used to hold variables of floating point type such as &#39;double&#39; or &#39;float&#39;...
Definition: double.h:41
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:185
The eNodeB device implementation.
uint32_t m_rngRun
the rng run number
double m_blerRef
the expected BLER
Qci
QoS Class Indicator.
Definition: eps-bearer.h:77
Time m_statsStartTime
Extra time in the beginning of simulation to allow RRC connection establishment + SRS...
The LteUeNetDevice class implements the UE net device.