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