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