A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lte-test-uplink-power-control.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  *
20  */
21 
22 #include <ns3/simulator.h>
23 #include <ns3/log.h>
24 #include <ns3/callback.h>
25 #include <ns3/config.h>
26 #include <ns3/string.h>
27 #include <ns3/double.h>
28 #include <ns3/enum.h>
29 #include <ns3/boolean.h>
30 #include <ns3/pointer.h>
31 #include <ns3/integer.h>
32 
33 #include "ns3/mobility-helper.h"
34 #include "ns3/lte-helper.h"
35 
36 #include <ns3/ff-mac-scheduler.h>
37 #include <ns3/lte-enb-net-device.h>
38 #include <ns3/lte-enb-phy.h>
39 #include <ns3/lte-enb-rrc.h>
40 #include <ns3/lte-ue-net-device.h>
41 #include <ns3/lte-ue-phy.h>
42 #include <ns3/lte-ue-rrc.h>
43 
44 #include "lte-ffr-simple.h"
46 #include <ns3/lte-common.h>
47 
49 #include <ns3/lte-rrc-sap.h>
50 
51 NS_LOG_COMPONENT_DEFINE ("LteUplinkPowerControlTest");
52 
53 using namespace ns3;
54 
60  : TestSuite ("lte-uplink-power-control", SYSTEM)
61 {
62 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_DEBUG);
63 // LogComponentEnable ("LteUplinkPowerControlTest", logLevel);
64  NS_LOG_INFO ("Creating LteUplinkPowerControlTestSuite");
65 
66  AddTestCase (new LteUplinkOpenLoopPowerControlTestCase ("OpenLoopTest1"), TestCase::QUICK);
67  AddTestCase (new LteUplinkClosedLoopPowerControlAbsoluteModeTestCase ("ClosedLoopAbsoluteModeTest1"), TestCase::QUICK);
68  AddTestCase (new LteUplinkClosedLoopPowerControlAccumulatedModeTestCase ("ClosedLoopAccumulatedModeTest1"), TestCase::QUICK);
69 }
70 
72 
76 void
78  uint16_t cellId, uint16_t rnti, double txPower)
79 {
80  testcase->PuschTxPowerTrace (cellId, rnti, txPower);
81 }
82 
83 void
85  uint16_t cellId, uint16_t rnti, double txPower)
86 {
87  testcase->PucchTxPowerTrace (cellId, rnti, txPower);
88 }
89 
90 void
92  uint16_t cellId, uint16_t rnti, double txPower)
93 {
94  testcase->SrsTxPowerTrace (cellId, rnti, txPower);
95 }
96 
98  : TestCase (name)
99 {
100  NS_LOG_INFO ("Creating LteUplinkPowerControlTestCase");
101 }
102 
104 {
105 }
106 
107 void
109  double expectedPuschTxPower, double expectedPucchTxPower, double expectedSrsTxPower)
110 {
111  NS_LOG_FUNCTION (this);
112  NS_LOG_DEBUG ("Teleport UE to : (" << x << ", " << y << ", 0)");
113 
114  m_ueMobility->SetPosition (Vector (x, y, 0.0));
116 
117  m_expectedPuschTxPower = expectedPuschTxPower;
118  m_expectedPucchTxPower = expectedPucchTxPower;
119  m_expectedSrsTxPower = expectedSrsTxPower;
120 }
121 
122 void
124  double expectedPuschTxPower, double expectedPucchTxPower, double expectedSrsTxPower)
125 {
126  NS_LOG_FUNCTION (this);
127 
129 
130  m_expectedPuschTxPower = expectedPuschTxPower;
131  m_expectedPucchTxPower = expectedPucchTxPower;
132  m_expectedSrsTxPower = expectedSrsTxPower;
133 
134  m_ffrSimple->SetTpc (tpc, tpcNum, m_accumulatedMode);
135 }
136 
137 void
138 LteUplinkPowerControlTestCase::PuschTxPowerTrace (uint16_t cellId, uint16_t rnti, double txPower)
139 {
140  NS_LOG_FUNCTION (this);
141  NS_LOG_DEBUG ("PuschTxPower : CellId: " << cellId << " RNTI: " << rnti << " PuschTxPower: " << txPower);
142  //wait because of RSRP filtering
143  if ( (Simulator::Now () - m_teleportTime ) < MilliSeconds (50))
144  {
145  return;
146  }
147  NS_TEST_ASSERT_MSG_EQ_TOL (txPower, m_expectedPuschTxPower, 0.01, "Wrong Pusch Tx Power");
148 }
149 
150 void
151 LteUplinkPowerControlTestCase::PucchTxPowerTrace (uint16_t cellId, uint16_t rnti, double txPower)
152 {
153  NS_LOG_FUNCTION (this);
154  NS_LOG_DEBUG ("PucchTxPower : CellId: " << cellId << " RNTI: " << rnti << " PuschTxPower: " << txPower);
155  //wait because of RSRP filtering
156  if ( (Simulator::Now () - m_teleportTime ) < MilliSeconds (50))
157  {
158  return;
159  }
160 
161  NS_TEST_ASSERT_MSG_EQ_TOL (txPower, m_expectedPucchTxPower, 0.01, "Wrong Pucch Tx Power");
162 }
163 
164 void
165 LteUplinkPowerControlTestCase::SrsTxPowerTrace (uint16_t cellId, uint16_t rnti, double txPower)
166 {
167  NS_LOG_FUNCTION (this);
168  NS_LOG_DEBUG ("SrsTxPower : CellId: " << cellId << " RNTI: " << rnti << " PuschTxPower: " << txPower);
169  //wait because of RSRP filtering
170  if ( (Simulator::Now () - m_teleportTime ) < MilliSeconds (50))
171  {
172  return;
173  }
174  NS_TEST_ASSERT_MSG_EQ_TOL (txPower, m_expectedSrsTxPower, 0.01, "Wrong Srs Tx Power");
175 }
176 
177 void
179 {
180 }
181 
182 
184  : LteUplinkPowerControlTestCase ("Uplink Open Loop Power Control: " + name)
185 {
186  NS_LOG_INFO ("Creating LteUplinkPowerControlTestCase");
187 }
188 
190 {
191 }
192 
193 void
195 {
196  Config::Reset ();
197  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (false));
198 
199  double eNbTxPower = 30;
200  Config::SetDefault ("ns3::LteEnbPhy::TxPower", DoubleValue (eNbTxPower));
201  Config::SetDefault ("ns3::LteUePhy::TxPower", DoubleValue (10.0));
202  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (true));
203 
204  Config::SetDefault ("ns3::LteUePowerControl::ClosedLoop", BooleanValue (false));
205  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
206  Config::SetDefault ("ns3::LteUePowerControl::PoNominalPusch", IntegerValue (-90));
207  Config::SetDefault ("ns3::LteUePowerControl::PsrsOffset", IntegerValue (9));
208 
209  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
210 
211  uint8_t bandwidth = 25;
212  double d1 = 0;
213 
214  // Create Nodes: eNodeB and UE
215  NodeContainer enbNodes;
216  NodeContainer ueNodes;
217  enbNodes.Create (1);
218  ueNodes.Create (1);
219  NodeContainer allNodes = NodeContainer ( enbNodes, ueNodes);
220 
221 /* the topology is the following:
222  *
223  * eNB1-------------------------UE
224  * d1
225  */
226 
227  // Install Mobility Model
228  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
229  positionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
230  positionAlloc->Add (Vector (d1, 0.0, 0.0)); // UE1
231 
232  MobilityHelper mobility;
233  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
234  mobility.SetPositionAllocator (positionAlloc);
235  mobility.Install (allNodes);
236  m_ueMobility = ueNodes.Get (0)->GetObject<MobilityModel> ();
237 
238  // Create Devices and install them in the Nodes (eNB and UE)
239  NetDeviceContainer enbDevs;
240  NetDeviceContainer ueDevs;
241  lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
242 
243  lteHelper->SetEnbDeviceAttribute ("DlBandwidth", UintegerValue (bandwidth));
244  lteHelper->SetEnbDeviceAttribute ("UlBandwidth", UintegerValue (bandwidth));
245 
246  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
247  ueDevs = lteHelper->InstallUeDevice (ueNodes);
248 
249  Ptr<LteUePhy> uePhy = DynamicCast<LteUePhy>( ueDevs.Get (0)->GetObject<LteUeNetDevice> ()->GetPhy () );
250  m_ueUpc = uePhy->GetUplinkPowerControl ();
251 
252  m_ueUpc->TraceConnectWithoutContext ("ReportPuschTxPower",
254  m_ueUpc->TraceConnectWithoutContext ("ReportPucchTxPower",
256  m_ueUpc->TraceConnectWithoutContext ("ReportSrsTxPower",
258 
259  // Attach a UE to a eNB
260  lteHelper->Attach (ueDevs, enbDevs.Get (0));
261 
262  // Activate a data radio bearer
263  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
264  EpsBearer bearer (q);
265  lteHelper->ActivateDataRadioBearer (ueDevs, bearer);
266 
267  //Changing UE position
268  Simulator::Schedule (MilliSeconds (0),
269  &LteUplinkPowerControlTestCase::TeleportUe, this, 0, 0, -40, -40, -40);
270  Simulator::Schedule (MilliSeconds (200),
271  &LteUplinkPowerControlTestCase::TeleportUe, this, 200, 0, 8.9745, 8.9745, 11.9745);
272  Simulator::Schedule (MilliSeconds (300),
273  &LteUplinkPowerControlTestCase::TeleportUe, this, 400, 0, 14.9951, 14.9951, 17.9951 );
274  Simulator::Schedule (MilliSeconds (400),
275  &LteUplinkPowerControlTestCase::TeleportUe, this, 600, 0, 18.5169, 18.5169, 21.5169 );
276  Simulator::Schedule (MilliSeconds (500),
277  &LteUplinkPowerControlTestCase::TeleportUe, this, 800, 0, 21.0157, 21.0157, 23 );
278  Simulator::Schedule (MilliSeconds (600),
279  &LteUplinkPowerControlTestCase::TeleportUe, this, 1000, 0, 22.9539, 22.9539, 23 );
280  Simulator::Schedule (MilliSeconds (700),
281  &LteUplinkPowerControlTestCase::TeleportUe, this, 1200, 0, 23, 10, 23 );
282  Simulator::Schedule (MilliSeconds (800),
283  &LteUplinkPowerControlTestCase::TeleportUe, this, 400, 0, 14.9951, 14.9951, 17.9951 );
284  Simulator::Schedule (MilliSeconds (900),
285  &LteUplinkPowerControlTestCase::TeleportUe, this, 800, 0, 21.0157, 21.0157, 23 );
286  Simulator::Schedule (MilliSeconds (1000),
287  &LteUplinkPowerControlTestCase::TeleportUe, this, 0, 0, -40, -40, -40 );
288  Simulator::Schedule (MilliSeconds (1100),
289  &LteUplinkPowerControlTestCase::TeleportUe, this, 100, 0, 2.9539, 2.9539, 5.9539 );
290  Simulator::Stop (Seconds (1.200));
291  Simulator::Run ();
292 
293  Simulator::Destroy ();
294 }
295 
297  : LteUplinkPowerControlTestCase ("Uplink Closed Loop Power Control: " + name)
298 {
299  NS_LOG_INFO ("Creating LteUplinkClosedLoopPowerControlAbsoluteModeTestCase");
300 }
301 
303 {
304 }
305 
306 void
308 {
309  Config::Reset ();
310  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (false));
311 
312  double eNbTxPower = 30;
313  Config::SetDefault ("ns3::LteEnbPhy::TxPower", DoubleValue (eNbTxPower));
314  Config::SetDefault ("ns3::LteUePhy::TxPower", DoubleValue (10.0));
315  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (true));
316 
317  Config::SetDefault ("ns3::LteUePowerControl::ClosedLoop", BooleanValue (true));
318  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (false));
319  Config::SetDefault ("ns3::LteUePowerControl::PoNominalPusch", IntegerValue (-90));
320  Config::SetDefault ("ns3::LteUePowerControl::PsrsOffset", IntegerValue (9));
321 
322  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
323  lteHelper->SetFfrAlgorithmType ("ns3::LteFfrSimple");
324 
325  uint8_t bandwidth = 25;
326  double d1 = 100;
327 
328  // Create Nodes: eNodeB and UE
329  NodeContainer enbNodes;
330  NodeContainer ueNodes;
331  enbNodes.Create (1);
332  ueNodes.Create (1);
333  NodeContainer allNodes = NodeContainer ( enbNodes, ueNodes);
334 
335 /* the topology is the following:
336  *
337  * eNB1-------------------------UE
338  * d1
339  */
340 
341  // Install Mobility Model
342  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
343  positionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
344  positionAlloc->Add (Vector (d1, 0.0, 0.0)); // UE1
345 
346  MobilityHelper mobility;
347  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
348  mobility.SetPositionAllocator (positionAlloc);
349  mobility.Install (allNodes);
350  m_ueMobility = ueNodes.Get (0)->GetObject<MobilityModel> ();
351 
352  // Create Devices and install them in the Nodes (eNB and UE)
353  NetDeviceContainer enbDevs;
354  NetDeviceContainer ueDevs;
355  lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
356 
357  lteHelper->SetEnbDeviceAttribute ("DlBandwidth", UintegerValue (bandwidth));
358  lteHelper->SetEnbDeviceAttribute ("UlBandwidth", UintegerValue (bandwidth));
359 
360  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
361  ueDevs = lteHelper->InstallUeDevice (ueNodes);
362 
363  Ptr<LteUePhy> uePhy = DynamicCast<LteUePhy>( ueDevs.Get (0)->GetObject<LteUeNetDevice> ()->GetPhy () );
364  m_ueUpc = uePhy->GetUplinkPowerControl ();
365 
366  m_ueUpc->TraceConnectWithoutContext ("ReportPuschTxPower",
368  m_ueUpc->TraceConnectWithoutContext ("ReportPucchTxPower",
370  m_ueUpc->TraceConnectWithoutContext ("ReportSrsTxPower",
372 
373  // Attach a UE to a eNB
374  lteHelper->Attach (ueDevs, enbDevs.Get (0));
375 
376  // Activate a data radio bearer
377  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
378  EpsBearer bearer (q);
379  lteHelper->ActivateDataRadioBearer (ueDevs, bearer);
380 
381  PointerValue tmp;
382  enbDevs.Get (0)->GetAttribute ("LteFfrAlgorithm", tmp);
383  m_ffrSimple = DynamicCast<LteFfrSimple>(tmp.GetObject ());
384  m_accumulatedMode = false;
385 
386  //Changing TPC value
387  Simulator::Schedule (MilliSeconds (0),
388  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 1, 0, 1.9539, 1.9539, 4.9539);
389  Simulator::Schedule (MilliSeconds (100),
390  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 0, 0, -1.0461, -1.0461, 1.9539);
391  Simulator::Schedule (MilliSeconds (200),
392  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 2, 0, 3.9539, 3.9539, 6.9539);
393  Simulator::Schedule (MilliSeconds (300),
394  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 3, 0, 6.9539, 6.9539, 9.9539);
395  Simulator::Schedule (MilliSeconds (400),
396  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 0, 0, -1.0461, -1.0461, 1.9539);
397  Simulator::Schedule (MilliSeconds (500),
398  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 1, 0, 1.9539, 1.9539, 4.9539);
399  Simulator::Schedule (MilliSeconds (600),
400  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 3, 0, 6.9539, 6.9539, 9.9539);
401  Simulator::Schedule (MilliSeconds (800),
402  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 2, 0, 3.9539, 3.9539, 6.9539);
403  Simulator::Stop (Seconds (1.000));
404  Simulator::Run ();
405 
406  Simulator::Destroy ();
407 }
408 
410  : LteUplinkPowerControlTestCase ("Uplink Closed Loop Power Control: " + name)
411 {
412  NS_LOG_INFO ("Creating LteUplinkClosedLoopPowerControlAccumulatedModeTestCase");
413 }
414 
416 {
417 }
418 
419 void
421 {
422  Config::Reset ();
423  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (false));
424 
425  double eNbTxPower = 30;
426  Config::SetDefault ("ns3::LteEnbPhy::TxPower", DoubleValue (eNbTxPower));
427  Config::SetDefault ("ns3::LteUePhy::TxPower", DoubleValue (10.0));
428  Config::SetDefault ("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue (true));
429 
430  Config::SetDefault ("ns3::LteUePowerControl::ClosedLoop", BooleanValue (true));
431  Config::SetDefault ("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue (true));
432  Config::SetDefault ("ns3::LteUePowerControl::PoNominalPusch", IntegerValue (-90));
433  Config::SetDefault ("ns3::LteUePowerControl::PsrsOffset", IntegerValue (9));
434 
435  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
436  lteHelper->SetFfrAlgorithmType ("ns3::LteFfrSimple");
437 
438  uint8_t bandwidth = 25;
439  double d1 = 10;
440 
441  // Create Nodes: eNodeB and UE
442  NodeContainer enbNodes;
443  NodeContainer ueNodes;
444  enbNodes.Create (1);
445  ueNodes.Create (1);
446  NodeContainer allNodes = NodeContainer ( enbNodes, ueNodes);
447 
448 /* the topology is the following:
449  *
450  * eNB1-------------------------UE
451  * d1
452  */
453 
454  // Install Mobility Model
455  Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
456  positionAlloc->Add (Vector (0.0, 0.0, 0.0)); // eNB1
457  positionAlloc->Add (Vector (d1, 0.0, 0.0)); // UE1
458 
459  MobilityHelper mobility;
460  mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
461  mobility.SetPositionAllocator (positionAlloc);
462  mobility.Install (allNodes);
463  m_ueMobility = ueNodes.Get (0)->GetObject<MobilityModel> ();
464 
465  // Create Devices and install them in the Nodes (eNB and UE)
466  NetDeviceContainer enbDevs;
467  NetDeviceContainer ueDevs;
468  lteHelper->SetSchedulerType ("ns3::PfFfMacScheduler");
469 
470  lteHelper->SetEnbDeviceAttribute ("DlBandwidth", UintegerValue (bandwidth));
471  lteHelper->SetEnbDeviceAttribute ("UlBandwidth", UintegerValue (bandwidth));
472 
473  enbDevs = lteHelper->InstallEnbDevice (enbNodes);
474  ueDevs = lteHelper->InstallUeDevice (ueNodes);
475 
476  Ptr<LteUePhy> uePhy = DynamicCast<LteUePhy>( ueDevs.Get (0)->GetObject<LteUeNetDevice> ()->GetPhy () );
477  m_ueUpc = uePhy->GetUplinkPowerControl ();
478 
479  m_ueUpc->TraceConnectWithoutContext ("ReportPuschTxPower",
481  m_ueUpc->TraceConnectWithoutContext ("ReportPucchTxPower",
483  m_ueUpc->TraceConnectWithoutContext ("ReportSrsTxPower",
485 
486  // Attach a UE to a eNB
487  lteHelper->Attach (ueDevs, enbDevs.Get (0));
488 
489  // Activate a data radio bearer
490  enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
491  EpsBearer bearer (q);
492  lteHelper->ActivateDataRadioBearer (ueDevs, bearer);
493 
494  PointerValue tmp;
495  enbDevs.Get (0)->GetAttribute ("LteFfrAlgorithm", tmp);
496  m_ffrSimple = DynamicCast<LteFfrSimple>(tmp.GetObject ());
497  m_accumulatedMode = true;
498 
499  //Changing TPC value
500  Simulator::Schedule (MilliSeconds (0),
501  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 1, 0, -17.0461, -17.0461, -14.0461);
502  Simulator::Schedule (MilliSeconds (100),
503  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 0, 20, -37.0461, -37.0461, -34.0461);
504  Simulator::Schedule (MilliSeconds (200),
505  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 0, 20, -40, 10, -37.0461);
506  Simulator::Schedule (MilliSeconds (300),
507  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 2, 1, -39.0461, -39.0461, -36.0461);
508  Simulator::Schedule (MilliSeconds (400),
509  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 3, 10, -9.0461, -9.0461, -6.0461);
510  Simulator::Schedule (MilliSeconds (500),
511  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 2, 15, 5.9539, 5.9539, 8.9539);
512  Simulator::Schedule (MilliSeconds (600),
513  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 3, 1, 8.9539, 8.9539, 11.9539);
514  Simulator::Schedule (MilliSeconds (700),
515  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 2, 10, 18.9539, 18.9539, 21.9539);
516  Simulator::Schedule (MilliSeconds (800),
517  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 2, 20, 23, 23, 23);
518  Simulator::Schedule (MilliSeconds (900),
519  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 0, 1, 22.9539, 22.9539, 23);
520  Simulator::Schedule (MilliSeconds (1000),
521  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 0, 20, 2.9539, 2.9539, 5.9539);
522  Simulator::Schedule (MilliSeconds (1100),
523  &LteUplinkPowerControlTestCase::SetTpcConfiguration, this, 2, 5, 7.9539, 7.9539, 10.9539);
524  Simulator::Stop (Seconds (1.200));
525  Simulator::Run ();
526 
527  Simulator::Destroy ();
528 }
Ptr< T > Get(void) const
Definition: pointer.h:148
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Hold a bool native type.
Definition: boolean.h:38
NetDeviceContainer InstallEnbDevice(NodeContainer c)
create a set of eNB 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
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:1289
void SetTpc(uint32_t tpc, uint32_t num, bool acculumatedMode)
Callback< R > MakeBoundCallback(R(*fnPtr)(TX), ARG a1)
Make Callbacks with one bound argument.
Definition: callback.h:1480
Ptr< Object > GetObject(void) const
Definition: pointer.cc:49
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
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:853
#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
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 SetFfrAlgorithmType(std::string type)
Definition: lte-helper.cc:252
void SetSchedulerType(std::string type)
Definition: lte-helper.cc:225
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 an unsigned integer type.
Definition: uinteger.h:46
holds a vector of ns3::NetDevice pointers
Ptr< LteUePowerControl > GetUplinkPowerControl() const
Definition: lte-ue-phy.cc:352
#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
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Definition: object-base.cc:284
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:677
keep track of a set of node pointers.
hold objects of type Ptr
Definition: pointer.h:33
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)
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.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:287
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:213
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:845
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...
Hold a floating point type.
Definition: double.h:41
Ptr< T > GetObject(void) const
Definition: object.h:362
Qci
QoS Class Indicator.
Definition: eps-bearer.h:77
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
set an attribute for the LteEnbNetDevice to be created
Definition: lte-helper.cc:307
The LteUeNetDevice class implements the UE net device.