A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>
18 * Modified by: Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015)
19 * Biljana Bojovic <biljana.bojovic@cttc.es> (Carrier Aggregation)
20 */
21
22#ifndef LTE_HELPER_H
23#define LTE_HELPER_H
24
31
32#include <ns3/component-carrier-enb.h>
33#include <ns3/config.h>
34#include <ns3/epc-tft.h>
35#include <ns3/eps-bearer.h>
36#include <ns3/mobility-model.h>
37#include <ns3/names.h>
38#include <ns3/net-device-container.h>
39#include <ns3/net-device.h>
40#include <ns3/node-container.h>
41#include <ns3/node.h>
42#include <ns3/simulator.h>
43
44#include <map>
45
46namespace ns3
47{
48
49class LteUePhy;
50class LteEnbPhy;
51class SpectrumChannel;
52class EpcHelper;
53class PropagationLossModel;
54class SpectrumPropagationLossModel;
55
56/**
57 * \ingroup lte
58 *
59 * Creation and configuration of LTE entities. One LteHelper instance is
60 * typically enough for an LTE simulation. To create it:
61 *
62 * Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
63 *
64 * The general responsibility of the helper is to create various LTE objects
65 * and arrange them together to make the whole LTE system. The overall
66 * arrangement would look like the following:
67 * - Downlink spectrum channel
68 * + Path loss model
69 * + Fading model
70 * - Uplink spectrum channel
71 * + Path loss model
72 * + Fading model
73 * - eNodeB node(s)
74 * + Mobility model
75 * + eNodeB device(s)
76 * * Antenna model
77 * * eNodeB PHY (includes spectrum PHY, interference model, HARQ model)
78 * * eNodeB MAC
79 * * eNodeB RRC (includes RRC protocol)
80 * * Scheduler
81 * * Handover algorithm
82 * * FFR (frequency reuse) algorithm
83 * * ANR (automatic neighbour relation)
84 * * CCM (Carrier Component Manager)
85 * + EPC related models (EPC application, Internet stack, X2 interface)
86 * - UE node(s)
87 * + Mobility model
88 * + UE device(s)
89 * * Antenna model
90 * * UE PHY (includes spectrum PHY, interference model, HARQ model)
91 * * UE MAC
92 * * UE RRC (includes RRC protocol)
93 * * NAS
94 * - EPC helper
95 * - Various statistics calculator objects
96 *
97 * Spetrum channels are created automatically: one for DL, and one for UL.
98 * eNodeB devices are created by calling InstallEnbDevice(), while UE devices
99 * are created by calling InstallUeDevice(). EPC helper can be set by using
100 * SetEpcHelper().
101 */
102class LteHelper : public Object
103{
104 public:
105 LteHelper();
106 ~LteHelper() override;
107
108 /**
109 * Register this type.
110 * \return The object TypeId.
111 */
112 static TypeId GetTypeId();
113 void DoDispose() override;
114
115 /**
116 * Set the EpcHelper to be used to setup the EPC network in
117 * conjunction with the setup of the LTE radio access network.
118 *
119 * \note if no EpcHelper is ever set, then LteHelper will default
120 * to creating an LTE-only simulation with no EPC, using LteRlcSm as
121 * the RLC model, and without supporting any IP networking. In other
122 * words, it will be a radio-level simulation involving only LTE PHY
123 * and MAC and the FF Scheduler, with a saturation traffic model for
124 * the RLC.
125 *
126 * \param h a pointer to the EpcHelper to be used
127 */
129
130 /**
131 * Set the type of path loss model to be used for both DL and UL channels.
132 *
133 * \param type type of path loss model, must be a type name of any class
134 * inheriting from ns3::PropagationLossModel, for example:
135 * "ns3::FriisPropagationLossModel"
136 */
137 void SetPathlossModelType(TypeId type);
138
139 /**
140 * Set an attribute for the path loss models to be created.
141 *
142 * \param n the name of the attribute
143 * \param v the value of the attribute
144 */
145 void SetPathlossModelAttribute(std::string n, const AttributeValue& v);
146
147 /**
148 * Set the type of scheduler to be used by eNodeB devices.
149 *
150 * \param type type of scheduler, must be a type name of any class
151 * inheriting from ns3::FfMacScheduler, for example:
152 * "ns3::PfFfMacScheduler"
153 *
154 * Equivalent with setting the `Scheduler` attribute.
155 */
156 void SetSchedulerType(std::string type);
157
158 /**
159 *
160 * \return the scheduler type
161 */
162 std::string GetSchedulerType() const;
163
164 /**
165 * Set an attribute for the scheduler to be created.
166 *
167 * \param n the name of the attribute
168 * \param v the value of the attribute
169 */
170 void SetSchedulerAttribute(std::string n, const AttributeValue& v);
171
172 /**
173 * Set the type of FFR algorithm to be used by eNodeB devices.
174 *
175 * \param type type of FFR algorithm, must be a type name of any class
176 * inheriting from ns3::LteFfrAlgorithm, for example:
177 * "ns3::LteFrNoOpAlgorithm"
178 *
179 * Equivalent with setting the `FfrAlgorithm` attribute.
180 */
181 void SetFfrAlgorithmType(std::string type);
182
183 /**
184 *
185 * \return the FFR algorithm type
186 */
187 std::string GetFfrAlgorithmType() const;
188
189 /**
190 * Set an attribute for the FFR algorithm to be created.
191 *
192 * \param n the name of the attribute
193 * \param v the value of the attribute
194 */
195 void SetFfrAlgorithmAttribute(std::string n, const AttributeValue& v);
196
197 /**
198 * Set the type of handover algorithm to be used by eNodeB devices.
199 *
200 * \param type type of handover algorithm, must be a type name of any class
201 * inheriting from ns3::LteHandoverAlgorithm, for example:
202 * "ns3::NoOpHandoverAlgorithm"
203 *
204 * Equivalent with setting the `HandoverAlgorithm` attribute.
205 */
206 void SetHandoverAlgorithmType(std::string type);
207
208 /**
209 *
210 * \return the handover algorithm type
211 */
212 std::string GetHandoverAlgorithmType() const;
213
214 /**
215 * Set an attribute for the handover algorithm to be created.
216 *
217 * \param n the name of the attribute
218 * \param v the value of the attribute
219 */
220 void SetHandoverAlgorithmAttribute(std::string n, const AttributeValue& v);
221
222 /**
223 * Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
224 *
225 * \param n the name of the attribute.
226 * \param v the value of the attribute
227 */
228 void SetEnbDeviceAttribute(std::string n, const AttributeValue& v);
229
230 /**
231 * Set the type of antenna model to be used by eNodeB devices.
232 *
233 * \param type type of antenna model, must be a type name of any class
234 * inheriting from ns3::AntennaModel, for example:
235 * "ns3::IsotropicAntennaModel"
236 */
237 void SetEnbAntennaModelType(std::string type);
238
239 /**
240 * Set an attribute for the eNodeB antenna model to be created.
241 *
242 * \param n the name of the attribute.
243 * \param v the value of the attribute
244 */
245 void SetEnbAntennaModelAttribute(std::string n, const AttributeValue& v);
246
247 /**
248 * Set an attribute for the UE devices (LteUeNetDevice) to be created.
249 *
250 * \param n the name of the attribute.
251 * \param v the value of the attribute
252 */
253 void SetUeDeviceAttribute(std::string n, const AttributeValue& v);
254
255 /**
256 * Set the type of antenna model to be used by UE devices.
257 *
258 * \param type type of antenna model, must be a type name of any class
259 * inheriting from ns3::AntennaModel, for example:
260 * "ns3::IsotropicAntennaModel"
261 */
262 void SetUeAntennaModelType(std::string type);
263
264 /**
265 * Set an attribute for the UE antenna model to be created.
266 *
267 * \param n the name of the attribute
268 * \param v the value of the attribute
269 */
270 void SetUeAntennaModelAttribute(std::string n, const AttributeValue& v);
271
272 /**
273 * Set the type of spectrum channel to be used in both DL and UL.
274 *
275 * \param type type of spectrum channel model, must be a type name of any
276 * class inheriting from ns3::SpectrumChannel, for example:
277 * "ns3::MultiModelSpectrumChannel"
278 */
279 void SetSpectrumChannelType(std::string type);
280
281 /**
282 * Set an attribute for the spectrum channel to be created (both DL and UL).
283 *
284 * \param n the name of the attribute
285 * \param v the value of the attribute
286 */
287 void SetSpectrumChannelAttribute(std::string n, const AttributeValue& v);
288
289 /**
290 * Set the type of carrier component algorithm to be used by eNodeB devices.
291 *
292 * \param type type of carrier component manager
293 *
294 */
295 void SetEnbComponentCarrierManagerType(std::string type);
296
297 /**
298 *
299 * \return the carrier enb component carrier manager type
300 */
301 std::string GetEnbComponentCarrierManagerType() const;
302
303 /**
304 * Set an attribute for the enb component carrier manager to be created.
305 *
306 * \param n the name of the attribute
307 * \param v the value of the attribute
308 */
309 void SetEnbComponentCarrierManagerAttribute(std::string n, const AttributeValue& v);
310
311 /**
312 * Set the type of Component Carrier Manager to be used by Ue devices.
313 *
314 * \param type type of UE Component Carrier Manager
315 *
316 */
317 void SetUeComponentCarrierManagerType(std::string type);
318
319 /**
320 *
321 * \return the carrier ue component carrier manager type
322 */
323 std::string GetUeComponentCarrierManagerType() const;
324
325 /**
326 * Set an attribute for the ue component carrier manager to be created.
327 *
328 * \param n the name of the attribute
329 * \param v the value of the attribute
330 */
331 void SetUeComponentCarrierManagerAttribute(std::string n, const AttributeValue& v);
332
333 /**
334 * Create a set of eNodeB devices.
335 *
336 * \param c the node container where the devices are to be installed
337 * \return the NetDeviceContainer with the newly created devices
338 */
340
341 /**
342 * Create a set of UE devices.
343 *
344 * \param c the node container where the devices are to be installed
345 * \return the NetDeviceContainer with the newly created devices
346 */
348
349 /**
350 * \brief Enables automatic attachment of a set of UE devices to a suitable
351 * cell using Idle mode initial cell selection procedure.
352 * \param ueDevices the set of UE devices to be attached
353 *
354 * By calling this, the UE will start the initial cell selection procedure at
355 * the beginning of simulation. In addition, the function also instructs each
356 * UE to immediately enter CONNECTED mode and activates the default EPS
357 * bearer.
358 *
359 * If this function is called when the UE is in a situation where entering
360 * CONNECTED mode is not possible (e.g. before the simulation begin), then the
361 * UE will attempt to connect at the earliest possible time (e.g. after it
362 * camps to a suitable cell).
363 *
364 * Note that this function can only be used in EPC-enabled simulation.
365 */
366 void Attach(NetDeviceContainer ueDevices);
367
368 /**
369 * \brief Enables automatic attachment of a UE device to a suitable cell
370 * using Idle mode initial cell selection procedure.
371 * \param ueDevice the UE device to be attached
372 *
373 * By calling this, the UE will start the initial cell selection procedure at
374 * the beginning of simulation. In addition, the function also instructs the
375 * UE to immediately enter CONNECTED mode and activates the default EPS
376 * bearer.
377 *
378 * If this function is called when the UE is in a situation where entering
379 * CONNECTED mode is not possible (e.g. before the simulation begin), then the
380 * UE will attempt to connect at the earliest possible time (e.g. after it
381 * camps to a suitable cell).
382 *
383 * Note that this function can only be used in EPC-enabled simulation.
384 */
385 void Attach(Ptr<NetDevice> ueDevice);
386
387 /**
388 * \brief Manual attachment of a set of UE devices to the network via a given
389 * eNodeB.
390 * \param ueDevices the set of UE devices to be attached
391 * \param enbDevice the destination eNodeB device
392 *
393 * In addition, the function also instructs each UE to immediately enter
394 * CONNECTED mode and activates the default EPS bearer.
395 *
396 * The function can be used in both LTE-only and EPC-enabled simulations.
397 * Note that this function will disable Idle mode initial cell selection
398 * procedure.
399 */
400 void Attach(NetDeviceContainer ueDevices, Ptr<NetDevice> enbDevice);
401
402 /**
403 * \brief Manual attachment of a UE device to the network via a given eNodeB.
404 * \param ueDevice the UE device to be attached
405 * \param enbDevice the destination eNodeB device
406 * \param componentCarrierId the destination eNodeB component carrier
407 *
408 * In addition, the function also instructs the UE to immediately enter
409 * CONNECTED mode and activates the default EPS bearer.
410 *
411 * The function can be used in both LTE-only and EPC-enabled simulations.
412 * Note that this function will disable Idle mode initial cell selection
413 * procedure.
414 */
415 void Attach(Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice, uint8_t componentCarrierId = 0);
416
417 /**
418 * \brief Manual attachment of a set of UE devices to the network via the
419 * closest eNodeB (with respect to distance) among those in the set.
420 * \param ueDevices the set of UE devices to be attached
421 * \param enbDevices the set of eNodeB devices to be considered
422 *
423 * This function finds among the eNodeB set the closest eNodeB for each UE,
424 * and then invokes manual attachment between the pair.
425 *
426 * Users are encouraged to use automatic attachment (Idle mode cell selection)
427 * instead of this function.
428 *
429 * \sa LteHelper::Attach(NetDeviceContainer ueDevices);
430 */
431 void AttachToClosestEnb(NetDeviceContainer ueDevices, NetDeviceContainer enbDevices);
432
433 /**
434 * \brief Manual attachment of a UE device to the network via the closest
435 * eNodeB (with respect to distance) among those in the set.
436 * \param ueDevice the UE device to be attached
437 * \param enbDevices the set of eNodeB devices to be considered
438 *
439 * This function finds among the eNodeB set the closest eNodeB for the UE,
440 * and then invokes manual attachment between the pair.
441 *
442 * Users are encouraged to use automatic attachment (Idle mode cell selection)
443 * instead of this function.
444 *
445 * \sa LteHelper::Attach(Ptr<NetDevice> ueDevice);
446 */
447 void AttachToClosestEnb(Ptr<NetDevice> ueDevice, NetDeviceContainer enbDevices);
448
449 /**
450 * Activate a dedicated EPS bearer on a given set of UE devices.
451 *
452 * \param ueDevices the set of UE devices
453 * \param bearer the characteristics of the bearer to be activated
454 * \param tft the Traffic Flow Template that identifies the traffic to go on this bearer
455 * \returns bearer ID
456 */
458 EpsBearer bearer,
459 Ptr<EpcTft> tft);
460
461 /**
462 * Activate a dedicated EPS bearer on a given UE device.
463 *
464 * \param ueDevice the UE device
465 * \param bearer the characteristics of the bearer to be activated
466 * \param tft the Traffic Flow Template that identifies the traffic to go on this bearer.
467 * \returns bearer ID
468 */
469 uint8_t ActivateDedicatedEpsBearer(Ptr<NetDevice> ueDevice, EpsBearer bearer, Ptr<EpcTft> tft);
470
471 /**
472 * \brief Manually trigger dedicated bearer de-activation at specific simulation time
473 * \param ueDevice the UE on which dedicated bearer to be de-activated must be of the type
474 * LteUeNetDevice
475 * \param enbDevice eNB, must be of the type LteEnbNetDevice
476 * \param bearerId Bearer Identity which is to be de-activated
477 *
478 * \warning Requires the use of EPC mode. See SetEpcHelper() method.
479 */
480
482 Ptr<NetDevice> enbDevice,
483 uint8_t bearerId);
484 /**
485 * Create an X2 interface between all the eNBs in a given set.
486 *
487 * \param enbNodes the set of eNB nodes
488 */
489 void AddX2Interface(NodeContainer enbNodes);
490
491 /**
492 * Create an X2 interface between two eNBs.
493 *
494 * \param enbNode1 one eNB of the X2 interface
495 * \param enbNode2 the other eNB of the X2 interface
496 */
497 void AddX2Interface(Ptr<Node> enbNode1, Ptr<Node> enbNode2);
498
499 /**
500 * Manually trigger an X2-based handover.
501 *
502 * \param hoTime when the handover shall be initiated
503 * \param ueDev the UE that hands off, must be of the type LteUeNetDevice
504 * \param sourceEnbDev source eNB, must be of the type LteEnbNetDevice
505 * (originally the UE is attached to this eNB)
506 * \param targetEnbDev target eNB, must be of the type LteEnbNetDevice
507 * (the UE would be connected to this eNB after the
508 * handover)
509 *
510 * \warning Requires the use of EPC mode. See SetEpcHelper() method
511 */
512 void HandoverRequest(Time hoTime,
513 Ptr<NetDevice> ueDev,
514 Ptr<NetDevice> sourceEnbDev,
515 Ptr<NetDevice> targetEnbDev);
516
517 /**
518 * Manually trigger an X2-based handover.
519 *
520 * \param hoTime when the handover shall be initiated
521 * \param ueDev the UE that hands off, must be of the type LteUeNetDevice
522 * \param sourceEnbDev source eNB, must be of the type LteEnbNetDevice
523 * (originally the UE is attached to this eNB)
524 * \param targetCellId target CellId (the UE primary component carrier will
525 * be connected to this cell after the handover)
526 *
527 * \warning Requires the use of EPC mode. See SetEpcHelper() method
528 */
529 void HandoverRequest(Time hoTime,
530 Ptr<NetDevice> ueDev,
531 Ptr<NetDevice> sourceEnbDev,
532 uint16_t targetCellId);
533
534 /**
535 * Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
536 *
537 * \param ueDevices the set of UE devices
538 * \param bearer the characteristics of the bearer to be activated
539 */
541
542 /**
543 * Activate a Data Radio Bearer on a UE device (for LTE-only simulation).
544 * This method will schedule the actual activation
545 * the bearer so that it happens after the UE got connected.
546 *
547 * \param ueDevice the UE device
548 * \param bearer the characteristics of the bearer to be activated
549 */
550 void ActivateDataRadioBearer(Ptr<NetDevice> ueDevice, EpsBearer bearer);
551
552 /**
553 * Set the type of fading model to be used in both DL and UL.
554 *
555 * \param type type of fading model, must be a type name of any class
556 * inheriting from ns3::SpectrumPropagationLossModel, for
557 * example: "ns3::TraceFadingLossModel"
558 */
559 void SetFadingModel(std::string type);
560
561 /**
562 * Set an attribute for the fading model to be created (both DL and UL).
563 *
564 * \param n the name of the attribute
565 * \param v the value of the attribute
566 */
567 void SetFadingModelAttribute(std::string n, const AttributeValue& v);
568
569 /**
570 * Enables full-blown logging for major components of the LENA architecture.
571 */
572 void EnableLogComponents();
573
574 /**
575 * Enables trace sinks for PHY, MAC, RLC and PDCP. To make sure all nodes are
576 * traced, traces should be enabled once all UEs and eNodeBs are in place and
577 * connected, just before starting the simulation.
578 */
579 void EnableTraces();
580
581 /**
582 * Enable trace sinks for PHY layer.
583 */
584 void EnablePhyTraces();
585
586 /**
587 * Enable trace sinks for DL PHY layer.
588 */
589 void EnableDlPhyTraces();
590
591 /**
592 * Enable trace sinks for UL PHY layer.
593 */
594 void EnableUlPhyTraces();
595
596 /**
597 * Enable trace sinks for DL transmission PHY layer.
598 */
599 void EnableDlTxPhyTraces();
600
601 /**
602 * Enable trace sinks for UL transmission PHY layer.
603 */
604 void EnableUlTxPhyTraces();
605
606 /**
607 * Enable trace sinks for DL reception PHY layer.
608 */
609 void EnableDlRxPhyTraces();
610
611 /**
612 * Enable trace sinks for UL reception PHY layer.
613 */
614 void EnableUlRxPhyTraces();
615
616 /**
617 * Enable trace sinks for MAC layer.
618 */
619 void EnableMacTraces();
620
621 /**
622 * Enable trace sinks for DL MAC layer.
623 */
624 void EnableDlMacTraces();
625
626 /**
627 * Enable trace sinks for UL MAC layer.
628 */
629 void EnableUlMacTraces();
630
631 /**
632 * Enable trace sinks for RLC layer.
633 */
634 void EnableRlcTraces();
635
636 /**
637 *
638 * \return the RLC stats calculator object
639 */
641
642 /**
643 * Enable trace sinks for PDCP layer
644 */
645 void EnablePdcpTraces();
646
647 /**
648 *
649 * \return the PDCP stats calculator object
650 */
652
653 /**
654 * Assign a fixed random variable stream number to the random variables used.
655 *
656 * The InstallEnbDevice() or InstallUeDevice method should have previously
657 * been called by the user on the given devices.
658 *
659 * If TraceFadingLossModel has been set as the fading model type, this method
660 * will also assign a stream number to it, if none has been assigned before.
661 *
662 * If an EPC has been configured, streams will be assigned on the EPC
663 * nodes as well via EpcHelper::AssignStreams ().
664 *
665 * \param c NetDeviceContainer of the set of net devices for which the
666 * LteNetDevice should be modified to use a fixed stream
667 * \param stream first stream index to use
668 * \return the number of stream indices (possibly zero) that have been assigned
669 */
670 int64_t AssignStreams(NetDeviceContainer c, int64_t stream);
671
672 /**
673 * \return a pointer to the SpectrumChannel instance used for the uplink
674 */
676
677 /**
678 * \return a pointer to the SpectrumChannel instance used for the downlink
679 */
681
682 protected:
683 // inherited from Object
684 void DoInitialize() override;
685
686 private:
687 /**
688 * Configure the component carriers
689 *
690 * \param ulEarfcn uplink EARFCN
691 * \param dlEarfcn downlink EARFCN
692 * \param ulbw uplink bandwidth for each CC
693 * \param dlbw downlink bandwidth for each CC
694 */
696 uint32_t dlEarfcn,
697 uint16_t ulbw,
698 uint16_t dlbw);
699 /**
700 * Create an eNodeB device (LteEnbNetDevice) on the given node.
701 * \param n the node where the device is to be installed
702 * \return pointer to the created device
703 */
705
706 /**
707 * Create a UE device (LteUeNetDevice) on the given node
708 * \param n the node where the device is to be installed
709 * \return pointer to the created device
710 */
712
713 /**
714 * The actual function to trigger a manual handover.
715 * \param ueDev the UE that hands off, must be of the type LteUeNetDevice
716 * \param sourceEnbDev source eNB, must be of the type LteEnbNetDevice
717 * (originally the UE is attached to this eNB)
718 * \param targetCellId target CellId (the UE primary component carrier will
719 * be connected to this cell after the handover)
720 *
721 * This method is normally scheduled by HandoverRequest() to run at a specific
722 * time where a manual handover is desired by the simulation user.
723 */
725 Ptr<NetDevice> sourceEnbDev,
726 uint16_t targetCellId);
727
728 /**
729 * \brief The actual function to trigger a manual bearer de-activation
730 * \param ueDevice the UE on which bearer to be de-activated must be of the type LteUeNetDevice
731 * \param enbDevice eNB, must be of the type LteEnbNetDevice
732 * \param bearerId Bearer Identity which is to be de-activated
733 *
734 * This method is normally scheduled by DeActivateDedicatedEpsBearer() to run at a specific
735 * time when a manual bearer de-activation is desired by the simulation user.
736 */
738 Ptr<NetDevice> enbDevice,
739 uint8_t bearerId);
740
741 /// Function that performs a channel model initialization of all component carriers
743
744 /**
745 * \brief This function create the component carrier based on provided configuration parameters
746 */
747
748 /// The downlink LTE channel used in the simulation.
750 /// The uplink LTE channel used in the simulation.
752 /// The path loss model used in the downlink channel.
754 /// The path loss model used in the uplink channel.
756
757 /// Factory of MAC scheduler object.
759 /// Factory of FFR (frequency reuse) algorithm object.
761 /// Factory of handover algorithm object.
763 /// Factory of enb component carrier manager object.
765 /// Factory of ue component carrier manager object.
767 /// Factory of LteEnbNetDevice objects.
769 /// Factory of antenna object for eNodeB.
771 /// Factory for LteUeNetDevice objects.
773 /// Factory of antenna object for UE.
775 /// Factory of path loss model object.
777 /// Factory of both the downlink and uplink LTE channels.
779
780 /// Name of fading model type, e.g., "ns3::TraceFadingLossModel".
781 std::string m_fadingModelType;
782 /// Factory of fading model object for both the downlink and uplink channels.
784 /// The fading model used in both the downlink and uplink channels.
786 /**
787 * True if a random variable stream number has been assigned for the fading
788 * model. Used to prevent such assignment to be done more than once.
789 */
791
792 /// Container of PHY layer statistics.
794 /// Container of PHY layer statistics related to transmission.
796 /// Container of PHY layer statistics related to reception.
798 /// Container of MAC layer statistics.
800 /// Container of RLC layer statistics.
802 /// Container of PDCP layer statistics.
804 /// Connects RLC and PDCP statistics containers to appropriate trace sources
806
807 /**
808 * Helper which provides implementation of core network. Initially empty
809 * (i.e., LTE-only simulation without any core network) and then might be
810 * set using SetEpcHelper().
811 */
813
814 /**
815 * Keep track of the number of IMSI allocated. Increases by one every time a
816 * new UE is installed (by InstallSingleUeDevice()). The first UE will have
817 * an IMSI of 1. The maximum number of UE is 2^64 (~4.2e9).
818 */
820 /**
821 * Keep track of the number of cell ID allocated. Increases by one every time
822 * a new eNodeB is installed (by InstallSingleEnbDevice()). The first eNodeB
823 * will have a cell ID of 1. The maximum number of eNodeB is 65535.
824 */
826
827 /**
828 * The `UseIdealRrc` attribute. If true, LteRrcProtocolIdeal will be used for
829 * RRC signaling. If false, LteRrcProtocolReal will be used.
830 */
832 /**
833 * The `AnrEnabled` attribute. Activate or deactivate Automatic Neighbour
834 * Relation function.
835 */
837 /**
838 * The `UsePdschForCqiGeneration` attribute. If true, DL-CQI will be
839 * calculated from PDCCH as signal and PDSCH as interference. If false,
840 * DL-CQI will be calculated from PDCCH as signal and PDCCH as interference.
841 */
843
844 /**
845 * The `UseCa` attribute. If true, Carrier Aggregation is enabled.
846 * Hence, the helper will expect a valid component carrier map
847 * If it is false, the component carrier will be created within the LteHelper
848 * this is to maintain the backwards compatibility with user script
849 */
851
852 /**
853 * This contains all the information about each component carrier
854 */
855 std::map<uint8_t, ComponentCarrier> m_componentCarrierPhyParams;
856
857 /**
858 * Number of component carriers that will be installed by default at eNodeB and UE devices.
859 */
860 uint16_t m_noOfCcs;
861
862}; // end of `class LteHelper`
863
864} // namespace ns3
865
866#endif // LTE_HELPER_H
Hold a value for an Attribute.
Definition: attribute.h:70
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Creation and configuration of LTE entities.
Definition: lte-helper.h:103
void SetFfrAlgorithmType(std::string type)
Set the type of FFR algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:319
Ptr< SpectrumPropagationLossModel > m_fadingModel
The fading model used in both the downlink and uplink channels.
Definition: lte-helper.h:785
Ptr< Object > m_uplinkPathlossModel
The path loss model used in the uplink channel.
Definition: lte-helper.h:755
void EnableLogComponents()
Enables full-blown logging for major components of the LENA architecture.
Definition: lte-helper.cc:1446
Ptr< SpectrumChannel > GetUplinkSpectrumChannel() const
Definition: lte-helper.cc:218
void SetEnbComponentCarrierManagerType(std::string type)
Set the type of carrier component algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:361
void EnableUlRxPhyTraces()
Enable trace sinks for UL reception PHY layer.
Definition: lte-helper.cc:1651
ObjectFactory m_schedulerFactory
Factory of MAC scheduler object.
Definition: lte-helper.h:758
void SetUeAntennaModelType(std::string type)
Set the type of antenna model to be used by UE devices.
Definition: lte-helper.cc:440
ObjectFactory m_ffrAlgorithmFactory
Factory of FFR (frequency reuse) algorithm object.
Definition: lte-helper.h:760
ObjectFactory m_channelFactory
Factory of both the downlink and uplink LTE channels.
Definition: lte-helper.h:778
void SetEpcHelper(Ptr< EpcHelper > h)
Set the EpcHelper to be used to setup the EPC network in conjunction with the setup of the LTE radio ...
Definition: lte-helper.cc:285
Ptr< RadioBearerStatsCalculator > GetRlcStats()
Definition: lte-helper.cc:1701
ObjectFactory m_handoverAlgorithmFactory
Factory of handover algorithm object.
Definition: lte-helper.h:762
std::string m_fadingModelType
Name of fading model type, e.g., "ns3::TraceFadingLossModel".
Definition: lte-helper.h:781
Ptr< RadioBearerStatsCalculator > GetPdcpStats()
Definition: lte-helper.cc:1716
void EnableDlMacTraces()
Enable trace sinks for DL MAC layer.
Definition: lte-helper.cc:1666
ObjectFactory m_enbComponentCarrierManagerFactory
Factory of enb component carrier manager object.
Definition: lte-helper.h:764
void SetFadingModel(std::string type)
Set the type of fading model to be used in both DL and UL.
Definition: lte-helper.cc:454
void DoDeActivateDedicatedEpsBearer(Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice, uint8_t bearerId)
The actual function to trigger a manual bearer de-activation.
Definition: lte-helper.cc:1401
std::string GetEnbComponentCarrierManagerType() const
Definition: lte-helper.cc:355
void SetSchedulerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the scheduler to be created.
Definition: lte-helper.cc:306
Ptr< SpectrumChannel > GetDownlinkSpectrumChannel() const
Definition: lte-helper.cc:224
~LteHelper() override
Definition: lte-helper.cc:105
std::map< uint8_t, ComponentCarrier > m_componentCarrierPhyParams
This contains all the information about each component carrier.
Definition: lte-helper.h:855
Ptr< MacStatsCalculator > m_macStats
Container of MAC layer statistics.
Definition: lte-helper.h:799
void SetHandoverAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the handover algorithm to be created.
Definition: lte-helper.cc:348
void EnablePhyTraces()
Enable trace sinks for PHY layer.
Definition: lte-helper.cc:1616
void DeActivateDedicatedEpsBearer(Ptr< NetDevice > ueDevice, Ptr< NetDevice > enbDevice, uint8_t bearerId)
Manually trigger dedicated bearer de-activation at specific simulation time.
Definition: lte-helper.cc:1387
void HandoverRequest(Time hoTime, Ptr< NetDevice > ueDev, Ptr< NetDevice > sourceEnbDev, Ptr< NetDevice > targetEnbDev)
Manually trigger an X2-based handover.
Definition: lte-helper.cc:1338
Ptr< SpectrumChannel > m_downlinkChannel
This function create the component carrier based on provided configuration parameters.
Definition: lte-helper.h:749
NetDeviceContainer InstallEnbDevice(NodeContainer c)
Create a set of eNodeB devices.
Definition: lte-helper.cc:485
void SetUeComponentCarrierManagerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the ue component carrier manager to be created.
Definition: lte-helper.cc:390
uint16_t m_cellIdCounter
Keep track of the number of cell ID allocated.
Definition: lte-helper.h:825
std::string GetFfrAlgorithmType() const
Definition: lte-helper.cc:313
void SetHandoverAlgorithmType(std::string type)
Set the type of handover algorithm to be used by eNodeB devices.
Definition: lte-helper.cc:340
void SetPathlossModelType(TypeId type)
Set the type of path loss model to be used for both DL and UL channels.
Definition: lte-helper.cc:397
void EnablePdcpTraces()
Enable trace sinks for PDCP layer.
Definition: lte-helper.cc:1707
Ptr< PhyTxStatsCalculator > m_phyTxStats
Container of PHY layer statistics related to transmission.
Definition: lte-helper.h:795
void SetEnbAntennaModelType(std::string type)
Set the type of antenna model to be used by eNodeB devices.
Definition: lte-helper.cc:419
void EnableTraces()
Enables trace sinks for PHY, MAC, RLC and PDCP.
Definition: lte-helper.cc:1549
void SetFfrAlgorithmAttribute(std::string n, const AttributeValue &v)
Set an attribute for the FFR algorithm to be created.
Definition: lte-helper.cc:327
void DoHandoverRequest(Ptr< NetDevice > ueDev, Ptr< NetDevice > sourceEnbDev, uint16_t targetCellId)
The actual function to trigger a manual handover.
Definition: lte-helper.cc:1375
bool m_isAnrEnabled
The AnrEnabled attribute.
Definition: lte-helper.h:836
void SetEnbComponentCarrierManagerAttribute(std::string n, const AttributeValue &v)
Set an attribute for the enb component carrier manager to be created.
Definition: lte-helper.cc:369
void DoInitialize() override
Initialize() implementation.
Definition: lte-helper.cc:94
Ptr< PhyRxStatsCalculator > m_phyRxStats
Container of PHY layer statistics related to reception.
Definition: lte-helper.h:797
void SetSpectrumChannelType(std::string type)
Set the type of spectrum channel to be used in both DL and UL.
Definition: lte-helper.cc:472
void EnableDlRxPhyTraces()
Enable trace sinks for DL reception PHY layer.
Definition: lte-helper.cc:1643
ObjectFactory m_pathlossModelFactory
Factory of path loss model object.
Definition: lte-helper.h:776
bool m_fadingStreamsAssigned
True if a random variable stream number has been assigned for the fading model.
Definition: lte-helper.h:790
std::string GetUeComponentCarrierManagerType() const
Definition: lte-helper.cc:376
void SetSchedulerType(std::string type)
Set the type of scheduler to be used by eNodeB devices.
Definition: lte-helper.cc:292
RadioBearerStatsConnector m_radioBearerStatsConnector
Connects RLC and PDCP statistics containers to appropriate trace sources.
Definition: lte-helper.h:805
void Attach(NetDeviceContainer ueDevices)
Enables automatic attachment of a set of UE devices to a suitable cell using Idle mode initial cell s...
Definition: lte-helper.cc:1039
void DoDispose() override
Destructor implementation.
Definition: lte-helper.cc:208
ObjectFactory m_enbNetDeviceFactory
Factory of LteEnbNetDevice objects.
Definition: lte-helper.h:768
void EnableUlMacTraces()
Enable trace sinks for UL MAC layer.
Definition: lte-helper.cc:1674
std::string GetHandoverAlgorithmType() const
Definition: lte-helper.cc:334
Ptr< PhyStatsCalculator > m_phyStats
Container of PHY layer statistics.
Definition: lte-helper.h:793
void EnableUlPhyTraces()
Enable trace sinks for UL PHY layer.
Definition: lte-helper.cc:1691
void EnableDlTxPhyTraces()
Enable trace sinks for DL transmission PHY layer.
Definition: lte-helper.cc:1627
void SetPathlossModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the path loss models to be created.
Definition: lte-helper.cc:405
void EnableRlcTraces()
Enable trace sinks for RLC layer.
Definition: lte-helper.cc:1558
bool m_useIdealRrc
The UseIdealRrc attribute.
Definition: lte-helper.h:831
ObjectFactory m_ueComponentCarrierManagerFactory
Factory of ue component carrier manager object.
Definition: lte-helper.h:766
void DoComponentCarrierConfigure(uint32_t ulEarfcn, uint32_t dlEarfcn, uint16_t ulbw, uint16_t dlbw)
Configure the component carriers.
Definition: lte-helper.cc:1417
Ptr< Object > m_downlinkPathlossModel
The path loss model used in the downlink channel.
Definition: lte-helper.h:753
Ptr< RadioBearerStatsCalculator > m_pdcpStats
Container of PDCP layer statistics.
Definition: lte-helper.h:803
void ChannelModelInitialization()
Function that performs a channel model initialization of all component carriers.
Definition: lte-helper.cc:230
void EnableUlTxPhyTraces()
Enable trace sinks for UL transmission PHY layer.
Definition: lte-helper.cc:1635
bool m_usePdschForCqiGeneration
The UsePdschForCqiGeneration attribute.
Definition: lte-helper.h:842
void SetUeAntennaModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the UE antenna model to be created.
Definition: lte-helper.cc:447
void SetEnbAntennaModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB antenna model to be created.
Definition: lte-helper.cc:426
static TypeId GetTypeId()
Register this type.
Definition: lte-helper.cc:111
void SetEnbDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the eNodeB devices (LteEnbNetDevice) to be created.
Definition: lte-helper.cc:412
bool m_useCa
The UseCa attribute.
Definition: lte-helper.h:850
void ActivateDataRadioBearer(NetDeviceContainer ueDevices, EpsBearer bearer)
Activate a Data Radio Bearer on a given UE devices (for LTE-only simulation).
Definition: lte-helper.cc:1436
NetDeviceContainer InstallUeDevice(NodeContainer c)
Create a set of UE devices.
Definition: lte-helper.cc:500
uint64_t m_imsiCounter
Keep track of the number of IMSI allocated.
Definition: lte-helper.h:819
ObjectFactory m_ueNetDeviceFactory
Factory for LteUeNetDevice objects.
Definition: lte-helper.h:772
ObjectFactory m_ueAntennaModelFactory
Factory of antenna object for UE.
Definition: lte-helper.h:774
Ptr< SpectrumChannel > m_uplinkChannel
The uplink LTE channel used in the simulation.
Definition: lte-helper.h:751
void EnableMacTraces()
Enable trace sinks for MAC layer.
Definition: lte-helper.cc:1659
void SetSpectrumChannelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the spectrum channel to be created (both DL and UL).
Definition: lte-helper.cc:479
void EnableDlPhyTraces()
Enable trace sinks for DL PHY layer.
Definition: lte-helper.cc:1682
void AddX2Interface(NodeContainer enbNodes)
Create an X2 interface between all the eNBs in a given set.
Definition: lte-helper.cc:1313
void SetUeDeviceAttribute(std::string n, const AttributeValue &v)
Set an attribute for the UE devices (LteUeNetDevice) to be created.
Definition: lte-helper.cc:433
uint16_t m_noOfCcs
Number of component carriers that will be installed by default at eNodeB and UE devices.
Definition: lte-helper.h:860
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used.
Definition: lte-helper.cc:1567
void SetFadingModelAttribute(std::string n, const AttributeValue &v)
Set an attribute for the fading model to be created (both DL and UL).
Definition: lte-helper.cc:466
Ptr< EpcHelper > m_epcHelper
Helper which provides implementation of core network.
Definition: lte-helper.h:812
void AttachToClosestEnb(NetDeviceContainer ueDevices, NetDeviceContainer enbDevices)
Manual attachment of a set of UE devices to the network via the closest eNodeB (with respect to dista...
Definition: lte-helper.cc:1122
uint8_t ActivateDedicatedEpsBearer(NetDeviceContainer ueDevices, EpsBearer bearer, Ptr< EpcTft > tft)
Activate a dedicated EPS bearer on a given set of UE devices.
Definition: lte-helper.cc:1154
ObjectFactory m_enbAntennaModelFactory
Factory of antenna object for eNodeB.
Definition: lte-helper.h:770
Ptr< RadioBearerStatsCalculator > m_rlcStats
Container of RLC layer statistics.
Definition: lte-helper.h:801
std::string GetSchedulerType() const
Definition: lte-helper.cc:300
Ptr< NetDevice > InstallSingleUeDevice(Ptr< Node > n)
Create a UE device (LteUeNetDevice) on the given node.
Definition: lte-helper.cc:832
Ptr< NetDevice > InstallSingleEnbDevice(Ptr< Node > n)
Create an eNodeB device (LteEnbNetDevice) on the given node.
Definition: lte-helper.cc:514
void SetUeComponentCarrierManagerType(std::string type)
Set the type of Component Carrier Manager to be used by Ue devices.
Definition: lte-helper.cc:382
ObjectFactory m_fadingModelFactory
Factory of fading model object for both the downlink and uplink channels.
Definition: lte-helper.h:783
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
This class is very useful when user needs to collect statistics from PDCP and RLC.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.