A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 NS_LOG_COMPONENT_DEFINE ("LteTestPhyErrorModel");
57 
58 using namespace ns3;
59 
60 
62  : TestSuite ("lte-phy-error-model", SYSTEM)
63 {
64  NS_LOG_INFO ("creating LenaTestPhyErrorModelTestCase");
65 
66 
67  for (uint32_t rngRun = 1; rngRun <= 3; ++rngRun)
68  {
69 
70  // Tests on DL Control Channels (PCFICH+PDCCH)
71  // the tolerance is calculated with the following octave code:
72  //
73  // n = 1000; # TX packets
74  // for p=1-[0.007 0.045 0.206 0.343]
75  // tol = n*p - binoinv(0.001, n, p)
76  // endfor
77 
78  // 1 interfering eNB SINR -2.0 BLER 0.007 TB size 217
79  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (2, 1078, 0.007, 9,
80  Seconds (0.04), rngRun),
81  (rngRun == 1) ? TestCase::QUICK : TestCase::TAKES_FOREVER);
82  // 2 interfering eNBs SINR -4.0 BLER 0.037 TB size 217
83  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (3, 1040, 0.045, 21,
84  Seconds (0.04), rngRun),
85  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
86  // 3 interfering eNBs SINR -6.0 BLER 0.21 TB size 133
87  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (4, 1250, 0.206, 40,
88  Seconds (0.12), rngRun),
89  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
90  // 4 interfering eNBs SINR -7.0 BLER 0.34 TB size 133
91  AddTestCase (new LenaDlCtrlPhyErrorModelTestCase (5, 1260, 0.343, 47,
92  Seconds (0.12), rngRun),
93  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
94 
95  // Tests on DL Data channels (PDSCH)
96  // the tolerance is calculated with the following octave code:
97  //
98  // n = 1000; # TX packets
99  // for p=1-[0.33 0.11 0.2 0.3 0.55 0.14]
100  // tol = n*p - binoinv(0.005, n, p)
101  // endfor
102 
103  // MCS 2 TB size of 256 bits BLER 0.33 SINR -5.51
104  AddTestCase (new LenaDataPhyErrorModelTestCase (4, 1800, 0.33, 39,
105  Seconds (0.04), rngRun),
106  (rngRun == 1) ? TestCase::QUICK : TestCase::TAKES_FOREVER);
107  // MCS 2 TB size of 528 bits BLER 0.11 SINR -5.51
108  AddTestCase (new LenaDataPhyErrorModelTestCase (2, 1800, 0.11, 26,
109  Seconds (0.04), rngRun),
110  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
111  // MCS 2 TB size of 1088 bits BLER 0.02 SINR -5.51
112  AddTestCase (new LenaDataPhyErrorModelTestCase (1, 1800, 0.02, 33,
113  Seconds (0.04), rngRun),
114  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
115  // MCS 12 TB size of 4800 bits BLER 0.3 SINR 4.43
116  AddTestCase (new LenaDataPhyErrorModelTestCase (1, 600, 0.3, 38,
117  Seconds (0.04), rngRun),
118  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
119  // MCS 12 TB size of 1632 bits BLER 0.55 SINR 4.43
120  AddTestCase (new LenaDataPhyErrorModelTestCase (3, 600, 0.55, 40,
121  Seconds (0.04), rngRun),
122  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
123  // MCS 16 TB size of 7272 bits (3648 x 3584) BLER 0.14 SINR 8.48
124  // BLER 0.14 = 1 - ((1-0.075)*(1-0.075))
125  AddTestCase (new LenaDataPhyErrorModelTestCase (1, 470, 0.14, 29,
126  Seconds (0.04), rngRun),
127  (rngRun == 1) ? TestCase::EXTENSIVE : TestCase::TAKES_FOREVER);
128 
129  }
130 
131 }
132 
134 
135 std::string
136 LenaDataPhyErrorModelTestCase::BuildNameString (uint16_t nUser, uint16_t dist, uint32_t rngRun)
137 {
138  std::ostringstream oss;
139  oss << "DataPhyErrorModel " << nUser << " UEs, distance " << dist << " m, RngRun " << rngRun;
140  return oss.str ();
141 }
142 
144  uint16_t nUser, uint16_t dist, double blerRef,
145  uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
146  : TestCase (BuildNameString (nUser, dist, rngRun)),
147  m_nUser (nUser),
148  m_dist (dist),
149  m_blerRef (blerRef),
150  m_toleranceRxPackets (toleranceRxPackets),
151  m_statsStartTime (statsStartTime),
152  m_rngRun (rngRun)
153 {
154 }
155 
157 {
158 }
159 
160 void
162 {
163 
164  double ber = 0.03;
165  Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (ber));
166  Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
167  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
168  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (true));
169  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
171 
172  //Disable Uplink Power Control
173  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
174 
175  /*
176  * Initialize Simulation Scenario: 1 eNB and m_nUser UEs
177  */
178 
179  int64_t stream = 1;
180  Ptr<LteHelper> lena = CreateObject<LteHelper> ();
181 
182  // Create Nodes: eNodeB and UE
183  NodeContainer enbNodes;
184  NodeContainer ueNodes;
185  enbNodes.Create (1);
186  ueNodes.Create (m_nUser);
187 
188  // Install Mobility Model
189  MobilityHelper mobility;
190  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
191  mobility.Install (enbNodes);
192  BuildingsHelper::Install (enbNodes);
193  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
194  mobility.Install (ueNodes);
195  BuildingsHelper::Install (ueNodes);
196 
197  // remove random shadowing component
198  lena->SetAttribute ("PathlossModel", StringValue ("ns3::HybridBuildingsPropagationLossModel"));
199  lena->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0));
200  lena->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0));
201  lena->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0));
202 
203  // Create Devices and install them in the Nodes (eNB and UE)
204  NetDeviceContainer enbDevs;
205  NetDeviceContainer ueDevs;
206  lena->SetSchedulerType ("ns3::RrFfMacScheduler");
207  lena->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
208 
209  enbDevs = lena->InstallEnbDevice (enbNodes);
210  stream += lena->AssignStreams (enbDevs, stream);
211  ueDevs = lena->InstallUeDevice (ueNodes);
212  stream += lena->AssignStreams (ueDevs, stream);
213 
214  // Attach a UE to a eNB
215  lena->Attach (ueDevs, enbDevs.Get (0));
216 
217  // Activate an EPS bearer
218  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
219  EpsBearer bearer (q);
220  lena->ActivateDataRadioBearer (ueDevs, bearer);
221 
222 
223  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ();
224  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
225  enbPhy->SetAttribute ("TxPower", DoubleValue (43.0));
226  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
227  // place the HeNB over the default rooftop level (20 mt.)
228  Ptr<MobilityModel> mm = enbNodes.Get (0)->GetObject<MobilityModel> ();
229  mm->SetPosition (Vector (0.0, 0.0, 30.0));
230 
231  // Set UEs' position and power
232  for (int i = 0; i < m_nUser; i++)
233  {
234  Ptr<MobilityModel> mm = ueNodes.Get (i)->GetObject<MobilityModel> ();
235  mm->SetPosition (Vector (m_dist, 0.0, 1.0));
236  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (i)->GetObject<LteUeNetDevice> ();
237  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
238  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
239  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
240  }
241 
242  Time statsDuration = Seconds (1.0);
243  Simulator::Stop (m_statsStartTime + statsDuration - Seconds (0.0001));
244 
245  lena->EnableRlcTraces ();
246  Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats ();
247  rlcStats->SetAttribute ("StartTime", TimeValue (m_statsStartTime));
248  rlcStats->SetAttribute ("EpochDuration", TimeValue (statsDuration));
249 
250  Simulator::Run ();
251 
252  NS_LOG_INFO ("\tTest downlink data shared channels (PDSCH)");
253  NS_LOG_INFO ("Test with " << m_nUser << " user(s) at distance " << m_dist << " expected BLER " << m_blerRef);
254  for (int i = 0; i < m_nUser; i++)
255  {
256  // get the imsi
257  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
258  uint8_t lcId = 3;
259 
260  double dlRxPackets = rlcStats->GetDlRxPackets (imsi, lcId);
261  double dlTxPackets = rlcStats->GetDlTxPackets (imsi, lcId);
262  double dlBler = 1.0 - (dlRxPackets/dlTxPackets);
263  double expectedDlRxPackets = dlTxPackets -dlTxPackets*m_blerRef;
264  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " DOWNLINK"
265  << " pkts rx " << dlRxPackets << " tx " << dlTxPackets
266  << " BLER " << dlBler << " Err " << std::fabs (m_blerRef - dlBler)
267  << " expected rx " << expectedDlRxPackets
268  << " difference " << std::abs (expectedDlRxPackets - dlRxPackets)
269  << " tolerance " << m_toleranceRxPackets);
270  NS_UNUSED (dlBler);
271 
272  // sanity check for whether the tx packets reported by the stats are correct
273  // we expect one packet per TTI
274  double expectedDlTxPackets = statsDuration.GetMilliSeconds ();
275  NS_TEST_ASSERT_MSG_EQ_TOL (dlTxPackets, expectedDlTxPackets, expectedDlTxPackets * 0.005,
276  " too different DL TX packets reported");
277 
278  // this is the main test condition: check that the RX packets are within the expected range
279  NS_TEST_ASSERT_MSG_EQ_TOL (dlRxPackets, expectedDlRxPackets, m_toleranceRxPackets,
280  " too different DL RX packets reported");
281  }
282 
283 
284  Simulator::Destroy ();
285 }
286 
287 
288 
289 
290 std::string
291 LenaDlCtrlPhyErrorModelTestCase::BuildNameString (uint16_t nEnb, uint16_t dist, uint32_t rngRun)
292 {
293  std::ostringstream oss;
294  oss << "DlCtrlPhyErrorModel " << nEnb << " eNBs, distance " << dist << " m, RngRun " << rngRun;
295  return oss.str ();
296 }
297 
298 
300  uint16_t nEnb, uint16_t dist, double blerRef,
301  uint16_t toleranceRxPackets, Time statsStartTime, uint32_t rngRun)
302  : TestCase (BuildNameString (nEnb, dist, rngRun)),
303  m_nEnb (nEnb),
304  m_dist (dist),
305  m_blerRef (blerRef),
306  m_toleranceRxPackets (toleranceRxPackets),
307  m_statsStartTime (statsStartTime),
308  m_rngRun (rngRun)
309 {
310 }
311 
313 {
314 }
315 
316 void
318 {
319 
320  double ber = 0.03;
321  Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (ber));
322  Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
323  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (true));
324  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
325  Config::SetDefault ("ns3::RrFfMacScheduler::HarqEnabled", BooleanValue (false));
327 
328  //Disable Uplink Power Control
329  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (false));
330 
331  /*
332  * Initialize Simulation Scenario: 1 eNB and m_nUser UEs
333  */
334 
335  int64_t stream = 1;
336  Ptr<LteHelper> lena = CreateObject<LteHelper> ();
337 
338  // Create Nodes: eNodeB and UE
339  NodeContainer enbNodes;
340  NodeContainer ueNodes;
341  enbNodes.Create (m_nEnb);
342  ueNodes.Create (1);
343 
344  // Install Mobility Model
345  MobilityHelper mobility;
346  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
347  mobility.Install (enbNodes);
348  BuildingsHelper::Install (enbNodes);
349  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
350  mobility.Install (ueNodes);
351  BuildingsHelper::Install (ueNodes);
352 
353  // remove random shadowing component
354  lena->SetAttribute ("PathlossModel", StringValue ("ns3::HybridBuildingsPropagationLossModel"));
355  lena->SetPathlossModelAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0));
356  lena->SetPathlossModelAttribute ("ShadowSigmaIndoor", DoubleValue (0.0));
357  lena->SetPathlossModelAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0));
358 
359  // Create Devices and install them in the Nodes (eNB and UE)
360  NetDeviceContainer enbDevs;
361  NetDeviceContainer ueDevs;
362  lena->SetSchedulerType ("ns3::RrFfMacScheduler");
363  lena->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
364 
365  enbDevs = lena->InstallEnbDevice (enbNodes);
366  stream += lena->AssignStreams (enbDevs, stream);
367  ueDevs = lena->InstallUeDevice (ueNodes);
368  stream += lena->AssignStreams (ueDevs, stream);
369 
370  // Attach a UE to one eNB (the others are interfering ones)
371  lena->Attach (ueDevs, enbDevs.Get (0));
372 
373  // Activate an EPS bearer
374  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
375  EpsBearer bearer (q);
376  lena->ActivateDataRadioBearer (ueDevs, bearer);
377 
378  // Set UEs' position and power
379  for (int i = 0; i < m_nEnb; i++)
380  {
381  // place the HeNB over the default rooftop level (20 mt.)
382  Ptr<MobilityModel> mm = enbNodes.Get (i)->GetObject<MobilityModel> ();
383  mm->SetPosition (Vector (0.0, 0.0, 30.0));
384  Ptr<LteEnbNetDevice> lteEnbDev = enbDevs.Get (i)->GetObject<LteEnbNetDevice> ();
385  Ptr<LteEnbPhy> enbPhy = lteEnbDev->GetPhy ();
386  enbPhy->SetAttribute ("TxPower", DoubleValue (43.0));
387  enbPhy->SetAttribute ("NoiseFigure", DoubleValue (5.0));
388  }
389 
390  // Set UEs' position and power
391  Ptr<MobilityModel> mm = ueNodes.Get (0)->GetObject<MobilityModel> ();
392  mm->SetPosition (Vector (m_dist, 0.0, 1.0));
393  Ptr<LteUeNetDevice> lteUeDev = ueDevs.Get (0)->GetObject<LteUeNetDevice> ();
394  Ptr<LteUePhy> uePhy = lteUeDev->GetPhy ();
395  uePhy->SetAttribute ("TxPower", DoubleValue (23.0));
396  uePhy->SetAttribute ("NoiseFigure", DoubleValue (9.0));
397 
398  Time statsDuration = Seconds (1.0);
399  Simulator::Stop (m_statsStartTime + statsDuration - Seconds (0.0001));
400 
401  lena->EnableRlcTraces ();
402  Ptr<RadioBearerStatsCalculator> rlcStats = lena->GetRlcStats ();
403  rlcStats->SetAttribute ("StartTime", TimeValue (m_statsStartTime));
404  rlcStats->SetAttribute ("EpochDuration", TimeValue (statsDuration));
405 
406  Simulator::Run ();
407 
408  NS_LOG_INFO ("\tTest downlink control channels (PCFICH+PDCCH)");
409  NS_LOG_INFO ("Test with " << m_nEnb << " eNB(s) at distance " << m_dist << " expected BLER " << m_blerRef);
410  int nUser = 1;
411  for (int i = 0; i < nUser; i++)
412  {
413  // get the imsi
414  uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi ();
415  uint8_t lcId = 3;
416  double dlRxPackets = rlcStats->GetDlRxPackets (imsi, lcId);
417  double dlTxPackets = rlcStats->GetDlTxPackets (imsi, lcId);
418  double dlBler = 1.0 - (dlRxPackets/dlTxPackets);
419  double expectedDlRxPackets = dlTxPackets -dlTxPackets*m_blerRef;
420  NS_LOG_INFO ("\tUser " << i << " imsi " << imsi << " DOWNLINK"
421  << " pkts rx " << dlRxPackets << " tx " << dlTxPackets
422  << " BLER " << dlBler << " Err " << std::fabs (m_blerRef - dlBler)
423  << " expected rx " << expectedDlRxPackets
424  << " difference " << std::abs (expectedDlRxPackets - dlRxPackets)
425  << " tolerance " << m_toleranceRxPackets);
426  NS_UNUSED (dlBler);
427 
428  // sanity check for whether the tx packets reported by the stats are correct
429  // we expect one packet per TTI
430  double expectedDlTxPackets = statsDuration.GetMilliSeconds ();
431  NS_TEST_ASSERT_MSG_EQ_TOL (dlTxPackets, expectedDlTxPackets, expectedDlTxPackets * 0.005,
432  " too different DL TX packets reported");
433 
434  // this is the main test condition: check that the RX packets are within the expected range
435  NS_TEST_ASSERT_MSG_EQ_TOL (dlRxPackets, expectedDlRxPackets, m_toleranceRxPackets,
436  "too different DL RX packets reported");
437 
438  }
439 
440  Simulator::Destroy ();
441 }
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:95
void SetPathlossModelAttribute(std::string n, const AttributeValue &v)
set an attribute for the pathloss model to be created
Definition: lte-helper.cc:299
Hold a bool native type.
Definition: boolean.h:38
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB devices
Definition: lte-helper.cc:382
hold variables of type string
Definition: string.h:18
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
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)
A suite of tests to run.
Definition: test.h:1289
static LenaTestPhyErrorModelSuite lenaTestPhyErrorModelSuite
Ptr< LteEnbPhy > GetPhy(void) const
Hold a signed integer type.
Definition: integer.h:45
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:709
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:170
void EnableRlcTraces(void)
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:1019
uint32_t GetDlRxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of received downlink data bytes.
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)
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:223
encapsulates test code
Definition: test.h:1113
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Definition: lte-helper.cc:1027
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Call ActivateDataRadioBearer (ueDevice, bearer) for each UE device in a given set.
Definition: lte-helper.cc:963
a 3d vector
Definition: vector.h:31
void SetSchedulerType(std::string type)
Definition: lte-helper.cc:225
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.
Keep track of the current position and velocity of an object.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
hold variables of type 'enum'
Definition: enum.h:37
Attribute for objects of type ns3::Time.
Definition: nstime.h:912
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
set an attribute for the scheduler to be created
Definition: lte-helper.cc:239
holds a vector of ns3::NetDevice pointers
#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:355
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:677
keep track of a set of node pointers.
static std::string BuildNameString(uint16_t nUser, uint16_t dist, uint32_t rngRun)
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
Definition: test.cc:184
void SetPosition(const Vector &position)
Ptr< RadioBearerStatsCalculator > GetRlcStats(void)
Definition: lte-helper.cc:1150
NetDeviceContainer InstallUeDevice(NodeContainer c)
create a set of UE devices
Definition: lte-helper.cc:397
Helper class used to assign positions and mobility models to nodes.
uint32_t GetDlTxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted downlink data bytes.
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:845
#define NS_UNUSED(x)
Definition: unused.h:5
static std::string BuildNameString(uint16_t nUser, uint16_t dist, uint32_t rngRun)
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< LteUePhy > GetPhy(void) const
Hold a floating point type.
Definition: double.h:41
void SetAttribute(std::string name, const AttributeValue &value)
Definition: object-base.cc:176
The eNodeB device implementation.
Ptr< T > GetObject(void) const
Definition: object.h:362
void SetGlobal(std::string name, const AttributeValue &value)
Definition: config.cc:717
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Definition: nstime.h:326
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.