A Discrete-Event Network Simulator
API
lte-test-interference-fr.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Piotr Gawlowicz
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: Piotr Gawlowicz <gawlowicz.p@gmail.com>
19  * Based on lte-test-interference.{h,cc} by Manuel Requena <manuel.requena@cttc.es>
20  * Nicola Baldo <nbaldo@cttc.es>
21  */
22 
23 #include "ns3/simulator.h"
24 #include "ns3/log.h"
25 #include "ns3/string.h"
26 #include "ns3/double.h"
27 #include <ns3/enum.h>
28 #include "ns3/boolean.h"
29 #include <ns3/pointer.h>
30 #include "ns3/mobility-helper.h"
31 #include "ns3/lte-helper.h"
32 #include "ns3/ff-mac-scheduler.h"
33 
34 #include "ns3/lte-enb-phy.h"
35 #include "ns3/lte-enb-net-device.h"
36 
37 #include "ns3/lte-ue-phy.h"
38 #include "ns3/lte-ue-net-device.h"
39 
41 
43 
45 #include "ns3/spectrum-value.h"
46 #include "ns3/lte-spectrum-value-helper.h"
47 
48 
49 using namespace ns3;
50 
51 NS_LOG_COMPONENT_DEFINE ("LteInterferenceFrTest");
52 
58  : TestSuite ("lte-interference-fr", SYSTEM)
59 {
60 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_DEBUG);
61 // LogComponentEnable ("LteInterferenceFrTest", logLevel);
62 
63  AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=20", 50.000000, 20.000000, 356449.932732, 10803.280215), TestCase::QUICK);
64  AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=50", 50.000000, 50.000000, 356449.932732, 10803.280215), TestCase::QUICK);
65  AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=200", 50.000000, 200.000000, 356449.932732, 10803.280215), TestCase::QUICK);
66  AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=500", 50.000000, 500.000000, 356449.932732, 10803.280215), TestCase::QUICK);
67 
68  AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=20", 50.000000, 20.000000, 0.160000, 0.159998, 356449.932732, 10803.280215, 18), TestCase::QUICK);
69  AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=50", 50.000000, 50.000000, 0.999997, 0.999907, 356449.932732, 10803.280215, 28), TestCase::QUICK);
70  AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=200", 50.000000, 200.000000, 15.999282, 15.976339, 356449.932732, 10803.280215, 30), TestCase::QUICK);
71  AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=500", 50.000000, 500.000000, 99.971953, 99.082845, 356449.932732, 10803.280215, 30), TestCase::QUICK);
72 
73 }
74 
76 
77 
81 LteInterferenceHardFrTestCase::LteInterferenceHardFrTestCase (std::string name, double d1, double d2, double dlSinr, double ulSinr)
82  : TestCase ("Test: " + name),
83  m_d1 (d1),
84  m_d2 (d2),
85  m_dlSinrDb (10 * std::log10 (dlSinr)),
86  m_ulSinrDb (10 * std::log10 (ulSinr))
87 {
88  NS_LOG_INFO ("Creating LteInterferenceFrTestCase");
89 }
90 
92 {
93 }
94 
95 void
97 {
98  NS_LOG_INFO (this << GetName ());
99  NS_LOG_DEBUG ("LteInterferenceHardFrTestCase");
100 
101  Config::Reset ();
102  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (false));
103 
104  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
105  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
106  Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
107  Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
108 
109  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
110  lteHelper->SetFfrAlgorithmType ("ns3::LteFrHardAlgorithm");
111 
112  lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
113 
114  // Create Nodes: eNodeB and UE
115  NodeContainer enbNodes;
116  NodeContainer ueNodes1;
117  NodeContainer ueNodes2;
118  enbNodes.Create (2);
119  ueNodes1.Create (1);
120  ueNodes2.Create (1);
121  NodeContainer allNodes = NodeContainer ( enbNodes, ueNodes1, ueNodes2);
122 
123  // the topology is the following:
124  // d2
125  // UE1-----------eNB2
126  // | |
127  // d1| |d1
128  // | d2 |
129  // eNB1----------UE2
130  //
131  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
132  positionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
133  positionAlloc->Add (Vector (m_d2, m_d1, 0.0)); // eNB2
134  positionAlloc->Add (Vector (0.0, m_d1, 0.0)); // UE1
135  positionAlloc->Add (Vector (m_d2, 0.0, 0.0)); // UE2
136  MobilityHelper mobility;
137  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
138  mobility.SetPositionAllocator (positionAlloc);
139  mobility.Install (allNodes);
140 
141  // Create Devices and install them in the Nodes (eNB and UE)
142  NetDeviceContainer enbDevs;
143  NetDeviceContainer ueDevs1;
144  NetDeviceContainer ueDevs2;
145  lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
146  lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
147 
148  lteHelper->SetFfrAlgorithmAttribute ("DlSubBandOffset", UintegerValue (0));
149  lteHelper->SetFfrAlgorithmAttribute ("DlSubBandwidth", UintegerValue (12));
150  lteHelper->SetFfrAlgorithmAttribute ("UlSubBandOffset", UintegerValue (0));
151  lteHelper->SetFfrAlgorithmAttribute ("UlSubBandwidth", UintegerValue (25));
152  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (0)));
153 
154  lteHelper->SetFfrAlgorithmAttribute ("DlSubBandOffset", UintegerValue (12));
155  lteHelper->SetFfrAlgorithmAttribute ("DlSubBandwidth", UintegerValue (12));
156  lteHelper->SetFfrAlgorithmAttribute ("UlSubBandOffset", UintegerValue (0));
157  lteHelper->SetFfrAlgorithmAttribute ("UlSubBandwidth", UintegerValue (25));
158  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (1)));
159 
160  ueDevs1 = lteHelper->InstallUeDevice (ueNodes1);
161  ueDevs2 = lteHelper->InstallUeDevice (ueNodes2);
162 
163  lteHelper->Attach (ueDevs1, enbDevs.Get (0));
164  lteHelper->Attach (ueDevs2, enbDevs.Get (1));
165 
166  // Activate an EPS bearer
167  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
168  EpsBearer bearer (q);
169  lteHelper->ActivateDataRadioBearer (ueDevs1, bearer);
170  lteHelper->ActivateDataRadioBearer (ueDevs2, bearer);
171 
172  // Use testing chunk processor in the PHY layer
173  // It will be used to test that the SNR is as intended
174  // we plug in two instances, one for DL and one for UL
175 
176  Ptr<LtePhy> ue1Phy = ueDevs1.Get (0)->GetObject<LteUeNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
177  Ptr<LteTestSinrChunkProcessor> testDlSinr1 = Create<LteTestSinrChunkProcessor> ();
178  ue1Phy->GetDownlinkSpectrumPhy ()->AddDataSinrChunkProcessor (testDlSinr1);
179 
180  Ptr<LtePhy> enb1phy = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
181  Ptr<LteTestSinrChunkProcessor> testUlSinr1 = Create<LteTestSinrChunkProcessor> ();
182  enb1phy->GetUplinkSpectrumPhy ()->AddDataSinrChunkProcessor (testUlSinr1);
183 
184  // same as above for eNB2 and UE2
185 
186  Ptr<LtePhy> ue2Phy = ueDevs2.Get (0)->GetObject<LteUeNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
187  Ptr<LteTestSinrChunkProcessor> testDlSinr2 = Create<LteTestSinrChunkProcessor> ();
188  ue2Phy->GetDownlinkSpectrumPhy ()->AddDataSinrChunkProcessor (testDlSinr2);
189 
190  Ptr<LtePhy> enb2phy = enbDevs.Get (1)->GetObject<LteEnbNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
191  Ptr<LteTestSinrChunkProcessor> testUlSinr2 = Create<LteTestSinrChunkProcessor> ();
192  enb1phy->GetUplinkSpectrumPhy ()->AddDataSinrChunkProcessor (testUlSinr2);
193 
194 // need to allow for RRC connection establishment + SRS
195  Simulator::Stop (Seconds (0.200));
196  Simulator::Run ();
197 
198 
199  for (uint32_t i = 0; i < 12; i++)
200  {
201  double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
202  double dlSinr1Db = 10.0 * std::log10 (dlSinr1);
203  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr1Db, m_dlSinrDb, 0.01, "Wrong SINR in DL! (eNB1 --> UE1)");
204 
205 
206  double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
207  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr2, 0, 0.01, "Wrong SINR in DL! (eNB2 --> UE2)");
208  }
209 
210  for (uint32_t i = 12; i < 24; i++)
211  {
212  double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
213  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr1, 0, 0.01, "Wrong SINR in DL! (eNB1 --> UE1)");
214 
215  double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
216  double dlSinr2Db = 10.0 * std::log10 (dlSinr2);
217  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr2Db, m_dlSinrDb, 0.01, "Wrong SINR in DL! (eNB2 --> UE2)");
218  }
219 
220  //FR algorithms do not operate in uplink now, so we do not test it
221 // double ulSinr1Db = 10.0 * std::log10 (testUlSinr1->GetSinr ()->operator[] (0));
222 // NS_LOG_DEBUG("ulSinr1Db: "<< ulSinr1Db);
223 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr1Db, m_ulSinrDb, 0.01, "Wrong SINR in UL! (UE1 --> eNB1)");
224 //
225 // double ulSinr2Db = 10.0 * std::log10 (testUlSinr2->GetSinr ()->operator[] (0));
226 // NS_LOG_DEBUG("ulSinr2Db: "<< ulSinr2Db);
227 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr2Db, m_ulSinrDb, 0.01, "Wrong SINR in UL! (UE2 --> eNB2)");
228 
229  Simulator::Destroy ();
230 }
231 
233  double commonDlSinr, double commonUlSinr, double edgeDlSinr, double edgeUlSinr,
234  uint32_t rspqThreshold)
235  : TestCase ("Test: " + name),
236  m_d1 (d1),
237  m_d2 (d2),
238  m_commonDlSinrDb (10 * std::log10 (commonDlSinr)),
239  m_commonUlSinrDb (10 * std::log10 (commonUlSinr)),
240  m_edgeDlSinrDb (10 * std::log10 (edgeDlSinr)),
241  m_edgeUlSinrDb (10 * std::log10 (edgeUlSinr)),
242  m_rspqThreshold (rspqThreshold)
243 {
244  NS_LOG_INFO ("Creating LteInterferenceFrTestCase");
245 }
246 
248 {
249 }
250 
251 void
253 {
254  NS_LOG_INFO (this << GetName ());
255  NS_LOG_DEBUG ("LteInterferenceStrictFrTestCase");
256 
257  Config::Reset ();
258  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
259 
260  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
261  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
262  Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010));
263  Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005));
264 
265  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
266  lteHelper->SetFfrAlgorithmType ("ns3::LteFrStrictAlgorithm");
267  lteHelper->SetFfrAlgorithmAttribute ("RsrqThreshold", UintegerValue (m_rspqThreshold));
268  lteHelper->SetFfrAlgorithmAttribute ("CenterPowerOffset",
269  UintegerValue (LteRrcSap::PdschConfigDedicated::dB0));
270  lteHelper->SetFfrAlgorithmAttribute ("EdgePowerOffset",
271  UintegerValue (LteRrcSap::PdschConfigDedicated::dB0));
272 
273 
274  lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumPropagationLossModel"));
275 
276  // Create Nodes: eNodeB and UE
277  NodeContainer enbNodes;
278  NodeContainer ueNodes1;
279  NodeContainer ueNodes2;
280  enbNodes.Create (2);
281  ueNodes1.Create (2);
282  ueNodes2.Create (2);
283  NodeContainer allNodes = NodeContainer ( enbNodes, ueNodes1, ueNodes2);
284 
285  // the topology is the following:
286  // d2
287  // UE1-----------eNB2
288  // | |
289  // d1| |d1
290  // | d2 |
291  // eNB1----------UE2
292  //
293  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
294  positionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
295  positionAlloc->Add (Vector (m_d2, m_d1, 0.0)); // eNB2
296 
297  positionAlloc->Add (Vector (0.0, m_d1, 0.0)); // UE1-eNB1
298  positionAlloc->Add (Vector (0.5 * m_d2, 0.0, 0.0)); // UE2-eNB1
299 
300  positionAlloc->Add (Vector (m_d2, 0.0, 0.0)); // UE1-eNB2
301  positionAlloc->Add (Vector (0.5 * m_d2, m_d1, 0.0)); // UE2-eNB2
302 
303  MobilityHelper mobility;
304  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
305  mobility.SetPositionAllocator (positionAlloc);
306  mobility.Install (allNodes);
307 
308  // Create Devices and install them in the Nodes (eNB and UE)
309  NetDeviceContainer enbDevs;
310  NetDeviceContainer ueDevs1;
311  NetDeviceContainer ueDevs2;
312  lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
313  lteHelper->SetSchedulerAttribute ("UlCqiFilter", EnumValue (FfMacScheduler::PUSCH_UL_CQI));
314 
315 
316  lteHelper->SetFfrAlgorithmAttribute ("DlCommonSubBandwidth", UintegerValue (12));
317  lteHelper->SetFfrAlgorithmAttribute ("DlEdgeSubBandOffset", UintegerValue (0));
318  lteHelper->SetFfrAlgorithmAttribute ("DlEdgeSubBandwidth", UintegerValue (6));
319  lteHelper->SetFfrAlgorithmAttribute ("UlCommonSubBandwidth", UintegerValue (25));
320  lteHelper->SetFfrAlgorithmAttribute ("UlEdgeSubBandOffset", UintegerValue (0));
321  lteHelper->SetFfrAlgorithmAttribute ("UlEdgeSubBandwidth", UintegerValue (0));
322 
323  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (0)));
324 
325  lteHelper->SetFfrAlgorithmAttribute ("DlCommonSubBandwidth", UintegerValue (12));
326  lteHelper->SetFfrAlgorithmAttribute ("DlEdgeSubBandOffset", UintegerValue (6));
327  lteHelper->SetFfrAlgorithmAttribute ("DlEdgeSubBandwidth", UintegerValue (6));
328  enbDevs.Add (lteHelper->InstallEnbDevice (enbNodes.Get (1)));
329 
330  ueDevs1 = lteHelper->InstallUeDevice (ueNodes1);
331  ueDevs2 = lteHelper->InstallUeDevice (ueNodes2);
332 
333  lteHelper->Attach (ueDevs1, enbDevs.Get (0));
334  lteHelper->Attach (ueDevs2, enbDevs.Get (1));
335 
336  // Activate an EPS bearer
337  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
338  EpsBearer bearer (q);
339  lteHelper->ActivateDataRadioBearer (ueDevs1, bearer);
340  lteHelper->ActivateDataRadioBearer (ueDevs2, bearer);
341 
342  // Use testing chunk processor in the PHY layer
343  // It will be used to test that the SNR is as intended
344  // we plug in two instances, one for DL and one for UL
345 
346  Ptr<LtePhy> ue1Phy = ueDevs1.Get (0)->GetObject<LteUeNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
347  Ptr<LteTestSinrChunkProcessor> testDlSinr1 = Create<LteTestSinrChunkProcessor> ();
348  ue1Phy->GetDownlinkSpectrumPhy ()->AddDataSinrChunkProcessor (testDlSinr1);
349 
350  Ptr<LtePhy> enb1phy = enbDevs.Get (0)->GetObject<LteEnbNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
351  Ptr<LteTestSinrChunkProcessor> testUlSinr1 = Create<LteTestSinrChunkProcessor> ();
352  enb1phy->GetUplinkSpectrumPhy ()->AddDataSinrChunkProcessor (testUlSinr1);
353 
354  // same as above for eNB2 and UE2
355 
356  Ptr<LtePhy> ue2Phy = ueDevs2.Get (0)->GetObject<LteUeNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
357  Ptr<LteTestSinrChunkProcessor> testDlSinr2 = Create<LteTestSinrChunkProcessor> ();
358  ue2Phy->GetDownlinkSpectrumPhy ()->AddDataSinrChunkProcessor (testDlSinr2);
359 
360  Ptr<LtePhy> enb2phy = enbDevs.Get (1)->GetObject<LteEnbNetDevice> ()->GetPhy ()->GetObject<LtePhy> ();
361  Ptr<LteTestSinrChunkProcessor> testUlSinr2 = Create<LteTestSinrChunkProcessor> ();
362  enb1phy->GetUplinkSpectrumPhy ()->AddDataSinrChunkProcessor (testUlSinr2);
363 
364 // need to allow for UE Measurement report
365  Simulator::Stop (Seconds (2.000));
366  Simulator::Run ();
367 
368 
369  for (uint32_t i = 0; i < 12; i++)
370  {
371  double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
372  double dlSinr1Db = 10.0 * std::log10 (dlSinr1);
373  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr1Db, m_commonDlSinrDb, 0.01, "Wrong SINR in DL! (eNB1 --> UE1)");
374 
375 
376  double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
377  double dlSinr2Db = 10.0 * std::log10 (dlSinr2);
378  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr2Db, m_commonDlSinrDb, 0.01, "Wrong SINR in DL! (eNB2 --> UE2)");
379  }
380 
381  for (uint32_t i = 12; i < 18; i++)
382  {
383  double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
384  double dlSinr1Db = 10.0 * std::log10 (dlSinr1);
385  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr1Db, m_edgeDlSinrDb, 0.01, "Wrong SINR in DL! (eNB1 --> UE1)");
386 
387 
388  double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
389  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr2, 0, 0.01, "Wrong SINR in DL! (eNB2 --> UE2)");
390  }
391 
392  for (uint32_t i = 18; i < 24; i++)
393  {
394  double dlSinr1 = testDlSinr1->GetSinr ()->operator[] (i);
395  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr1, 0, 0.01, "Wrong SINR in DL! (eNB1 --> UE1)");
396 
397  double dlSinr2 = testDlSinr2->GetSinr ()->operator[] (i);
398  double dlSinr2Db = 10.0 * std::log10 (dlSinr2);
399  NS_TEST_ASSERT_MSG_EQ_TOL (dlSinr2Db, m_edgeDlSinrDb, 0.01, "Wrong SINR in DL! (eNB2 --> UE2)");
400  }
401 
402 
403  //FR algorithms do not operate in uplink now, so we do not test it
404 // double ulSinr1Db = 10.0 * std::log10 (testUlSinr1->GetSinr ()->operator[] (0));
405 // NS_LOG_DEBUG("ulSinr1Db: "<< ulSinr1Db);
406 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr1Db, m_ulSinrDb, 0.01, "Wrong SINR in UL! (UE1 --> eNB1)");
407 //
408 // double ulSinr2Db = 10.0 * std::log10 (testUlSinr2->GetSinr ()->operator[] (0));
409 // NS_LOG_DEBUG("ulSinr2Db: "<< ulSinr2Db);
410 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr2Db, m_ulSinrDb, 0.01, "Wrong SINR in UL! (UE2 --> eNB2)");
411 
412  Simulator::Destroy ();
413 }
AttributeValue implementation for Boolean.
Definition: boolean.h:34
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:382
void Reset(void)
Reset the initial value of every attribute as well as the value of every global to what they were bef...
Definition: config.cc:652
Hold variables of type string.
Definition: string.h:41
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
A suite of tests to run.
Definition: test.h:1270
LteInterferenceHardFrTestCase(std::string name, double d1, double d2, double dlSinr, double ulSinr)
TestCase Data.
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:716
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
Ptr< LteSpectrumPhy > GetUplinkSpectrumPhy()
Definition: lte-phy.cc:109
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:244
LteInterferenceStrictFrTestCase(std::string name, double d1, double d2, double commonDlSinr, double commonUlSinr, double edgeDlSinr, double edgeUlSinr, uint32_t rspqThreshold)
encapsulates test code
Definition: test.h:1102
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
Definition: lte-helper.cc:1046
STL namespace.
static LteInterferenceFrTestSuite LteInterferenceFrTestSuite
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:252
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:225
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:54
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Definition: test.cc:184
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
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:239
holds a vector of ns3::NetDevice pointers
Ptr< LteSpectrumPhy > GetDownlinkSpectrumPhy()
Definition: lte-phy.cc:103
#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:356
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:677
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
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())
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.
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:236
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:859
void Add(Vector v)
Add a position to the list of positions.
Test Interference level with FR algorithms.
std::string GetName(void) const
Definition: test.cc:247
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Set the position allocator which will be used to allocate the initial position of every node initiali...
This class can be used to hold variables of floating point type such as 'double' or 'float'...
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:190
The eNodeB device implementation.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:455
virtual void DoRun(void)
Implementation to actually run this TestCase.
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the FFR algorithm to be created.
Definition: lte-helper.cc:260
Qci
QoS Class Indicator.
Definition: eps-bearer.h:77
virtual void DoRun(void)
Implementation to actually run this TestCase.
The LtePhy models the physical layer of LTE.
Definition: lte-phy.h:52
The LteUeNetDevice class implements the UE net device.