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