A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-enb-rrc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 * Copyright (c) 2018 Fraunhofer ESK : RLF extensions
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 *
7 * Authors:
8 * Nicola Baldo <nbaldo@cttc.es>
9 * Marco Miozzo <mmiozzo@cttc.es>
10 * Manuel Requena <manuel.requena@cttc.es>
11 * Modified by:
12 * Danilo Abrignani <danilo.abrignani@unibo.it> (Carrier Aggregation - GSoC 2015)
13 * Biljana Bojovic <biljana.bojovic@cttc.es> (Carrier Aggregation)
14 * Vignesh Babu <ns3-dev@esk.fraunhofer.de> (RLF extensions)
15 */
16
17#ifndef LTE_ENB_RRC_H
18#define LTE_ENB_RRC_H
19
20#include "component-carrier.h"
21#include "epc-enb-s1-sap.h"
22#include "epc-x2-sap.h"
23#include "lte-anr-sap.h"
24#include "lte-ccm-rrc-sap.h"
25#include "lte-enb-cmac-sap.h"
26#include "lte-enb-cphy-sap.h"
27#include "lte-ffr-rrc-sap.h"
29#include "lte-mac-sap.h"
30#include "lte-pdcp-sap.h"
31#include "lte-rrc-sap.h"
32
33#include <ns3/event-id.h>
34#include <ns3/nstime.h>
35#include <ns3/object.h>
36#include <ns3/traced-callback.h>
37
38#include <map>
39#include <set>
40#include <vector>
41
42namespace ns3
43{
44
48class LteEnbRrc;
49class Packet;
50
51/**
52 * \ingroup lte
53 * Manages all the radio bearer information possessed by the ENB RRC for a
54 * single UE.
55 */
56class UeManager : public Object
57{
58 /// allow LtePdcpSpecificLtePdcpSapUser<UeManager> class friend access
60
61 public:
62 /**
63 * The state of the UeManager at the eNB RRC
64 *
65 */
81
82 UeManager();
83
84 /**
85 * UeManager constructor
86 *
87 * \param rrc pointer to the LteEnbRrc holding this UeManager
88 * \param rnti RNTI of the UE
89 * \param s initial state of the UeManager
90 * \param componentCarrierId primary component carrier ID
91 */
92 UeManager(Ptr<LteEnbRrc> rrc, uint16_t rnti, State s, uint8_t componentCarrierId);
93
94 ~UeManager() override;
95
96 // inherited from Object
97 protected:
98 void DoInitialize() override;
99 void DoDispose() override;
100
101 public:
102 /**
103 * \brief Get the type ID.
104 * \return the object TypeId
105 */
106 static TypeId GetTypeId();
107
108 /**
109 * Set the identifiers of the source eNB for the case where a UE
110 * joins the current eNB as part of a handover procedure
111 *
112 * \param sourceCellId
113 * \param sourceX2apId
114 */
115 void SetSource(uint16_t sourceCellId, uint16_t sourceX2apId);
116
117 /**
118 * Set the IMSI
119 *
120 * \param imsi the IMSI
121 */
122 void SetImsi(uint64_t imsi);
123
124 /**
125 * Process Initial context setup request message from the MME.
126 * It triggers RRC connection reconfiguration.
127 */
129
130 /**
131 * Setup a new data radio bearer, including both the configuration
132 * within the eNB and the necessary RRC signaling with the UE
133 *
134 * \param bearer the QoS characteristics of the bearer
135 * \param bearerId the EPS bearer identifier
136 * \param gtpTeid S1-bearer GTP tunnel endpoint identifier, see 36.423 9.2.1
137 * \param transportLayerAddress IP Address of the SGW, see 36.423 9.2.1
138 *
139 */
141 uint8_t bearerId,
142 uint32_t gtpTeid,
143 Ipv4Address transportLayerAddress);
144
145 /**
146 * Start all configured data radio bearers. It is safe to call this
147 * method if any bearer had been already started previously.
148 *
149 */
151
152 /**
153 * Start the data radio bearers that have been previously recorded
154 * to be started using RecordDataRadioBearersToBeStarted()
155 *
156 */
158
159 /**
160 *
161 * Release a given radio bearer
162 *
163 * \param drbid the data radio bearer id of the bearer to be released
164 */
165 void ReleaseDataRadioBearer(uint8_t drbid);
166
167 /**
168 * schedule an RRC Connection Reconfiguration procedure with the UE
169 *
170 */
172
173 /**
174 * Start the handover preparation and send the handover request
175 *
176 * \param cellId id of the target cell
177 */
178 void PrepareHandover(uint16_t cellId);
179
180 /**
181 * take the necessary actions in response to the reception of an X2 HANDOVER REQUEST ACK message
182 *
183 * \param params
184 */
186
187 /**
188 *
189 * \return the HandoverPreparationInfo sent by the source eNB to the
190 * target eNB in the X2-based handover procedure
191 */
193
194 /**
195 * \param componentCarrierId target component carrier ID
196 *
197 * \return retrieve the data that the target eNB needs to send to the source
198 * eNB as the Handover Command in the X2-based handover
199 * procedure.
200 *
201 * \note mobility control info is not expected to be filled in
202 * (shall be filled in by the caller).
203 */
205 uint8_t componentCarrierId);
206
207 /**
208 * Send a data packet over the appropriate Data Radio Bearer.
209 * If state is HANDOVER_JOINING (i.e. target eNB has received the
210 * Handover Request), the packet is buffered.
211 * If state is HANDOVER_LEAVING (i.e. source eNB has received the
212 * RRC Connection Reconfiguration, the packet is sent through the
213 * X2 interface.
214 *
215 * \param bid the corresponding EPS Bearer ID
216 * \param p the packet
217 */
218 void SendData(uint8_t bid, Ptr<Packet> p);
219
220 /**
221 *
222 * \return a list of ERAB-to-be-setup items to be put in a X2 HO REQ message
223 */
224 std::vector<EpcX2Sap::ErabToBeSetupItem> GetErabList();
225
226 /**
227 * send the UE CONTEXT RELEASE X2 message to the source eNB, thus
228 * successfully terminating an X2 handover procedure
229 *
230 */
232
233 /**
234 * Take the necessary actions in response to the reception of an X2 HO preparation failure
235 * message
236 *
237 * \param cellId id of the target cell
238 */
239 void RecvHandoverPreparationFailure(uint16_t cellId);
240
241 /**
242 * Take the necessary actions in response to the reception of an X2 SN STATUS TRANSFER message
243 *
244 * \param params the SN STATUS
245 */
247
248 /**
249 * Take the necessary actions in response to the reception of an X2 UE CONTEXT RELEASE message
250 *
251 * \param params the SN STATUS
252 */
254
255 /**
256 * Take the necessary actions in response to the reception of an X2 UE CONTEXT RELEASE message
257 *
258 * \param params the SN STATUS
259 */
261
262 // METHODS FORWARDED FROM ENB RRC SAP ///////////////////////////////////////
263
264 /**
265 * Implement the LteEnbRrcSapProvider::CompleteSetupUe interface.
266 * \param params CompleteSetupUeParameters
267 */
269 /**
270 * Implement the LteEnbRrcSapProvider::RecvRrcConnectionRequest interface.
271 * \param msg the RRC connection request message
272 */
274 /**
275 * Implement the LteEnbRrcSapProvider::RecvRrcConnectionSetupCompleted interface.
276 * \param msg RRC connection setup completed message
277 */
279 /**
280 * Implement the LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationCompleted interface.
281 * \param msg RRC connection reconfiguration completed message
282 */
285 /**
286 * Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentRequest interface.
287 * \param msg the RRC connection reestablishment request message
288 */
291 /**
292 * Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentComplete interface.
293 * \param msg the RRC connection reestablsihment complete message
294 */
297 /**
298 * Implement the LteEnbRrcSapProvider::RecvMeasurementReport interface.
299 * \param msg the measrurement report
300 */
302 /**
303 * Implement the LteEnbRrcSapProvider::RecvIdealUeContextRemoveRequest interface.
304 *
305 * \param rnti the C-RNTI identifying the user
306 */
307 void RecvIdealUeContextRemoveRequest(uint16_t rnti);
308
309 // METHODS FORWARDED FROM ENB CMAC SAP //////////////////////////////////////
310
311 /**
312 * CMAC UE config update indication function
313 * \param cmacParams the UE config parameters
314 */
316
317 // METHODS FORWARDED FROM ENB PDCP SAP //////////////////////////////////////
318
319 /**
320 * Receive PDCP SDU function
321 * \param params the receive PDCP SDU parameters
322 */
324
325 /**
326 *
327 * \return the RNTI, i.e., an UE identifier that is unique within
328 * the cell
329 */
330 uint16_t GetRnti() const;
331
332 /**
333 *
334 * \return the IMSI, i.e., a globally unique UE identifier
335 */
336 uint64_t GetImsi() const;
337
338 /**
339 *
340 * \return the primary component carrier ID
341 */
342 uint8_t GetComponentCarrierId() const;
343
344 /**
345 *
346 * \return the SRS Configuration Index
347 */
348 uint16_t GetSrsConfigurationIndex() const;
349
350 /**
351 * Set the SRS configuration index and do the necessary reconfiguration
352 *
353 * \param srsConfIndex
354 */
355 void SetSrsConfigurationIndex(uint16_t srsConfIndex);
356
357 /**
358 *
359 * \return the current state
360 */
361 State GetState() const;
362
363 /**
364 * Configure PdschConfigDedicated (i.e. P_A value) for UE and start RrcConnectionReconfiguration
365 * to inform UE about new PdschConfigDedicated
366 *
367 * \param pdschConfigDedicated new pdschConfigDedicated (i.e. P_A value) to be set
368 */
370
371 /**
372 * Cancel all timers which are running for the UE
373 *
374 */
375 void CancelPendingEvents();
376
377 /**
378 * \brief This function acts as an interface to trigger the connection
379 * release towards eNB, EPC and UE.
380 *
381 */
383
384 /**
385 * \brief build handover preparation failure message
386 * \return the handover preparation failure message.
387 */
389
390 /**
391 * \brief build handover cancel message
392 * \return the handover cancel message.
393 */
395
396 /**
397 * TracedCallback signature for state transition events.
398 *
399 * \param [in] imsi
400 * \param [in] cellId
401 * \param [in] rnti
402 * \param [in] oldState
403 * \param [in] newState
404 */
405 typedef void (*StateTracedCallback)(const uint64_t imsi,
406 const uint16_t cellId,
407 const uint16_t rnti,
408 const State oldState,
409 const State newState);
410
411 private:
412 /**
413 * Add a new LteDataRadioBearerInfo structure to the UeManager
414 *
415 * \param radioBearerInfo
416 *
417 * \return the id of the newly added data radio bearer structure
418 */
420
421 /**
422 * \param drbid the Data Radio Bearer id
423 *
424 * \return the corresponding LteDataRadioBearerInfo
425 */
427
428 /**
429 * remove the LteDataRadioBearerInfo corresponding to a bearer being released
430 *
431 * \param drbid the Data Radio Bearer id
432 */
433 void RemoveDataRadioBearerInfo(uint8_t drbid);
434
435 /**
436 *
437 * \return an RrcConnectionReconfiguration struct built based on the
438 * current configuration
439 */
441
442 /**
443 *
444 * \return an NonCriticalExtensionConfiguration struct built based on the
445 * current configuration
446 */
448
449 /**
450 *
451 * \return a RadioResourceConfigDedicated struct built based on the
452 * current configuration
453 */
455
456 /**
457 *
458 * \return a newly allocated identifier for a new RRC transaction
459 */
461
462 /**
463 * \param lcid a Logical Channel Identifier
464 *
465 * \return the corresponding Data Radio Bearer Id
466 */
467 uint8_t Lcid2Drbid(uint8_t lcid);
468
469 /**
470 * \param drbid a Data Radio Bearer Id
471 *
472 * \return the corresponding Logical Channel Identifier
473 */
474 uint8_t Drbid2Lcid(uint8_t drbid);
475
476 /**
477 * \param lcid a Logical Channel Identifier
478 *
479 * \return the corresponding EPS Bearer Identifier
480 */
481 uint8_t Lcid2Bid(uint8_t lcid);
482
483 /**
484 * \param bid an EPS Bearer Identifier
485 *
486 * \return the corresponding Logical Channel Identifier
487 */
488 uint8_t Bid2Lcid(uint8_t bid);
489
490 /**
491 * \param drbid Data Radio Bearer Id
492 *
493 * \return the corresponding EPS Bearer Identifier
494 */
495 uint8_t Drbid2Bid(uint8_t drbid);
496
497 /**
498 * \param bid an EPS Bearer Identifier
499 *
500 * \return the corresponding Data Radio Bearer Id
501 */
502 uint8_t Bid2Drbid(uint8_t bid);
503
504 /**
505 * Send a data packet over the appropriate Data Radio Bearer.
506 * It is called by SendData if the UE is in a connected state
507 * or when the RRC Connection Reconfiguration Complete message
508 * is received and the packets are debuffered.
509 *
510 * \param bid the corresponding EPS Bearer ID
511 * \param p the packet
512 */
513 void SendPacket(uint8_t bid, Ptr<Packet> p);
514
515 /**
516 * Switch the UeManager to the given state
517 *
518 * \param s the given state
519 */
520 void SwitchToState(State s);
521
522 uint8_t m_lastAllocatedDrbid; ///< last allocated Data Radio Bearer ID
523
524 /**
525 * The `DataRadioBearerMap` attribute. List of UE DataRadioBearerInfo by
526 * DRBID.
527 */
528 std::map<uint8_t, Ptr<LteDataRadioBearerInfo>> m_drbMap;
529
530 /**
531 * The `Srb0` attribute. SignalingRadioBearerInfo for SRB0.
532 */
534 /**
535 * The `Srb1` attribute. SignalingRadioBearerInfo for SRB1.
536 */
538
539 /**
540 * The `C-RNTI` attribute. Cell Radio Network Temporary Identifier.
541 */
542 uint16_t m_rnti;
543 /**
544 * International Mobile Subscriber Identity assigned to this UE. A globally
545 * unique UE identifier.
546 */
547 uint64_t m_imsi;
548 /**
549 * ID of the primary CC for this UE
550 */
552
553 uint8_t m_lastRrcTransactionIdentifier; ///< last RRC transaction identifier
554
556 /// Pointer to the parent eNodeB RRC.
558 /// The current UeManager state.
560
561 LtePdcpSapUser* m_drbPdcpSapUser; ///< DRB PDCP SAP user
562
563 bool m_pendingRrcConnectionReconfiguration; ///< pending RRC connection reconfiguration
564
565 /**
566 * The `StateTransition` trace source. Fired upon every UE state transition
567 * seen by the UeManager at the eNB RRC. Exporting IMSI, cell ID, RNTI, old
568 * state, and new state.
569 */
571
572 /**
573 * The `DrbCreated` trace source. Fired when DRB is created, i.e.
574 * the RLC and PDCP entities are created for one logical channel.
575 * Exporting IMSI, cell ID, RNTI, LCID.
576 */
578
579 uint16_t m_sourceX2apId; ///< source X2 ap ID
580 uint16_t m_targetX2apId; ///< target X2 ap ID
581 uint16_t m_sourceCellId; ///< source cell ID
582 uint16_t m_targetCellId; ///< target cell ID
583 std::list<uint8_t> m_drbsToBeStarted; ///< DRBS to be started
584 bool m_needPhyMacConfiguration; ///< need Phy MAC configuration
585
586 /**
587 * Time limit before a _connection request timeout_ occurs. Set after a new
588 * UE context is added after a successful Random Access. Calling
589 * LteEnbRrc::ConnectionRequestTimeout() when it expires. Cancelled when RRC
590 * CONNECTION REQUEST is received.
591 */
593 /**
594 * Time limit before a _connection setup timeout_ occurs. Set after an RRC
595 * CONNECTION SETUP is sent. Calling LteEnbRrc::ConnectionSetupTimeout() when
596 * it expires. Cancelled when RRC CONNECTION SETUP COMPLETE is received.
597 */
599 /**
600 * The delay before a _connection rejected timeout_ occurs. Set after an RRC
601 * CONNECTION REJECT is sent. Calling LteEnbRrc::ConnectionRejectedTimeout()
602 * when it expires.
603 */
605 /**
606 * Time limit before a _handover joining timeout_ occurs. Set after a new UE
607 * context is added after receiving a handover request. Calling
608 * LteEnbRrc::HandoverJoiningTimeout() when it expires. Cancelled when
609 * RRC CONNECTION RECONFIGURATION COMPLETE is received.
610 */
612 /**
613 * Time limit before a _handover leaving timeout_ occurs. Set after a
614 * handover command is sent. Calling LteEnbRrc::HandoverLeavingTimeout()
615 * when it expires. Cancelled when RRC CONNECTION RE-ESTABLISHMENT or X2
616 * UE CONTEXT RELEASE is received.
617 */
619
620 /// Define if the Carrier Aggregation was already configure for the current UE on not
622
623 /// Pending start data radio bearers
625
626 /**
627 * Packet buffer for when UE is doing the handover.
628 * The packets are stored with the bid (bearer ID).
629 *
630 * Source eNB starts forwarding data to target eNB through the X2 interface
631 * when it sends RRC Connection Reconfiguration to the UE.
632 * Target eNB buffers data until it receives RRC Connection Reconfiguration
633 * Complete from the UE.
634 */
635 std::list<std::pair<uint8_t, Ptr<Packet>>> m_packetBuffer;
636
637}; // end of `class UeManager`
638
639/**
640 * \ingroup lte
641 *
642 * The LTE Radio Resource Control entity at the eNB
643 */
644class LteEnbRrc : public Object
645{
646 /// allow EnbRrcMemberLteEnbCmacSapUser class friend access
648 /// allow MemberLteHandoverManagementSapUser<LteEnbRrc> class friend access
650 /// allow MemberLteAnrSapUser<LteEnbRrc> class friend access
651 friend class MemberLteAnrSapUser<LteEnbRrc>;
652 /// allow MemberLteFfrRrcSapUser<LteEnbRrc> class friend access
653 friend class MemberLteFfrRrcSapUser<LteEnbRrc>;
654 /// allow MemberLteEnbRrcSapProvider<LteEnbRrc> class friend access
656 /// allow MemberLteEnbRrcSapProvider<LteEnbRrc> class friend access
657 friend class MemberEpcEnbS1SapUser<LteEnbRrc>;
658 /// allow MemberEpcEnbS1SapUser<LteEnbRrc> class friend access
660 /// allow UeManager class friend access
661 friend class UeManager;
662 /// allow MemberLteCcmRrcSapUser<LteEnbRrc> class friend access
663 friend class MemberLteCcmRrcSapUser<LteEnbRrc>;
664
665 public:
666 /**
667 * create an RRC instance for use within an eNB
668 *
669 */
670 LteEnbRrc();
671
672 /**
673 * Destructor
674 */
675 ~LteEnbRrc() override;
676
677 // inherited from Object
678 protected:
679 void DoDispose() override;
680
681 public:
682 /**
683 * \brief Get the type ID.
684 * \return the object TypeId
685 */
686 static TypeId GetTypeId();
687
688 /**
689 * Set the X2 SAP this RRC should interact with
690 * \param s the X2 SAP Provider to be used by this RRC entity
691 */
693
694 /**
695 * Get the X2 SAP offered by this RRC
696 * \return s the X2 SAP User interface offered to the X2 entity by this RRC entity
697 */
699
700 /**
701 * set the CMAC SAP this RRC should interact with
702 *
703 * \param s the CMAC SAP Provider to be used by this RRC
704 */
706
707 /**
708 * set the CMAC SAP this RRC should interact with
709 *
710 * \param s the CMAC SAP Provider to be used by this RRC
711 * \param pos the position
712 */
714
715 /**
716 * Get the CMAC SAP offered by this RRC
717 * \returns the CMAC SAP User interface offered to the MAC by this RRC
718 */
720
721 /**
722 * Get the CMAC SAP offered by this RRC
723 * \param pos the position
724 * \returns the CMAC SAP User interface offered to the MAC by this RRC
725 */
727
728 /**
729 * set the Handover Management SAP this RRC should interact with
730 *
731 * \param s the Handover Management SAP Provider to be used by this RRC
732 */
734
735 /**
736 * Get the Handover Management SAP offered by this RRC
737 * \returns the Handover Management SAP User interface offered to the
738 * handover algorithm by this RRC
739 */
741
742 /**
743 * set the Component Carrier Management SAP this RRC should interact with
744 *
745 * \param s the Component Carrier Management SAP Provider to be used by this RRC
746 */
748
749 /**
750 * Get the Component Carrier Management SAP offered by this RRC
751 * \return s the Component Carrier Management SAP User interface offered to the
752 * carrier component selection algorithm by this RRC
753 */
755
756 /**
757 * set the ANR SAP this RRC should interact with
758 *
759 * \param s the ANR SAP Provider to be used by this RRC
760 */
762
763 /**
764 * Get the ANR SAP offered by this RRC
765 * \return s the ANR SAP User interface offered to the ANR instance by this
766 * RRC
767 */
769
770 /**
771 * set the FFR SAP this RRC should interact with
772 *
773 * \param s the FFR SAP Provider to be used by this RRC
774 */
776 /**
777 * set the FFR SAP this RRC should interact with
778 *
779 * \param s the FFR SAP Provider to be used by this RRC
780 * \param index the index
781 */
782 void SetLteFfrRrcSapProvider(LteFfrRrcSapProvider* s, uint8_t index);
783
784 /**
785 * Get the FFR SAP offered by this RRC
786 * \return s the FFR SAP User interface offered to the ANR instance by this
787 * RRC
788 */
790 /**
791 * Get the FFR SAP offered by this RRC
792 * \param index the index
793 * \return s the FFR SAP User interface offered to the ANR instance by this
794 * RRC
795 */
797
798 /**
799 * set the RRC SAP this RRC should interact with
800 *
801 * \param s the RRC SAP User to be used by this RRC
802 */
804
805 /**
806 *
807 *
808 * \return s the RRC SAP Provider interface offered to the MAC by this RRC
809 */
811
812 /**
813 * set the MAC SAP provider. The eNB RRC does not use this
814 * directly, but it needs to provide it to newly created RLC instances.
815 *
816 * \param s the MAC SAP provider that will be used by all
817 * newly created RLC instances
818 */
820
821 /**
822 * Set the S1 SAP Provider
823 *
824 * \param s the S1 SAP Provider
825 */
827
828 /**
829 *
830 * \return the S1 SAP user
831 */
833
834 /**
835 * set the CPHY SAP this RRC should use to interact with the PHY
836 *
837 * \param s the CPHY SAP Provider
838 */
840
841 /**
842 * set the CPHY SAP this RRC should use to interact with the PHY
843 *
844 * \param s the CPHY SAP Provider
845 * \param pos the position
846 */
848
849 /**
850 *
851 *
852 * \return s the CPHY SAP User interface offered to the PHY by this RRC
853 */
855
856 /**
857 * Get the ENB CPhy SAP user
858 *
859 * \param pos the position
860 * \return s the CPHY SAP User interface offered to the PHY by this RRC
861 */
863
864 /**
865 *
866 *
867 * \param rnti the identifier of an UE
868 *
869 * \return true if the corresponding UeManager instance exists
870 */
871 bool HasUeManager(uint16_t rnti) const;
872
873 /**
874 *
875 *
876 * \param rnti the identifier of an UE
877 *
878 * \return the corresponding UeManager instance
879 */
880 Ptr<UeManager> GetUeManager(uint16_t rnti);
881
882 /**
883 * \brief Add a new UE measurement reporting configuration
884 * \param config the new reporting configuration
885 * \return the measurement IDs (measId) referring to the newly added
886 * reporting configuration
887 *
888 * Assuming intra-frequency environment, the new measurement reporting
889 * configuration will be automatically associated to measurement
890 * objects corresponding to serving cell frequencies.
891 *
892 * Can only be called before the start of simulation.
893 */
894 std::vector<uint8_t> AddUeMeasReportConfig(LteRrcSap::ReportConfigEutra config);
895
896 /**
897 * \brief Configure cell-specific parameters.
898 *
899 * Configure cell-specific parameters and propagate them to lower layers.
900 * The parameters include bandwidth, EARFCN (E-UTRA Absolute Radio Frequency
901 * Channel Number), and cell ID.
902 *
903 * In addition to parameter configuration, this function also performs several
904 * other tasks:
905 * - Initializing UE measurement (i.e. measurement object and quantity
906 * configuration), which is expected to be further configured through
907 * `LteEnbRrc::AddUeMeasReportConfig`;
908 * - Enabling MIB (Master Information Block) broadcast transmission
909 * - Enabling SIB (System Information Block) broadcast transmission
910 *
911 * Typically runs when the eNodeB NetDevice is installed, for instance by
912 * `LteHelper::InstallEnbDevice` (i.e. before the simulation starts).
913 *
914 * \warning Raises an error when executed more than once.
915 *
916 * \param ccPhyConf the component carrier configuration
917 */
918 void ConfigureCell(std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> ccPhyConf);
919
920 /**
921 * \brief Configure carriers.
922 * \param ccPhyConf the component carrier configuration
923 */
924 void ConfigureCarriers(std::map<uint8_t, Ptr<ComponentCarrierBaseStation>> ccPhyConf);
925
926 /**
927 * set the cell id of this eNB
928 *
929 * \param m_cellId
930 */
931 void SetCellId(uint16_t m_cellId);
932
933 /**
934 * set the cell id of this eNB
935 *
936 * \param m_cellId
937 * \param ccIndex
938 */
939 void SetCellId(uint16_t m_cellId, uint8_t ccIndex);
940
941 /**
942 * convert the cell id to component carrier id
943 *
944 * \param cellId Cell ID
945 *
946 * \return corresponding component carrier id
947 */
948 uint8_t CellToComponentCarrierId(uint16_t cellId);
949
950 /**
951 * convert the component carrier id to cell id
952 *
953 * \param componentCarrierId component carrier ID
954 *
955 * \return corresponding cell ID
956 */
957 uint16_t ComponentCarrierToCellId(uint8_t componentCarrierId);
958
959 /**
960 * \param cellId cell ID
961 * \return true if cellId is served by this eNB
962 */
963 bool HasCellId(uint16_t cellId) const;
964
965 /**
966 * Enqueue an IP data packet on the proper bearer for downlink
967 * transmission. Normally expected to be called by the NetDevice
968 * forwarding a packet coming from the EpcEnbApplication
969 *
970 * \param p the packet
971 *
972 * \return true if successful, false if an error occurred
973 */
974 bool SendData(Ptr<Packet> p);
975
976 /**
977 * set the callback used to forward data packets up the stack
978 *
979 * \param cb
980 */
982
983 /**
984 * Method triggered when a UE is expected to request for connection but does
985 * not do so in a reasonable time. The method will remove the UE context.
986 *
987 * \param rnti the T-C-RNTI whose timeout expired
988 */
989 void ConnectionRequestTimeout(uint16_t rnti);
990
991 /**
992 * Method triggered when a UE is expected to complete a connection setup
993 * procedure but does not do so in a reasonable time. The method will remove
994 * the UE context.
995 *
996 * \param rnti the T-C-RNTI whose timeout expired
997 */
998 void ConnectionSetupTimeout(uint16_t rnti);
999
1000 /**
1001 * Method triggered a while after sending RRC Connection Rejected. The method
1002 * will remove the UE context.
1003 *
1004 * \param rnti the T-C-RNTI whose timeout expired
1005 */
1006 void ConnectionRejectedTimeout(uint16_t rnti);
1007
1008 /**
1009 * Method triggered when a UE is expected to join the cell for a handover
1010 * but does not do so in a reasonable time. The method will remove the UE
1011 * context.
1012 *
1013 * \param rnti the C-RNTI whose timeout expired
1014 */
1015 void HandoverJoiningTimeout(uint16_t rnti);
1016
1017 /**
1018 * Method triggered when a UE is expected to leave a cell for a handover
1019 * but no feedback is received in a reasonable time. The method will remove
1020 * the UE context.
1021 *
1022 * \param rnti the C-RNTI whose timeout expired
1023 */
1024 void HandoverLeavingTimeout(uint16_t rnti);
1025
1026 /**
1027 * Send a HandoverRequest through the X2 SAP interface. This method will
1028 * trigger a handover which is started by the RRC by sending a handover
1029 * request to the target eNB over the X2 interface
1030 *
1031 * \param rnti the ID of the UE to be handed over
1032 * \param cellId the ID of the target eNB
1033 */
1034 void SendHandoverRequest(uint16_t rnti, uint16_t cellId);
1035
1036 /**
1037 * \brief This function acts as an interface to trigger Release indication messages towards eNB
1038 * and EPC
1039 * \param imsi the IMSI
1040 * \param rnti the RNTI
1041 * \param bearerId Bearer Identity which is to be de-activated
1042 */
1043 void DoSendReleaseDataRadioBearer(uint64_t imsi, uint16_t rnti, uint8_t bearerId);
1044
1045 /**
1046 * \brief Send RRC connection release function
1047 *
1048 * This function acts as an interface to trigger the connection
1049 * release towards eNB, EPC and UE.
1050 */
1052
1053 /**
1054 * Identifies how EPS Bearer parameters are mapped to different RLC types
1055 *
1056 */
1064
1065 /**
1066 * TracedCallback signature for new Ue Context events.
1067 *
1068 * \param [in] cellId
1069 * \param [in] rnti
1070 */
1071 typedef void (*NewUeContextTracedCallback)(const uint16_t cellId, const uint16_t rnti);
1072
1073 /**
1074 * TracedCallback signature for connection and handover end events.
1075 *
1076 * \param [in] imsi
1077 * \param [in] cellId
1078 * \param [in] rnti
1079 */
1080 typedef void (*ConnectionHandoverTracedCallback)(const uint64_t imsi,
1081 const uint16_t cellId,
1082 const uint16_t rnti);
1083
1084 /**
1085 * TracedCallback signature for handover start events.
1086 *
1087 * \param [in] imsi
1088 * \param [in] cellId
1089 * \param [in] rnti
1090 * \param [in] targetCid
1091 */
1092 typedef void (*HandoverStartTracedCallback)(const uint64_t imsi,
1093 const uint16_t cellId,
1094 const uint16_t rnti,
1095 const uint16_t targetCid);
1096
1097 /**
1098 * TracedCallback signature for receive measurement report events.
1099 *
1100 * \param [in] imsi
1101 * \param [in] cellId
1102 * \param [in] rnti
1103 * \param [in] report
1104 * \todo The \c LteRrcSap::MeasurementReport argument should be
1105 * changed to a const reference since the argument is large.
1106 */
1107 typedef void (*ReceiveReportTracedCallback)(const uint64_t imsi,
1108 const uint16_t cellId,
1109 const uint16_t rnti,
1110 const LteRrcSap::MeasurementReport report);
1111
1112 /**
1113 * TracedCallback signature for timer expiry events
1114 *
1115 * \param [in] imsi
1116 * \param [in] rnti
1117 * \param [in] cellId
1118 * \param [in] cause
1119 */
1120 typedef void (*TimerExpiryTracedCallback)(const uint64_t imsi,
1121 const uint16_t rnti,
1122 const uint16_t cellId,
1123 const std::string cause);
1124
1125 /**
1126 * TracedCallback signature for handover failure events.
1127 *
1128 * \param [in] imsi
1129 * \param [in] rnti
1130 * \param [in] cellId
1131 */
1132 typedef void (*HandoverFailureTracedCallback)(const uint64_t imsi,
1133 const uint16_t rnti,
1134 const uint16_t cellId);
1135
1136 private:
1137 // RRC SAP methods
1138
1139 /**
1140 * Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::CompleteSetupUe interface to
1141 * UeManager::CompleteSetupUe
1142 * \param rnti the RNTI
1143 * \param params the LteEnbRrcSapProvider::CompleteSetupUeParameters
1144 */
1146 /**
1147 * Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvRrcConnectionRequest interface
1148 * to UeManager::RecvRrcConnectionRequest
1149 *
1150 * \param rnti the RNTI
1151 * \param msg the LteRrcSap::RrcConnectionRequest
1152 */
1154 /**
1155 * Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvRrcConnectionSetupCompleted
1156 * interface to UeManager::RecvRrcConnectionSetupCompleted
1157 *
1158 * \param rnti the RNTI
1159 * \param msg the LteRrcSap::RrcConnectionSetupCompleted
1160 */
1161 void DoRecvRrcConnectionSetupCompleted(uint16_t rnti,
1163 /**
1164 * Part of the RRC protocol. Forwarding
1165 * LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationCompleted interface to
1166 * UeManager::RecvRrcConnectionReconfigurationCompleted
1167 *
1168 * \param rnti the RNTI
1169 * \param msg the LteRrcSap::RrcConnectionReconfigurationCompleted
1170 */
1172 uint16_t rnti,
1174 /**
1175 * Part of the RRC protocol. Forwarding
1176 * LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentRequest interface to
1177 * UeManager::RecvRrcConnectionReestablishmentRequest
1178 *
1179 * \param rnti the RNTI
1180 * \param msg the LteRrcSap::RrcConnectionReestablishmentRequest
1181 */
1183 uint16_t rnti,
1185 /**
1186 * Part of the RRC protocol. Forwarding
1187 * LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentComplete interface to
1188 * UeManager::RecvRrcConnectionReestablishmentComplete
1189 *
1190 * \param rnti the RNTI
1191 * \param msg the LteRrcSap::RrcConnectionReestablishmentComplete
1192 */
1194 uint16_t rnti,
1196 /**
1197 * Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvMeasurementReport interface to
1198 * UeManager::RecvMeasurementReport
1199 *
1200 * \param rnti the RNTI
1201 * \param msg the LteRrcSap::MeasurementReport
1202 */
1204 /**
1205 * \brief Part of the RRC protocol. Forwarding
1206 * LteEnbRrcSapProvider::RecvIdealUeContextRemoveRequest interface to
1207 * UeManager::RecvIdealUeContextRemoveRequest.
1208 *
1209 * Remove the UE context at eNodeB and also remove the bearers established
1210 * at SGW/PGW node. Bearer info at MME is not deleted since they are added at
1211 * MME only at the beginning of simulation and if they are removed,
1212 * the bearers cannot be activated again.
1213 *
1214 * \param rnti the C-RNTI identifying the user
1215 */
1216 void DoRecvIdealUeContextRemoveRequest(uint16_t rnti);
1217
1218 // S1 SAP methods
1219
1220 /**
1221 * Initial context setup request function
1222 *
1223 * \param params EpcEnbS1SapUser::InitialContextSetupRequestParameters
1224 */
1226 /**
1227 * Data radio beaerer setup request function
1228 *
1229 * \param params EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters
1230 */
1233 /**
1234 * Path switch request acknowledge function
1235 *
1236 * \param params EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters
1237 */
1240
1241 // X2 SAP methods
1242
1243 /**
1244 * Receive handover request function
1245 *
1246 * \param params EpcX2SapUser::HandoverRequestParams
1247 */
1249 /**
1250 * Receive handover request acknowledge function
1251 *
1252 * \param params EpcX2SapUser::HandoverRequestAckParams
1253 */
1255 /**
1256 * Receive handover preparation failure function
1257 *
1258 * \param params EpcX2SapUser::HandoverPreparationFailureParams
1259 */
1261 /**
1262 * Receive SN status transfer function
1263 *
1264 * \param params EpcX2SapUser::SnStatusTransferParams
1265 */
1267 /**
1268 * Receive UE context release function
1269 *
1270 * \param params EpcX2SapUser::UeContextReleaseParams
1271 */
1273 /**
1274 * Receive load information function
1275 *
1276 * \param params EpcX2SapUser::LoadInformationParams
1277 */
1279 /**
1280 * Receive resource status update function
1281 *
1282 * \param params EpcX2SapUser::ResourceStatusUpdateParams
1283 */
1285 /**
1286 * Receive UE data function
1287 *
1288 * \param params EpcX2SapUser::UeDataParams
1289 */
1291 /**
1292 * Receive Handover Cancel function.
1293 *
1294 * \param params EpcX2SapUser::HandoverCancelParams
1295 */
1297
1298 // CMAC SAP methods
1299
1300 /**
1301 * Allocate temporary cell RNTI function
1302 *
1303 * \param componentCarrierId ID of the primary component carrier
1304 * \return temporary RNTI
1305 */
1306 uint16_t DoAllocateTemporaryCellRnti(uint8_t componentCarrierId);
1307 /**
1308 * Notify LC config result function
1309 *
1310 * \param rnti RNTI
1311 * \param lcid LCID
1312 * \param success the success indicator
1313 */
1314 void DoNotifyLcConfigResult(uint16_t rnti, uint8_t lcid, bool success);
1315 /**
1316 * RRC configuration update indication function
1317 *
1318 * \param params LteEnbCmacSapUser::UeConfig
1319 */
1321
1322 // Handover Management SAP methods
1323
1324 /**
1325 * Add UE measure report config for handover function
1326 *
1327 * \param reportConfig LteRrcSap::ReportConfigEutra
1328 * \returns measure ID
1329 */
1330 std::vector<uint8_t> DoAddUeMeasReportConfigForHandover(
1331 LteRrcSap::ReportConfigEutra reportConfig);
1332 /**
1333 * Add UE measure report config for component carrier function
1334 *
1335 * \param reportConfig LteRrcSap::ReportConfigEutra
1336 * \returns measure ID
1337 */
1339 /**
1340 * \brief Set number of component carriers
1341 * \param numberOfComponentCarriers the number of component carriers
1342 */
1343 void DoSetNumberOfComponentCarriers(uint16_t numberOfComponentCarriers);
1344
1345 /**
1346 * Trigger handover function
1347 *
1348 * \param rnti RNTI
1349 * \param targetCellId target cell ID
1350 */
1351 void DoTriggerHandover(uint16_t rnti, uint16_t targetCellId);
1352
1353 // ANR SAP methods
1354
1355 /**
1356 * Add UE measure report config for ANR function
1357 *
1358 * \param reportConfig LteRrcSap::ReportConfigEutra
1359 * \returns measure ID
1360 */
1362
1363 // FFR RRC SAP methods
1364 /**
1365 * Add UE measure report config for FFR function
1366 *
1367 * \param reportConfig LteRrcSap::ReportConfigEutra
1368 * \returns measure ID
1369 */
1371 /**
1372 * Set PDSCH config dedicated function
1373 *
1374 * \param rnti the RNTI
1375 * \param pa LteRrcSap::PdschConfigDedicated
1376 */
1378 /**
1379 * Send load information function
1380 *
1381 * \param params EpcX2Sap::LoadInformationParams
1382 */
1384
1385 // Internal methods
1386
1387 /**
1388 * Allocate a new RNTI for a new UE. This is done in the following cases:
1389 * * T-C-RNTI allocation upon contention-based MAC Random Access procedure
1390 * * target cell RNTI allocation upon handover
1391 *
1392 * \param state the initial state of the UeManager
1393 * \param componentCarrierId primary component carrier ID of the UeManager
1394 *
1395 * \return the newly allocated RNTI
1396 */
1397 uint16_t AddUe(UeManager::State state, uint8_t componentCarrierId);
1398
1399 /**
1400 * remove a UE from the cell
1401 *
1402 * \param rnti the C-RNTI identiftying the user
1403 */
1404 void RemoveUe(uint16_t rnti);
1405
1406 /**
1407 *
1408 * \param bearer the specification of an EPS bearer
1409 *
1410 * \return the type of RLC that is to be created for the given EPS bearer
1411 */
1412 TypeId GetRlcType(EpsBearer bearer);
1413
1414 /**
1415 * \brief Is random access completed function
1416 *
1417 * This method is executed to decide if the non contention based
1418 * preamble has to reused or not upon preamble expiry. If the random access
1419 * in connected mode is completed, then the preamble can be reused by other UEs.
1420 * If not, the same UE retains the preamble and other available preambles is
1421 * assigned to the required UEs.
1422 *
1423 * \param rnti the C-RNTI identifying the user
1424 * \return true if the random access in connected mode is completed
1425 */
1426 bool IsRandomAccessCompleted(uint16_t rnti);
1427
1428 public:
1429 /**
1430 * Add a neighbour with an X2 interface
1431 *
1432 * \param cellId neighbouring cell id
1433 */
1434 void AddX2Neighbour(uint16_t cellId);
1435
1436 /**
1437 *
1438 * \param p the SRS periodicity in num TTIs
1439 */
1441
1442 /**
1443 *
1444 * \return the current SRS periodicity
1445 */
1447
1448 /**
1449 * \brief Associate this RRC entity with a particular CSG information.
1450 * \param csgId the intended Closed Subscriber Group identity
1451 * \param csgIndication if TRUE, only CSG members are allowed to access the
1452 * cell
1453 *
1454 * CSG identity is a number identifying a Closed Subscriber Group which the
1455 * cell belongs to. eNodeB is associated with a single CSG identity.
1456 *
1457 * The same CSG identity can also be associated to several UEs, which is
1458 * equivalent as enlisting these UEs as the members of this particular CSG.
1459 * When the CSG indication field is set to TRUE, only UEs which are members of
1460 * the CSG (i.e. same CSG ID) can gain access to the eNodeB, therefore
1461 * enforcing closed access mode. Otherwise, the eNodeB operates as a non-CSG
1462 * cell and implements open access mode.
1463 *
1464 * This restriction only applies to initial cell selection and EPC-enabled
1465 * simulation.
1466 */
1467 void SetCsgId(uint32_t csgId, bool csgIndication);
1468
1469 private:
1470 /**
1471 * Allocate a new SRS configuration index for a new UE.
1472 *
1473 * \note this method can have the side effect of updating the SRS
1474 * configuration index of all UEs
1475 *
1476 * \return the newly allocated SRS configuration index
1477 */
1478 uint16_t GetNewSrsConfigurationIndex();
1479
1480 /**
1481 * remove a previously allocated SRS configuration index
1482 *
1483 * \note this method can have the side effect of updating the SRS
1484 * configuration index of all UEs
1485 *
1486 * \param srcCi the index to be removed
1487 */
1488 void RemoveSrsConfigurationIndex(uint16_t srcCi);
1489
1490 /**
1491 * \return true if all the SRS indices are assigned to UEs
1492 */
1493 bool IsMaxSrsReached();
1494
1495 /**
1496 *
1497 * \param bearer the characteristics of the bearer
1498 *
1499 * \return the Logical Channel Group in a bearer with these
1500 * characteristics is put. Used for MAC Buffer Status Reporting purposes.
1501 */
1502 uint8_t GetLogicalChannelGroup(EpsBearer bearer);
1503
1504 /**
1505 *
1506 * \param bearer the characteristics of the bearer
1507 *
1508 * \return the priority level of a bearer with these
1509 * characteristics is put. Used for the part of UL MAC Scheduling
1510 * carried out by the UE
1511 */
1512 uint8_t GetLogicalChannelPriority(EpsBearer bearer);
1513
1514 /**
1515 * method used to periodically send System Information
1516 *
1517 */
1518 void SendSystemInformation();
1519
1520 Callback<void, Ptr<Packet>> m_forwardUpCallback; ///< forward up callback function
1521
1522 /// Interface to receive messages from neighbour eNodeB over the X2 interface.
1524 /// Interface to send messages to neighbour eNodeB over the X2 interface.
1526
1527 /// Receive API calls from the eNodeB MAC instance.
1528 std::vector<LteEnbCmacSapUser*> m_cmacSapUser;
1529 /// Interface to the eNodeB MAC instance.
1530 std::vector<LteEnbCmacSapProvider*> m_cmacSapProvider;
1531
1532 /// Receive API calls from the handover algorithm instance.
1534 /// Interface to the handover algorithm instance.
1536
1537 /// Receive API calls from the LteEnbComponentCarrierManager instance.
1539 /// Interface to the LteEnbComponentCarrierManager instance.
1541
1542 /// Receive API calls from the ANR instance.
1544 /// Interface to the ANR instance.
1546
1547 /// Receive API calls from the FFR algorithm instance.
1548 std::vector<LteFfrRrcSapUser*> m_ffrRrcSapUser;
1549 /// Interface to the FFR algorithm instance.
1550 std::vector<LteFfrRrcSapProvider*> m_ffrRrcSapProvider;
1551
1552 /// Interface to send messages to UE over the RRC protocol.
1554 /// Interface to receive messages from UE over the RRC protocol.
1556
1557 /// Interface to the eNodeB MAC instance, to be used by RLC instances.
1559
1560 /// Interface to send messages to core network over the S1 protocol.
1562 /// Interface to receive messages from core network over the S1 protocol.
1564
1565 /// Receive API calls from the eNodeB PHY instances.
1566 std::vector<LteEnbCphySapUser*> m_cphySapUser;
1567 /// Interface to the eNodeB PHY instances.
1568 std::vector<LteEnbCphySapProvider*> m_cphySapProvider;
1569
1570 /// True if ConfigureCell() has been completed.
1572 /// Downlink E-UTRA Absolute Radio Frequency Channel Number.
1574 /// Uplink E-UTRA Absolute Radio Frequency Channel Number.
1576 /// Downlink transmission bandwidth configuration in number of Resource Blocks.
1578 /// Uplink transmission bandwidth configuration in number of Resource Blocks.
1580 /// Last allocated RNTI
1582
1583 /// The System Information Block Type 1 that is currently broadcasted over BCH.
1584 std::vector<LteRrcSap::SystemInformationBlockType1> m_sib1;
1585
1586 /**
1587 * The `UeMap` attribute. List of UeManager by C-RNTI.
1588 */
1589 std::map<uint16_t, Ptr<UeManager>> m_ueMap;
1590
1591 /**
1592 * List of measurement configuration which are active in every UE attached to
1593 * this eNodeB instance.
1594 */
1596
1597 /// List of measurement identities which are intended for handover purpose.
1598 std::set<uint8_t> m_handoverMeasIds;
1599 /// List of measurement identities which are intended for ANR purpose.
1600 std::set<uint8_t> m_anrMeasIds;
1601 /// List of measurement identities which are intended for FFR purpose.
1602 std::set<uint8_t> m_ffrMeasIds;
1603 /// List of measurement identities which are intended for component carrier management purposes.
1604 std::set<uint8_t> m_componentCarrierMeasIds;
1605
1606 /// X2uTeidInfo structure
1608 {
1609 uint16_t rnti; ///< RNTI
1610 uint8_t drbid; ///< DRBID
1611 };
1612
1613 /// TEID, RNTI, DRBID
1614 std::map<uint32_t, X2uTeidInfo> m_x2uTeidInfoMap;
1615
1616 /**
1617 * The `DefaultTransmissionMode` attribute. The default UEs' transmission
1618 * mode (0: SISO).
1619 */
1621 /**
1622 * The `EpsBearerToRlcMapping` attribute. Specify which type of RLC will be
1623 * used for each type of EPS bearer.
1624 */
1626 /**
1627 * The `SystemInformationPeriodicity` attribute. The interval for sending
1628 * system information.
1629 */
1631 /**
1632 * The `SrsPeriodicity` attribute. The SRS periodicity in milliseconds.
1633 */
1634 uint16_t m_srsCurrentPeriodicityId; ///< SRS current periodicity ID
1635 std::set<uint16_t> m_ueSrsConfigurationIndexSet; ///< UE SRS configuration index set
1636 uint16_t m_lastAllocatedConfigurationIndex; ///< last allocated configuration index
1637 bool m_reconfigureUes; ///< reconfigure UEs?
1638
1639 /**
1640 * The `QRxLevMin` attribute. One of information transmitted within the SIB1
1641 * message, indicating the required minimum RSRP level that any UE must
1642 * receive from this cell before it is allowed to camp to this cell.
1643 */
1645 /**
1646 * The `AdmitHandoverRequest` attribute. Whether to admit an X2 handover
1647 * request from another eNB.
1648 */
1650 /**
1651 * The `AdmitRrcConnectionRequest` attribute. Whether to admit a connection
1652 * request from a UE.
1653 */
1655 /**
1656 * The `RsrpFilterCoefficient` attribute. Determines the strength of
1657 * smoothing effect induced by layer 3 filtering of RSRP in all attached UE.
1658 * If equals to 0, no layer 3 filtering is applicable.
1659 */
1661 /**
1662 * The `RsrqFilterCoefficient` attribute. Determines the strength of
1663 * smoothing effect induced by layer 3 filtering of RSRQ in all attached UE.
1664 * If equals to 0, no layer 3 filtering is applicable.
1665 */
1667 /**
1668 * The `ConnectionRequestTimeoutDuration` attribute. After a RA attempt, if
1669 * no RRC CONNECTION REQUEST is received before this time, the UE context is
1670 * destroyed. Must account for reception of RAR and transmission of RRC
1671 * CONNECTION REQUEST over UL GRANT.
1672 */
1674 /**
1675 * The `ConnectionSetupTimeoutDuration` attribute. After accepting connection
1676 * request, if no RRC CONNECTION SETUP COMPLETE is received before this time,
1677 * the UE context is destroyed. Must account for the UE's reception of RRC
1678 * CONNECTION SETUP and transmission of RRC CONNECTION SETUP COMPLETE.
1679 */
1681 /**
1682 * The `ConnectionRejectedTimeoutDuration` attribute. Time to wait between
1683 * sending a RRC CONNECTION REJECT and destroying the UE context.
1684 */
1686 /**
1687 * The `HandoverJoiningTimeoutDuration` attribute. After accepting a handover
1688 * request, if no RRC CONNECTION RECONFIGURATION COMPLETE is received before
1689 * this time, the UE context is destroyed. Must account for reception of X2
1690 * HO REQ ACK by source eNB, transmission of the Handover Command,
1691 * non-contention-based random access and reception of the RRC CONNECTION
1692 * RECONFIGURATION COMPLETE message.
1693 */
1695 /**
1696 * The `HandoverLeavingTimeoutDuration` attribute. After issuing a Handover
1697 * Command, if neither RRC CONNECTION RE-ESTABLISHMENT nor X2 UE Context
1698 * Release has been previously received, the UE context is destroyed.
1699 */
1701
1702 /**
1703 * The `NewUeContext` trace source. Fired upon creation of a new UE context.
1704 * Exporting cell ID and RNTI.
1705 */
1707 /**
1708 * The `ConnectionEstablished` trace source. Fired upon successful RRC
1709 * connection establishment. Exporting IMSI, cell ID, and RNTI.
1710 */
1712 /**
1713 * The `ConnectionReconfiguration` trace source. Fired upon RRC connection
1714 * reconfiguration. Exporting IMSI, cell ID, and RNTI.
1715 */
1717 /**
1718 * The `HandoverStart` trace source. Fired upon start of a handover
1719 * procedure. Exporting IMSI, cell ID, RNTI, and target cell ID.
1720 */
1722 /**
1723 * The `HandoverEndOk` trace source. Fired upon successful termination of a
1724 * handover procedure. Exporting IMSI, cell ID, and RNTI.
1725 */
1727 /**
1728 * The `RecvMeasurementReport` trace source. Fired when measurement report is
1729 * received. Exporting IMSI, cell ID, and RNTI.
1730 */
1733 /**
1734 * The `NotifyConnectionRelease` trace source. Fired when an UE leaves the eNB.
1735 * Exporting IMSI, cell ID, RNTI.
1736 *
1737 */
1739 /**
1740 * The 'TimerExpiry' Trace source. Fired when any of the RRC timers maintained
1741 * at eNB expires. Exporting IMSI, cell ID, and RNTI and name of timer
1742 * which expired.
1743 */
1745 /**
1746 * The 'HandoverFailureNoPreamble' Trace source. Fired upon handover failure due to
1747 * non-allocation of non-contention based preamble at eNB for UE to handover due to max count
1748 * reached
1749 *
1750 */
1752 /**
1753 * The 'HandoverFailureMaxRach' Trace source. Fired upon handover failure due to max RACH
1754 * attempts from UE to target eNB
1755 *
1756 */
1758 /**
1759 * The 'HandoverFailureLeaving' Trace source. Fired upon handover failure due to handover
1760 * leaving timeout at source eNB
1761 *
1762 */
1764 /**
1765 * The 'HandoverFailureJoining' Trace source. Fired upon handover failure due to handover
1766 * joining timeout at target eNB
1767 *
1768 */
1770
1771 uint16_t m_numberOfComponentCarriers; ///< number of component carriers
1772
1773 bool m_carriersConfigured; ///< are carriers configured
1774
1775 std::map<uint8_t, Ptr<ComponentCarrierBaseStation>>
1776 m_componentCarrierPhyConf; ///< component carrier phy configuration
1777
1778}; // end of `class LteEnbRrc`
1779
1780} // namespace ns3
1781
1782#endif // LTE_ENB_RRC_H
Callback template class.
Definition callback.h:422
Class for forwarding CMAC SAP User functions.
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
These service primitives of this part of the X2 SAP are provided by the X2 entity and issued by RRC e...
Definition epc-x2-sap.h:348
These service primitives of this part of the X2 SAP are provided by the RRC entity and issued by the ...
Definition epc-x2-sap.h:416
EpcX2SpecificEpcX2SapUser.
Definition epc-x2-sap.h:636
This class contains the specification of EPS Bearers.
Definition eps-bearer.h:80
An identifier for simulation events.
Definition event-id.h:45
Ipv4 addresses are stored in host order in this class.
Service Access Point (SAP) offered by the ANR instance to the eNodeB RRC instance.
Definition lte-anr-sap.h:26
Service Access Point (SAP) offered by the eNodeB RRC instance to the ANR instance.
Definition lte-anr-sap.h:84
Service Access Point (SAP) offered by the Component Carrier Manager (CCM) instance to the eNodeB RRC ...
Service Access Point (SAP) offered by the eNodeB RRC instance to the component carrier manager (CCM) ...
store information on active data radio bearer instance
Service Access Point (SAP) offered by the eNB MAC to the eNB RRC See Femto Forum MAC Scheduler Interf...
Service Access Point (SAP) offered by the MAC to the RRC See Femto Forum MAC Scheduler Interface Spec...
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
The LTE Radio Resource Control entity at the eNB.
~LteEnbRrc() override
Destructor.
LteEnbRrcSapProvider * GetLteEnbRrcSapProvider()
void SetCsgId(uint32_t csgId, bool csgIndication)
Associate this RRC entity with a particular CSG information.
void RemoveUe(uint16_t rnti)
remove a UE from the cell
void DoSetPdschConfigDedicated(uint16_t rnti, LteRrcSap::PdschConfigDedicated pa)
Set PDSCH config dedicated function.
std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > m_componentCarrierPhyConf
component carrier phy configuration
void SetSrsPeriodicity(uint32_t p)
bool IsRandomAccessCompleted(uint16_t rnti)
Is random access completed function.
uint8_t GetLogicalChannelGroup(EpsBearer bearer)
int8_t m_qRxLevMin
The QRxLevMin attribute.
std::set< uint16_t > m_ueSrsConfigurationIndexSet
UE SRS configuration index set.
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_handoverStartTrace
The HandoverStart trace source.
void DoSetNumberOfComponentCarriers(uint16_t numberOfComponentCarriers)
Set number of component carriers.
void DoSendReleaseDataRadioBearer(uint64_t imsi, uint16_t rnti, uint8_t bearerId)
This function acts as an interface to trigger Release indication messages towards eNB and EPC.
void SendSystemInformation()
method used to periodically send System Information
LteEpsBearerToRlcMapping_t
Identifies how EPS Bearer parameters are mapped to different RLC types.
void DoRecvRrcConnectionRequest(uint16_t rnti, LteRrcSap::RrcConnectionRequest msg)
Part of the RRC protocol.
std::set< uint8_t > m_ffrMeasIds
List of measurement identities which are intended for FFR purpose.
Callback< void, Ptr< Packet > > m_forwardUpCallback
forward up callback function
void DoRecvSnStatusTransfer(EpcX2SapUser::SnStatusTransferParams params)
Receive SN status transfer function.
void DoRecvHandoverRequest(EpcX2SapUser::HandoverRequestParams params)
Receive handover request function.
LteEnbRrc()
create an RRC instance for use within an eNB
std::set< uint8_t > m_anrMeasIds
List of measurement identities which are intended for ANR purpose.
uint8_t DoAddUeMeasReportConfigForFfr(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for FFR function.
void SendRrcConnectionRelease()
Send RRC connection release function.
LteMacSapProvider * m_macSapProvider
Interface to the eNodeB MAC instance, to be used by RLC instances.
uint32_t GetSrsPeriodicity() const
bool SendData(Ptr< Packet > p)
Enqueue an IP data packet on the proper bearer for downlink transmission.
EpcEnbS1SapUser * GetS1SapUser()
void AddX2Neighbour(uint16_t cellId)
Add a neighbour with an X2 interface.
LteCcmRrcSapUser * m_ccmRrcSapUser
Receive API calls from the LteEnbComponentCarrierManager instance.
Time m_connectionRequestTimeoutDuration
The ConnectionRequestTimeoutDuration attribute.
void HandoverLeavingTimeout(uint16_t rnti)
Method triggered when a UE is expected to leave a cell for a handover but no feedback is received in ...
LteHandoverManagementSapUser * m_handoverManagementSapUser
Receive API calls from the handover algorithm instance.
void(* ReceiveReportTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti, const LteRrcSap::MeasurementReport report)
TracedCallback signature for receive measurement report events.
static TypeId GetTypeId()
Get the type ID.
void DoRecvMeasurementReport(uint16_t rnti, LteRrcSap::MeasurementReport msg)
Part of the RRC protocol.
void SetLteAnrSapProvider(LteAnrSapProvider *s)
set the ANR SAP this RRC should interact with
void(* HandoverStartTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti, const uint16_t targetCid)
TracedCallback signature for handover start events.
void DoRecvHandoverRequestAck(EpcX2SapUser::HandoverRequestAckParams params)
Receive handover request acknowledge function.
LteEnbCphySapUser * GetLteEnbCphySapUser()
bool HasUeManager(uint16_t rnti) const
uint8_t m_rsrqFilterCoefficient
The RsrqFilterCoefficient attribute.
void(* ConnectionHandoverTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti)
TracedCallback signature for connection and handover end events.
std::vector< uint8_t > DoAddUeMeasReportConfigForHandover(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for handover function.
void DoRecvResourceStatusUpdate(EpcX2SapUser::ResourceStatusUpdateParams params)
Receive resource status update function.
uint16_t AddUe(UeManager::State state, uint8_t componentCarrierId)
Allocate a new RNTI for a new UE.
void DoSendLoadInformation(EpcX2Sap::LoadInformationParams params)
Send load information function.
uint8_t GetLogicalChannelPriority(EpsBearer bearer)
void DoCompleteSetupUe(uint16_t rnti, LteEnbRrcSapProvider::CompleteSetupUeParameters params)
Part of the RRC protocol.
uint16_t GetNewSrsConfigurationIndex()
Allocate a new SRS configuration index for a new UE.
uint8_t m_defaultTransmissionMode
The DefaultTransmissionMode attribute.
Time m_connectionRejectedTimeoutDuration
The ConnectionRejectedTimeoutDuration attribute.
Time m_connectionSetupTimeoutDuration
The ConnectionSetupTimeoutDuration attribute.
std::set< uint8_t > m_handoverMeasIds
List of measurement identities which are intended for handover purpose.
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Path switch request acknowledge function.
std::vector< uint8_t > AddUeMeasReportConfig(LteRrcSap::ReportConfigEutra config)
Add a new UE measurement reporting configuration.
bool m_admitHandoverRequest
The AdmitHandoverRequest attribute.
uint16_t m_ulBandwidth
Uplink transmission bandwidth configuration in number of Resource Blocks.
LteAnrSapUser * m_anrSapUser
Receive API calls from the ANR instance.
void(* NewUeContextTracedCallback)(const uint16_t cellId, const uint16_t rnti)
TracedCallback signature for new Ue Context events.
LteHandoverManagementSapProvider * m_handoverManagementSapProvider
Interface to the handover algorithm instance.
uint8_t DoAddUeMeasReportConfigForComponentCarrier(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for component carrier function.
std::vector< LteFfrRrcSapProvider * > m_ffrRrcSapProvider
Interface to the FFR algorithm instance.
uint8_t DoAddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig)
Add UE measure report config for ANR function.
LteEnbRrcSapUser * m_rrcSapUser
Interface to send messages to UE over the RRC protocol.
std::map< uint16_t, Ptr< UeManager > > m_ueMap
The UeMap attribute.
void(* TimerExpiryTracedCallback)(const uint64_t imsi, const uint16_t rnti, const uint16_t cellId, const std::string cause)
TracedCallback signature for timer expiry events.
void HandoverJoiningTimeout(uint16_t rnti)
Method triggered when a UE is expected to join the cell for a handover but does not do so in a reason...
LteEpsBearerToRlcMapping_t m_epsBearerToRlcMapping
The EpsBearerToRlcMapping attribute.
Ptr< UeManager > GetUeManager(uint16_t rnti)
LteCcmRrcSapProvider * m_ccmRrcSapProvider
Interface to the LteEnbComponentCarrierManager instance.
void DoRecvRrcConnectionReestablishmentComplete(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentComplete msg)
Part of the RRC protocol.
void DoRrcConfigurationUpdateInd(LteEnbCmacSapUser::UeConfig params)
RRC configuration update indication function.
TracedCallback< uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport > m_recvMeasurementReportTrace
The RecvMeasurementReport trace source.
LteAnrSapProvider * m_anrSapProvider
Interface to the ANR instance.
std::set< uint8_t > m_componentCarrierMeasIds
List of measurement identities which are intended for component carrier management purposes.
std::vector< LteEnbCphySapProvider * > m_cphySapProvider
Interface to the eNodeB PHY instances.
void SetLteMacSapProvider(LteMacSapProvider *s)
set the MAC SAP provider.
void ConfigureCarriers(std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > ccPhyConf)
Configure carriers.
void(* HandoverFailureTracedCallback)(const uint64_t imsi, const uint16_t rnti, const uint16_t cellId)
TracedCallback signature for handover failure events.
uint16_t m_lastAllocatedConfigurationIndex
last allocated configuration index
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverFailureMaxRachTrace
The 'HandoverFailureMaxRach' Trace source.
LteRrcSap::MeasConfig m_ueMeasConfig
List of measurement configuration which are active in every UE attached to this eNodeB instance.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverFailureNoPreambleTrace
The 'HandoverFailureNoPreamble' Trace source.
TracedCallback< uint16_t, uint16_t > m_newUeContextTrace
The NewUeContext trace source.
Time m_systemInformationPeriodicity
The SystemInformationPeriodicity attribute.
void DoRecvRrcConnectionReconfigurationCompleted(uint16_t rnti, LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Part of the RRC protocol.
void SetLteEnbRrcSapUser(LteEnbRrcSapUser *s)
set the RRC SAP this RRC should interact with
void DoRecvHandoverPreparationFailure(EpcX2SapUser::HandoverPreparationFailureParams params)
Receive handover preparation failure function.
LteHandoverManagementSapUser * GetLteHandoverManagementSapUser()
Get the Handover Management SAP offered by this RRC.
EpcX2SapUser * GetEpcX2SapUser()
Get the X2 SAP offered by this RRC.
std::vector< LteEnbCmacSapUser * > m_cmacSapUser
Receive API calls from the eNodeB MAC instance.
void DoInitialContextSetupRequest(EpcEnbS1SapUser::InitialContextSetupRequestParameters params)
Initial context setup request function.
uint32_t m_dlEarfcn
Downlink E-UTRA Absolute Radio Frequency Channel Number.
void SendHandoverRequest(uint16_t rnti, uint16_t cellId)
Send a HandoverRequest through the X2 SAP interface.
uint16_t m_numberOfComponentCarriers
number of component carriers
void DoNotifyLcConfigResult(uint16_t rnti, uint8_t lcid, bool success)
Notify LC config result function.
TypeId GetRlcType(EpsBearer bearer)
uint8_t m_rsrpFilterCoefficient
The RsrpFilterCoefficient attribute.
EpcEnbS1SapProvider * m_s1SapProvider
Interface to send messages to core network over the S1 protocol.
uint16_t m_lastAllocatedRnti
Last allocated RNTI.
uint32_t m_ulEarfcn
Uplink E-UTRA Absolute Radio Frequency Channel Number.
uint16_t ComponentCarrierToCellId(uint8_t componentCarrierId)
convert the component carrier id to cell id
LteFfrRrcSapUser * GetLteFfrRrcSapUser()
Get the FFR SAP offered by this RRC.
void SetS1SapProvider(EpcEnbS1SapProvider *s)
Set the S1 SAP Provider.
bool HasCellId(uint16_t cellId) const
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReconfigurationTrace
The ConnectionReconfiguration trace source.
EpcX2SapUser * m_x2SapUser
Interface to receive messages from neighbour eNodeB over the X2 interface.
bool m_admitRrcConnectionRequest
The AdmitRrcConnectionRequest attribute.
void DoRecvUeData(EpcX2SapUser::UeDataParams params)
Receive UE data function.
uint16_t m_srsCurrentPeriodicityId
The SrsPeriodicity attribute.
void DoRecvRrcConnectionReestablishmentRequest(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentRequest msg)
Part of the RRC protocol.
bool m_configured
True if ConfigureCell() has been completed.
void ConnectionSetupTimeout(uint16_t rnti)
Method triggered when a UE is expected to complete a connection setup procedure but does not do so in...
LteEnbCmacSapUser * GetLteEnbCmacSapUser()
Get the CMAC SAP offered by this RRC.
void DoRecvRrcConnectionSetupCompleted(uint16_t rnti, LteRrcSap::RrcConnectionSetupCompleted msg)
Part of the RRC protocol.
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReleaseTrace
The NotifyConnectionRelease trace source.
void ConnectionRejectedTimeout(uint16_t rnti)
Method triggered a while after sending RRC Connection Rejected.
void DoRecvUeContextRelease(EpcX2SapUser::UeContextReleaseParams params)
Receive UE context release function.
Time m_handoverLeavingTimeoutDuration
The HandoverLeavingTimeoutDuration attribute.
std::map< uint32_t, X2uTeidInfo > m_x2uTeidInfoMap
TEID, RNTI, DRBID.
void DoRecvLoadInformation(EpcX2SapUser::LoadInformationParams params)
Receive load information function.
void ConnectionRequestTimeout(uint16_t rnti)
Method triggered when a UE is expected to request for connection but does not do so in a reasonable t...
uint16_t DoAllocateTemporaryCellRnti(uint8_t componentCarrierId)
Allocate temporary cell RNTI function.
std::vector< LteEnbCphySapUser * > m_cphySapUser
Receive API calls from the eNodeB PHY instances.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverFailureJoiningTrace
The 'HandoverFailureJoining' Trace source.
void SetLteHandoverManagementSapProvider(LteHandoverManagementSapProvider *s)
set the Handover Management SAP this RRC should interact with
void SetLteFfrRrcSapProvider(LteFfrRrcSapProvider *s)
set the FFR SAP this RRC should interact with
LteCcmRrcSapUser * GetLteCcmRrcSapUser()
Get the Component Carrier Management SAP offered by this RRC.
void SetLteEnbCphySapProvider(LteEnbCphySapProvider *s)
set the CPHY SAP this RRC should use to interact with the PHY
void DoDispose() override
Destructor implementation.
bool m_reconfigureUes
reconfigure UEs?
std::vector< LteFfrRrcSapUser * > m_ffrRrcSapUser
Receive API calls from the FFR algorithm instance.
EpcX2SapProvider * m_x2SapProvider
Interface to send messages to neighbour eNodeB over the X2 interface.
std::vector< LteEnbCmacSapProvider * > m_cmacSapProvider
Interface to the eNodeB MAC instance.
std::vector< LteRrcSap::SystemInformationBlockType1 > m_sib1
The System Information Block Type 1 that is currently broadcasted over BCH.
void DoDataRadioBearerSetupRequest(EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params)
Data radio beaerer setup request function.
LteAnrSapUser * GetLteAnrSapUser()
Get the ANR SAP offered by this RRC.
void SetLteCcmRrcSapProvider(LteCcmRrcSapProvider *s)
set the Component Carrier Management SAP this RRC should interact with
LteEnbRrcSapProvider * m_rrcSapProvider
Interface to receive messages from UE over the RRC protocol.
bool m_carriersConfigured
are carriers configured
void SetForwardUpCallback(Callback< void, Ptr< Packet > > cb)
set the callback used to forward data packets up the stack
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionEstablishedTrace
The ConnectionEstablished trace source.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverFailureLeavingTrace
The 'HandoverFailureLeaving' Trace source.
TracedCallback< uint64_t, uint16_t, uint16_t, std::string > m_rrcTimeoutTrace
The 'TimerExpiry' Trace source.
void DoTriggerHandover(uint16_t rnti, uint16_t targetCellId)
Trigger handover function.
void DoRecvIdealUeContextRemoveRequest(uint16_t rnti)
Part of the RRC protocol.
void SetCellId(uint16_t m_cellId)
set the cell id of this eNB
EpcEnbS1SapUser * m_s1SapUser
Interface to receive messages from core network over the S1 protocol.
void RemoveSrsConfigurationIndex(uint16_t srcCi)
remove a previously allocated SRS configuration index
Time m_handoverJoiningTimeoutDuration
The HandoverJoiningTimeoutDuration attribute.
void ConfigureCell(std::map< uint8_t, Ptr< ComponentCarrierBaseStation > > ccPhyConf)
Configure cell-specific parameters.
void SetLteEnbCmacSapProvider(LteEnbCmacSapProvider *s)
set the CMAC SAP this RRC should interact with
uint16_t m_dlBandwidth
Downlink transmission bandwidth configuration in number of Resource Blocks.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
The HandoverEndOk trace source.
uint8_t CellToComponentCarrierId(uint16_t cellId)
convert the cell id to component carrier id
void SetEpcX2SapProvider(EpcX2SapProvider *s)
Set the X2 SAP this RRC should interact with.
void DoRecvHandoverCancel(EpcX2SapUser::HandoverCancelParams params)
Receive Handover Cancel function.
Part of the RRC protocol.
Part of the RRC protocol.
Service Access Point (SAP) offered by the Frequency Reuse algorithm instance to the eNodeB RRC instan...
Service Access Point (SAP) offered by the eNodeB RRC instance to the Frequency Reuse algorithm instan...
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance.
Service Access Point (SAP) offered by the eNodeB RRC instance to the handover algorithm instance.
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
Definition lte-mac-sap.h:25
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36....
LtePdcpSpecificLtePdcpSapUser class.
store information on active radio bearer instance
store information on active signaling radio bearer instance
Template for the implementation of the EpcEnbS1SapUser as a member of an owner class of type C to whi...
Template for the implementation of the LteAnrSapUser as a member of an owner class of type C to which...
MemberLteCcmRrcSapUser class.
Template for the implementation of the LteEnbRrcSapProvider as a member of an owner class of type C t...
Template for the implementation of the LteFfrRrcSapUser as a member of an owner class of type C to wh...
Template for the implementation of the LteHandoverManagementSapUser as a member of an owner class of ...
A base class which provides memory management and object aggregation.
Definition object.h:78
network packets
Definition packet.h:228
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:48
Manages all the radio bearer information possessed by the ENB RRC for a single UE.
Definition lte-enb-rrc.h:57
bool m_pendingStartDataRadioBearers
Pending start data radio bearers.
void RecvRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentRequest interface.
void InitialContextSetupRequest()
Process Initial context setup request message from the MME.
void RecvUeContextRelease(EpcX2SapUser::UeContextReleaseParams params)
Take the necessary actions in response to the reception of an X2 UE CONTEXT RELEASE message.
void RecordDataRadioBearersToBeStarted()
Start all configured data radio bearers.
std::map< uint8_t, Ptr< LteDataRadioBearerInfo > > m_drbMap
The DataRadioBearerMap attribute.
Ptr< LteSignalingRadioBearerInfo > m_srb1
The Srb1 attribute.
void PrepareHandover(uint16_t cellId)
Start the handover preparation and send the handover request.
void SetImsi(uint64_t imsi)
Set the IMSI.
void SendData(uint8_t bid, Ptr< Packet > p)
Send a data packet over the appropriate Data Radio Bearer.
void SendRrcConnectionRelease()
This function acts as an interface to trigger the connection release towards eNB, EPC and UE.
EpcX2Sap::HandoverCancelParams BuildHoCancelMsg()
build handover cancel message
void CompleteSetupUe(LteEnbRrcSapProvider::CompleteSetupUeParameters params)
Implement the LteEnbRrcSapProvider::CompleteSetupUe interface.
bool m_needPhyMacConfiguration
need Phy MAC configuration
State
The state of the UeManager at the eNB RRC.
Definition lte-enb-rrc.h:67
@ CONNECTION_REESTABLISHMENT
Definition lte-enb-rrc.h:74
@ CONNECTION_RECONFIGURATION
Definition lte-enb-rrc.h:73
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigForHandoverPreparationInfo()
void CmacUeConfigUpdateInd(LteEnbCmacSapUser::UeConfig cmacParams)
CMAC UE config update indication function.
void RecvHandoverCancel(EpcX2SapUser::HandoverCancelParams params)
Take the necessary actions in response to the reception of an X2 UE CONTEXT RELEASE message.
void DoDispose() override
Destructor implementation.
LteRrcSap::RrcConnectionReconfiguration BuildRrcConnectionReconfiguration()
EventId m_handoverJoiningTimeout
Time limit before a handover joining timeout occurs.
uint8_t AddDataRadioBearerInfo(Ptr< LteDataRadioBearerInfo > radioBearerInfo)
Add a new LteDataRadioBearerInfo structure to the UeManager.
uint16_t GetSrsConfigurationIndex() const
uint8_t Lcid2Bid(uint8_t lcid)
uint16_t m_rnti
The C-RNTI attribute.
void RecvSnStatusTransfer(EpcX2SapUser::SnStatusTransferParams params)
Take the necessary actions in response to the reception of an X2 SN STATUS TRANSFER message.
~UeManager() override
uint8_t Bid2Lcid(uint8_t bid)
LteRrcSap::PhysicalConfigDedicated m_physicalConfigDedicated
physical config dedicated
void RecvRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionSetupCompleted interface.
std::list< uint8_t > m_drbsToBeStarted
DRBS to be started.
uint8_t m_lastAllocatedDrbid
last allocated Data Radio Bearer ID
uint8_t GetComponentCarrierId() const
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
EventId m_connectionRejectedTimeout
The delay before a connection rejected timeout occurs.
void RemoveDataRadioBearerInfo(uint8_t drbid)
remove the LteDataRadioBearerInfo corresponding to a bearer being released
void SetupDataRadioBearer(EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress)
Setup a new data radio bearer, including both the configuration within the eNB and the necessary RRC ...
void RecvRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationCompleted interface.
TracedCallback< uint64_t, uint16_t, uint16_t, uint8_t > m_drbCreatedTrace
The DrbCreated trace source.
State GetState() const
uint16_t m_targetX2apId
target X2 ap ID
uint8_t Drbid2Bid(uint8_t drbid)
static TypeId GetTypeId()
Get the type ID.
Ptr< LteSignalingRadioBearerInfo > m_srb0
The Srb0 attribute.
uint64_t GetImsi() const
EventId m_connectionRequestTimeout
Time limit before a connection request timeout occurs.
uint64_t m_imsi
International Mobile Subscriber Identity assigned to this UE.
uint8_t GetNewRrcTransactionIdentifier()
bool m_caSupportConfigured
Define if the Carrier Aggregation was already configure for the current UE on not.
uint16_t m_targetCellId
target cell ID
void SetSrsConfigurationIndex(uint16_t srsConfIndex)
Set the SRS configuration index and do the necessary reconfiguration.
uint16_t GetRnti() const
Ptr< LteDataRadioBearerInfo > GetDataRadioBearerInfo(uint8_t drbid)
void SendPacket(uint8_t bid, Ptr< Packet > p)
Send a data packet over the appropriate Data Radio Bearer.
void SetSource(uint16_t sourceCellId, uint16_t sourceX2apId)
Set the identifiers of the source eNB for the case where a UE joins the current eNB as part of a hand...
LteRrcSap::NonCriticalExtensionConfiguration BuildNonCriticalExtensionConfigurationCa()
std::list< std::pair< uint8_t, Ptr< Packet > > > m_packetBuffer
Packet buffer for when UE is doing the handover.
uint8_t m_lastRrcTransactionIdentifier
last RRC transaction identifier
uint8_t m_componentCarrierId
ID of the primary CC for this UE.
State m_state
The current UeManager state.
void RecvMeasurementReport(LteRrcSap::MeasurementReport msg)
Implement the LteEnbRrcSapProvider::RecvMeasurementReport interface.
void DoInitialize() override
Initialize() implementation.
Ptr< LteEnbRrc > m_rrc
Pointer to the parent eNodeB RRC.
TracedCallback< uint64_t, uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
bool m_pendingRrcConnectionReconfiguration
pending RRC connection reconfiguration
void(* StateTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti, const State oldState, const State newState)
TracedCallback signature for state transition events.
void ReleaseDataRadioBearer(uint8_t drbid)
Release a given radio bearer.
void RecvRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentComplete interface.
uint8_t Bid2Drbid(uint8_t bid)
LteRrcSap::RrcConnectionReconfiguration GetRrcConnectionReconfigurationForHandover(uint8_t componentCarrierId)
void StartDataRadioBearers()
Start the data radio bearers that have been previously recorded to be started using RecordDataRadioBe...
void SendUeContextRelease()
send the UE CONTEXT RELEASE X2 message to the source eNB, thus successfully terminating an X2 handove...
void RecvHandoverRequestAck(EpcX2SapUser::HandoverRequestAckParams params)
take the necessary actions in response to the reception of an X2 HANDOVER REQUEST ACK message
LteRrcSap::RadioResourceConfigDedicated BuildRadioResourceConfigDedicated()
void CancelPendingEvents()
Cancel all timers which are running for the UE.
uint8_t Lcid2Drbid(uint8_t lcid)
void ScheduleRrcConnectionReconfiguration()
schedule an RRC Connection Reconfiguration procedure with the UE
uint16_t m_sourceCellId
source cell ID
void RecvHandoverPreparationFailure(uint16_t cellId)
Take the necessary actions in response to the reception of an X2 HO preparation failure message.
EpcX2Sap::HandoverPreparationFailureParams BuildHoPrepFailMsg()
build handover preparation failure message
EventId m_handoverLeavingTimeout
Time limit before a handover leaving timeout occurs.
uint16_t m_sourceX2apId
source X2 ap ID
std::vector< EpcX2Sap::ErabToBeSetupItem > GetErabList()
void RecvRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Implement the LteEnbRrcSapProvider::RecvRrcConnectionRequest interface.
uint8_t Drbid2Lcid(uint8_t drbid)
LtePdcpSapUser * m_drbPdcpSapUser
DRB PDCP SAP user.
void SwitchToState(State s)
Switch the UeManager to the given state.
void SetPdschConfigDedicated(LteRrcSap::PdschConfigDedicated pdschConfigDedicated)
Configure PdschConfigDedicated (i.e.
EventId m_connectionSetupTimeout
Time limit before a connection setup timeout occurs.
void RecvIdealUeContextRemoveRequest(uint16_t rnti)
Implement the LteEnbRrcSapProvider::RecvIdealUeContextRemoveRequest interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Parameters passed to DataRadioBearerSetupRequest ()
Parameters passed to InitialContextSetupRequest ()
PathSwitchRequestAcknowledgeParameters structure.
Parameters of the HANDOVER CANCEL message.
Definition epc-x2-sap.h:334
Parameters of the HANDOVER PREPARATION FAILURE message.
Definition epc-x2-sap.h:253
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
Definition epc-x2-sap.h:237
Parameters of the HANDOVER REQUEST message.
Definition epc-x2-sap.h:219
Parameters of the LOAD INFORMATION message.
Definition epc-x2-sap.h:295
Parameters of the RESOURCE STATUS UPDATE message.
Definition epc-x2-sap.h:306
Parameters of the SN STATUS TRANSFER message.
Definition epc-x2-sap.h:267
Parameters of the UE CONTEXT RELEASE message.
Definition epc-x2-sap.h:282
Parameters of the UE DATA primitive.
Definition epc-x2-sap.h:321
Parameters for [re]configuring the UE.
X2uTeidInfo structure.
CompleteSetupUeParameters structure.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
MeasConfig structure.
MeasurementReport structure.
NonCriticalExtensionConfiguration structure.
PdschConfigDedicated structure.
PhysicalConfigDedicated structure.
RadioResourceConfigDedicated structure.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
RrcConnectionReconfigurationCompleted structure.
RrcConnectionReconfiguration structure.
RrcConnectionReestablishmentComplete structure.
RrcConnectionReestablishmentRequest structure.
RrcConnectionRequest structure.
RrcConnectionSetupCompleted structure.