A Discrete-Event Network Simulator
API
lte-test-uplink-power-control.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Piotr Gawlowicz
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: Piotr Gawlowicz <gawlowicz.p@gmail.com>
18 *
19 */
20
22
23#include "lte-ffr-simple.h"
24
25#include "ns3/lte-helper.h"
26#include "ns3/mobility-helper.h"
27#include <ns3/boolean.h>
28#include <ns3/callback.h>
29#include <ns3/config.h>
30#include <ns3/double.h>
31#include <ns3/enum.h>
32#include <ns3/ff-mac-scheduler.h>
33#include <ns3/integer.h>
34#include <ns3/log.h>
35#include <ns3/lte-common.h>
36#include <ns3/lte-enb-net-device.h>
37#include <ns3/lte-enb-phy.h>
38#include <ns3/lte-enb-rrc.h>
39#include <ns3/lte-rrc-sap.h>
40#include <ns3/lte-ue-net-device.h>
41#include <ns3/lte-ue-phy.h>
42#include <ns3/lte-ue-rrc.h>
43#include <ns3/pointer.h>
44#include <ns3/simulator.h>
45#include <ns3/string.h>
46
47using namespace ns3;
48
49NS_LOG_COMPONENT_DEFINE("LteUplinkPowerControlTest");
50
56 : TestSuite("lte-uplink-power-control", SYSTEM)
57{
58 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_DEBUG);
59 // LogComponentEnable ("LteUplinkPowerControlTest", logLevel);
60 NS_LOG_INFO("Creating LteUplinkPowerControlTestSuite");
61
62 AddTestCase(new LteUplinkOpenLoopPowerControlTestCase("OpenLoopTest1"), TestCase::QUICK);
64 new LteUplinkClosedLoopPowerControlAbsoluteModeTestCase("ClosedLoopAbsoluteModeTest1"),
65 TestCase::QUICK);
67 "ClosedLoopAccumulatedModeTest1"),
68 TestCase::QUICK);
69}
70
72
76void
78 uint16_t cellId,
79 uint16_t rnti,
80 double txPower)
81{
82 testcase->PuschTxPowerTrace(cellId, rnti, txPower);
83}
84
85void
87 uint16_t cellId,
88 uint16_t rnti,
89 double txPower)
90{
91 testcase->PucchTxPowerTrace(cellId, rnti, txPower);
92}
93
94void
96 uint16_t cellId,
97 uint16_t rnti,
98 double txPower)
99{
100 testcase->SrsTxPowerTrace(cellId, rnti, txPower);
101}
102
104 : TestCase(name)
105{
106 NS_LOG_INFO("Creating LteUplinkPowerControlTestCase");
107}
108
110{
111}
112
113void
115 uint32_t y,
116 double expectedPuschTxPower,
117 double expectedPucchTxPower,
118 double expectedSrsTxPower)
119{
120 NS_LOG_FUNCTION(this);
121 NS_LOG_DEBUG("Teleport UE to : (" << x << ", " << y << ", 0)");
122
123 m_ueMobility->SetPosition(Vector(x, y, 0.0));
125
126 m_expectedPuschTxPower = expectedPuschTxPower;
127 m_expectedPucchTxPower = expectedPucchTxPower;
128 m_expectedSrsTxPower = expectedSrsTxPower;
129}
130
131void
133 uint32_t tpcNum,
134 double expectedPuschTxPower,
135 double expectedPucchTxPower,
136 double expectedSrsTxPower)
137{
138 NS_LOG_FUNCTION(this);
139
141
142 m_expectedPuschTxPower = expectedPuschTxPower;
143 m_expectedPucchTxPower = expectedPucchTxPower;
144 m_expectedSrsTxPower = expectedSrsTxPower;
145
146 m_ffrSimple->SetTpc(tpc, tpcNum, m_accumulatedMode);
147}
148
149void
150LteUplinkPowerControlTestCase::PuschTxPowerTrace(uint16_t cellId, uint16_t rnti, double txPower)
151{
152 NS_LOG_FUNCTION(this);
153 NS_LOG_DEBUG("PuschTxPower : CellId: " << cellId << " RNTI: " << rnti
154 << " PuschTxPower: " << txPower);
155 // wait because of RSRP filtering
157 {
158 return;
159 }
160 NS_TEST_ASSERT_MSG_EQ_TOL(txPower, m_expectedPuschTxPower, 0.01, "Wrong Pusch Tx Power");
161}
162
163void
164LteUplinkPowerControlTestCase::PucchTxPowerTrace(uint16_t cellId, uint16_t rnti, double txPower)
165{
166 NS_LOG_FUNCTION(this);
167 NS_LOG_DEBUG("PucchTxPower : CellId: " << cellId << " RNTI: " << rnti
168 << " PuschTxPower: " << txPower);
169 // wait because of RSRP filtering
171 {
172 return;
173 }
174
175 NS_TEST_ASSERT_MSG_EQ_TOL(txPower, m_expectedPucchTxPower, 0.01, "Wrong Pucch Tx Power");
176}
177
178void
179LteUplinkPowerControlTestCase::SrsTxPowerTrace(uint16_t cellId, uint16_t rnti, double txPower)
180{
181 NS_LOG_FUNCTION(this);
182 NS_LOG_DEBUG("SrsTxPower : CellId: " << cellId << " RNTI: " << rnti
183 << " PuschTxPower: " << txPower);
184 // wait because of RSRP filtering
186 {
187 return;
188 }
189 NS_TEST_ASSERT_MSG_EQ_TOL(txPower, m_expectedSrsTxPower, 0.01, "Wrong Srs Tx Power");
190}
191
192void
194{
195}
196
198 : LteUplinkPowerControlTestCase("Uplink Open Loop Power Control: " + name)
199{
200 NS_LOG_INFO("Creating LteUplinkPowerControlTestCase");
201}
202
204{
205}
206
207void
209{
211 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(false));
212
213 double eNbTxPower = 30;
214 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
215 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
216 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
217
218 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(false));
219 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(false));
220 Config::SetDefault("ns3::LteUePowerControl::PoNominalPusch", IntegerValue(-90));
221 Config::SetDefault("ns3::LteUePowerControl::PsrsOffset", IntegerValue(9));
222
223 Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
224
225 uint16_t bandwidth = 25;
226 double d1 = 0;
227
228 // Create Nodes: eNodeB and UE
229 NodeContainer enbNodes;
230 NodeContainer ueNodes;
231 enbNodes.Create(1);
232 ueNodes.Create(1);
233 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes);
234
235 /* the topology is the following:
236 *
237 * eNB1-------------------------UE
238 * d1
239 */
240
241 // Install Mobility Model
242 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>();
243 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
244 positionAlloc->Add(Vector(d1, 0.0, 0.0)); // UE1
245
247 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
248 mobility.SetPositionAllocator(positionAlloc);
249 mobility.Install(allNodes);
250 m_ueMobility = ueNodes.Get(0)->GetObject<MobilityModel>();
251
252 // Create Devices and install them in the Nodes (eNB and UE)
253 NetDeviceContainer enbDevs;
254 NetDeviceContainer ueDevs;
255 lteHelper->SetSchedulerType("ns3::PfFfMacScheduler");
256
257 lteHelper->SetEnbDeviceAttribute("DlBandwidth", UintegerValue(bandwidth));
258 lteHelper->SetEnbDeviceAttribute("UlBandwidth", UintegerValue(bandwidth));
259
260 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
261 ueDevs = lteHelper->InstallUeDevice(ueNodes);
262
263 Ptr<LteUePhy> uePhy =
264 DynamicCast<LteUePhy>(ueDevs.Get(0)->GetObject<LteUeNetDevice>()->GetPhy());
265 m_ueUpc = uePhy->GetUplinkPowerControl();
266
267 m_ueUpc->TraceConnectWithoutContext("ReportPuschTxPower",
269 m_ueUpc->TraceConnectWithoutContext("ReportPucchTxPower",
271 m_ueUpc->TraceConnectWithoutContext("ReportSrsTxPower",
273
274 // Attach a UE to a eNB
275 lteHelper->Attach(ueDevs, enbDevs.Get(0));
276
277 // Activate a data radio bearer
278 enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
279 EpsBearer bearer(q);
280 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
281
282 // Changing UE position
283 Simulator::Schedule(MilliSeconds(0),
285 this,
286 0,
287 0,
288 -40,
289 -40,
290 -40);
291 Simulator::Schedule(MilliSeconds(200),
293 this,
294 200,
295 0,
296 8.9745,
297 8.9745,
298 11.9745);
299 Simulator::Schedule(MilliSeconds(300),
301 this,
302 400,
303 0,
304 14.9951,
305 14.9951,
306 17.9951);
307 Simulator::Schedule(MilliSeconds(400),
309 this,
310 600,
311 0,
312 18.5169,
313 18.5169,
314 21.5169);
315 Simulator::Schedule(MilliSeconds(500),
317 this,
318 800,
319 0,
320 21.0157,
321 21.0157,
322 23);
323 Simulator::Schedule(MilliSeconds(600),
325 this,
326 1000,
327 0,
328 22.9539,
329 22.9539,
330 23);
331 Simulator::Schedule(MilliSeconds(700),
333 this,
334 1200,
335 0,
336 23,
337 10,
338 23);
339 Simulator::Schedule(MilliSeconds(800),
341 this,
342 400,
343 0,
344 14.9951,
345 14.9951,
346 17.9951);
347 Simulator::Schedule(MilliSeconds(900),
349 this,
350 800,
351 0,
352 21.0157,
353 21.0157,
354 23);
355 Simulator::Schedule(MilliSeconds(1000),
357 this,
358 0,
359 0,
360 -40,
361 -40,
362 -40);
363 Simulator::Schedule(MilliSeconds(1100),
365 this,
366 100,
367 0,
368 2.9539,
369 2.9539,
370 5.9539);
371 Simulator::Stop(Seconds(1.200));
372 Simulator::Run();
373
374 Simulator::Destroy();
375}
376
379 : LteUplinkPowerControlTestCase("Uplink Closed Loop Power Control: " + name)
380{
381 NS_LOG_INFO("Creating LteUplinkClosedLoopPowerControlAbsoluteModeTestCase");
382}
383
386{
387}
388
389void
391{
393 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(false));
394
395 double eNbTxPower = 30;
396 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
397 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
398 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
399
400 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(true));
401 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(false));
402 Config::SetDefault("ns3::LteUePowerControl::PoNominalPusch", IntegerValue(-90));
403 Config::SetDefault("ns3::LteUePowerControl::PsrsOffset", IntegerValue(9));
404
405 Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
406 lteHelper->SetFfrAlgorithmType("ns3::LteFfrSimple");
407
408 uint16_t bandwidth = 25;
409 double d1 = 100;
410
411 // Create Nodes: eNodeB and UE
412 NodeContainer enbNodes;
413 NodeContainer ueNodes;
414 enbNodes.Create(1);
415 ueNodes.Create(1);
416 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes);
417
418 /* the topology is the following:
419 *
420 * eNB1-------------------------UE
421 * d1
422 */
423
424 // Install Mobility Model
425 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>();
426 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
427 positionAlloc->Add(Vector(d1, 0.0, 0.0)); // UE1
428
430 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
431 mobility.SetPositionAllocator(positionAlloc);
432 mobility.Install(allNodes);
433 m_ueMobility = ueNodes.Get(0)->GetObject<MobilityModel>();
434
435 // Create Devices and install them in the Nodes (eNB and UE)
436 NetDeviceContainer enbDevs;
437 NetDeviceContainer ueDevs;
438 lteHelper->SetSchedulerType("ns3::PfFfMacScheduler");
439
440 lteHelper->SetEnbDeviceAttribute("DlBandwidth", UintegerValue(bandwidth));
441 lteHelper->SetEnbDeviceAttribute("UlBandwidth", UintegerValue(bandwidth));
442
443 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
444 ueDevs = lteHelper->InstallUeDevice(ueNodes);
445
446 Ptr<LteUePhy> uePhy =
447 DynamicCast<LteUePhy>(ueDevs.Get(0)->GetObject<LteUeNetDevice>()->GetPhy());
448 m_ueUpc = uePhy->GetUplinkPowerControl();
449
450 m_ueUpc->TraceConnectWithoutContext("ReportPuschTxPower",
452 m_ueUpc->TraceConnectWithoutContext("ReportPucchTxPower",
454 m_ueUpc->TraceConnectWithoutContext("ReportSrsTxPower",
456
457 // Attach a UE to a eNB
458 lteHelper->Attach(ueDevs, enbDevs.Get(0));
459
460 // Activate a data radio bearer
461 enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
462 EpsBearer bearer(q);
463 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
464
465 PointerValue tmp;
466 enbDevs.Get(0)->GetAttribute("LteFfrAlgorithm", tmp);
467 m_ffrSimple = DynamicCast<LteFfrSimple>(tmp.GetObject());
468 m_accumulatedMode = false;
469
470 // Changing TPC value
471 Simulator::Schedule(MilliSeconds(0),
473 this,
474 1,
475 0,
476 1.9539,
477 1.9539,
478 4.9539);
479 Simulator::Schedule(MilliSeconds(100),
481 this,
482 0,
483 0,
484 -1.0461,
485 -1.0461,
486 1.9539);
487 Simulator::Schedule(MilliSeconds(200),
489 this,
490 2,
491 0,
492 3.9539,
493 3.9539,
494 6.9539);
495 Simulator::Schedule(MilliSeconds(300),
497 this,
498 3,
499 0,
500 6.9539,
501 6.9539,
502 9.9539);
503 Simulator::Schedule(MilliSeconds(400),
505 this,
506 0,
507 0,
508 -1.0461,
509 -1.0461,
510 1.9539);
511 Simulator::Schedule(MilliSeconds(500),
513 this,
514 1,
515 0,
516 1.9539,
517 1.9539,
518 4.9539);
519 Simulator::Schedule(MilliSeconds(600),
521 this,
522 3,
523 0,
524 6.9539,
525 6.9539,
526 9.9539);
527 Simulator::Schedule(MilliSeconds(800),
529 this,
530 2,
531 0,
532 3.9539,
533 3.9539,
534 6.9539);
535 Simulator::Stop(Seconds(1.000));
536 Simulator::Run();
537
538 Simulator::Destroy();
539}
540
543 : LteUplinkPowerControlTestCase("Uplink Closed Loop Power Control: " + name)
544{
545 NS_LOG_INFO("Creating LteUplinkClosedLoopPowerControlAccumulatedModeTestCase");
546}
547
550{
551}
552
553void
555{
557 Config::SetDefault("ns3::LteHelper::UseIdealRrc", BooleanValue(false));
558
559 double eNbTxPower = 30;
560 Config::SetDefault("ns3::LteEnbPhy::TxPower", DoubleValue(eNbTxPower));
561 Config::SetDefault("ns3::LteUePhy::TxPower", DoubleValue(10.0));
562 Config::SetDefault("ns3::LteUePhy::EnableUplinkPowerControl", BooleanValue(true));
563
564 Config::SetDefault("ns3::LteUePowerControl::ClosedLoop", BooleanValue(true));
565 Config::SetDefault("ns3::LteUePowerControl::AccumulationEnabled", BooleanValue(true));
566 Config::SetDefault("ns3::LteUePowerControl::PoNominalPusch", IntegerValue(-90));
567 Config::SetDefault("ns3::LteUePowerControl::PsrsOffset", IntegerValue(9));
568
569 Ptr<LteHelper> lteHelper = CreateObject<LteHelper>();
570 lteHelper->SetFfrAlgorithmType("ns3::LteFfrSimple");
571
572 uint16_t bandwidth = 25;
573 double d1 = 10;
574
575 // Create Nodes: eNodeB and UE
576 NodeContainer enbNodes;
577 NodeContainer ueNodes;
578 enbNodes.Create(1);
579 ueNodes.Create(1);
580 NodeContainer allNodes = NodeContainer(enbNodes, ueNodes);
581
582 /* the topology is the following:
583 *
584 * eNB1-------------------------UE
585 * d1
586 */
587
588 // Install Mobility Model
589 Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator>();
590 positionAlloc->Add(Vector(0.0, 0.0, 0.0)); // eNB1
591 positionAlloc->Add(Vector(d1, 0.0, 0.0)); // UE1
592
594 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
595 mobility.SetPositionAllocator(positionAlloc);
596 mobility.Install(allNodes);
597 m_ueMobility = ueNodes.Get(0)->GetObject<MobilityModel>();
598
599 // Create Devices and install them in the Nodes (eNB and UE)
600 NetDeviceContainer enbDevs;
601 NetDeviceContainer ueDevs;
602 lteHelper->SetSchedulerType("ns3::PfFfMacScheduler");
603
604 lteHelper->SetEnbDeviceAttribute("DlBandwidth", UintegerValue(bandwidth));
605 lteHelper->SetEnbDeviceAttribute("UlBandwidth", UintegerValue(bandwidth));
606
607 enbDevs = lteHelper->InstallEnbDevice(enbNodes);
608 ueDevs = lteHelper->InstallUeDevice(ueNodes);
609
610 Ptr<LteUePhy> uePhy =
611 DynamicCast<LteUePhy>(ueDevs.Get(0)->GetObject<LteUeNetDevice>()->GetPhy());
612 m_ueUpc = uePhy->GetUplinkPowerControl();
613
614 m_ueUpc->TraceConnectWithoutContext("ReportPuschTxPower",
616 m_ueUpc->TraceConnectWithoutContext("ReportPucchTxPower",
618 m_ueUpc->TraceConnectWithoutContext("ReportSrsTxPower",
620
621 // Attach a UE to a eNB
622 lteHelper->Attach(ueDevs, enbDevs.Get(0));
623
624 // Activate a data radio bearer
625 enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE;
626 EpsBearer bearer(q);
627 lteHelper->ActivateDataRadioBearer(ueDevs, bearer);
628
629 PointerValue tmp;
630 enbDevs.Get(0)->GetAttribute("LteFfrAlgorithm", tmp);
631 m_ffrSimple = DynamicCast<LteFfrSimple>(tmp.GetObject());
632 m_accumulatedMode = true;
633
634 // Changing TPC value
635 Simulator::Schedule(MilliSeconds(0),
637 this,
638 1,
639 0,
640 -17.0461,
641 -17.0461,
642 -14.0461);
643 Simulator::Schedule(MilliSeconds(100),
645 this,
646 0,
647 20,
648 -37.0461,
649 -37.0461,
650 -34.0461);
651 Simulator::Schedule(MilliSeconds(200),
653 this,
654 0,
655 20,
656 -40,
657 10,
658 -37.0461);
659 Simulator::Schedule(MilliSeconds(300),
661 this,
662 2,
663 1,
664 -39.0461,
665 -39.0461,
666 -36.0461);
667 Simulator::Schedule(MilliSeconds(400),
669 this,
670 3,
671 10,
672 -9.0461,
673 -9.0461,
674 -6.0461);
675 Simulator::Schedule(MilliSeconds(500),
677 this,
678 2,
679 15,
680 5.9539,
681 5.9539,
682 8.9539);
683 Simulator::Schedule(MilliSeconds(600),
685 this,
686 3,
687 1,
688 8.9539,
689 8.9539,
690 11.9539);
691 Simulator::Schedule(MilliSeconds(700),
693 this,
694 2,
695 10,
696 18.9539,
697 18.9539,
698 21.9539);
699 Simulator::Schedule(MilliSeconds(800),
701 this,
702 2,
703 20,
704 23,
705 23,
706 23);
707 Simulator::Schedule(MilliSeconds(900),
709 this,
710 0,
711 1,
712 22.9539,
713 22.9539,
714 23);
715 Simulator::Schedule(MilliSeconds(1000),
717 this,
718 0,
719 20,
720 2.9539,
721 2.9539,
722 5.9539);
723 Simulator::Schedule(MilliSeconds(1100),
725 this,
726 2,
727 5,
728 7.9539,
729 7.9539,
730 10.9539);
731 Simulator::Stop(Seconds(1.200));
732 Simulator::Run();
733
734 Simulator::Destroy();
735}
AttributeValue implementation for Boolean.
Definition: boolean.h:37
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Definition: double.h:42
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Qci
QoS Class Indicator.
Definition: eps-bearer.h:106
Hold a signed integer type.
Definition: integer.h:45
void SetTpc(uint32_t tpc, uint32_t num, bool acculumatedMode)
Set transmission power control.
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:316
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:482
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:289
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:1044
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
Definition: lte-helper.cc:409
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
Definition: lte-helper.cc:1441
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:497
The LteUeNetDevice class implements the UE net device.
Ptr< LteUePhy > GetPhy() const
Get the Phy.
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.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
Definition: object-base.cc:369
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Definition: object.h:471
Hold objects of type Ptr<T>.
Definition: pointer.h:37
Ptr< Object > GetObject() const
Get the Object referenced by the PointerValue.
Definition: pointer.cc:57
Ptr< T > Get() const
Definition: pointer.h:205
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:305
A suite of tests to run.
Definition: test.h:1256
Hold an unsigned integer type.
Definition: uinteger.h:45
void Reset()
Reset the initial value of every attribute as well as the value of every global to what they were bef...
Definition: config.cc:856
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:891
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:275
auto MakeBoundCallback(R(*fnPtr)(Args...), BArgs... bargs)
Make Callbacks with varying number of bound arguments.
Definition: callback.h:752
Time Now()
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:296
#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:1338
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition: nstime.h:1350
Every class exported by the ns3 library is enclosed in the ns3 namespace.
mobility
Definition: third.py:96