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