26 #include <ns3/nstime.h>
27 #include <ns3/object.h>
28 #include <ns3/traced-callback.h>
29 #include <ns3/event-id.h>
31 #include <ns3/lte-enb-cmac-sap.h>
32 #include <ns3/lte-mac-sap.h>
33 #include <ns3/ff-mac-sched-sap.h>
34 #include <ns3/ff-mac-csched-sap.h>
35 #include <ns3/lte-pdcp-sap.h>
36 #include <ns3/epc-x2-sap.h>
37 #include <ns3/epc-enb-s1-sap.h>
38 #include <ns3/lte-handover-management-sap.h>
39 #include <ns3/lte-enb-cphy-sap.h>
40 #include <ns3/lte-rrc-sap.h>
41 #include <ns3/lte-anr-sap.h>
48 class LteRadioBearerInfo;
49 class LteSignalingRadioBearerInfo;
50 class LteDataRadioBearerInfo;
115 void SetSource (uint16_t sourceCellId, uint16_t sourceX2apId);
208 std::vector<EpcX2Sap::ErabToBeSetupItem>
GetErabList ();
393 std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >
m_drbMap;
821 void SetCsgId (uint32_t csgId,
bool csgIndication);
977 #endif // LTE_ENB_RRC_H
Callback< void, Ptr< Packet > > m_forwardUpCallback
TracedCallback< uint64_t, uint16_t, uint16_t, State, State > m_stateTransitionTrace
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
Parameters passed to DataRadioBearerSetupRequest ()
void SetEpcX2SapProvider(EpcX2SapProvider *s)
Set the X2 SAP this RRC should interact with.
Template for the implementation of the EpcEnbS1SapUser as a member of an owner class of type C to whi...
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication...
keep track of time values and allow control of global simulation resolution
Ptr< LteSignalingRadioBearerInfo > m_srb1
void SendHandoverRequest(uint16_t rnti, uint16_t cellId)
Send a HandoverRequest through the X2 SAP interface.
void SendSystemInformation()
method used to periodically send System Information
LteRrcSap::RadioResourceConfigDedicated GetRadioResourceConfigForHandoverPreparationInfo()
smart pointer class similar to boost::intrusive_ptr
These service primitives of this part of the X2 SAP are provided by the X2 entity and issued by RRC e...
LteEnbRrc()
create an RRC instance for use within an eNB
uint16_t AddUe(UeManager::State state)
Allocate a new RNTI for a new UE.
State
The state of the UeManager at the eNB RRC.
void RecordDataRadioBearersToBeStarted()
Start all configured data radio bearers.
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void RecvUeContextRelease(EpcX2SapUser::UeContextReleaseParams params)
Take the necessary actions in response to the reception of an X2 UE CONTEXT RELEASE message...
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication...
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...
void RecvHandoverPreparationFailure(uint16_t cellId)
Take the necessary actions in response to the reception of an X2 HO preparation failure message...
void DoNotifyLcConfigResult(uint16_t rnti, uint8_t lcid, bool success)
void SetCellId(uint16_t m_cellId)
set the cell id of this eNB
uint8_t GetLogicalChannelGroup(EpsBearer bearer)
void AddX2Neighbour(uint16_t cellId)
Add a neighbour with an X2 interface.
uint8_t Drbid2Bid(uint8_t drbid)
bool m_admitHandoverRequest
Parameters of the HANDOVER REQUEST message.
Part of the RRC protocol.
void DoRecvRrcConnectionReconfigurationCompleted(uint16_t rnti, LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationCompleted ...
Template for the implementation of the LteHandoverManagementSapUser as a member of an owner class of ...
Class for forwarding CMAC SAP User functions.
Specifies criteria for triggering of an E-UTRA measurement reporting event.
void SetCsgId(uint32_t csgId, bool csgIndication)
Associate this RRC entity with a particular CSG information.
uint16_t GetSrsConfigurationIndex(void) const
static TypeId GetTypeId(void)
virtual ~LteEnbRrc()
Destructor.
uint8_t Lcid2Bid(uint8_t lcid)
void SetLteHandoverManagementSapProvider(LteHandoverManagementSapProvider *s)
set the Handover Management SAP this RRC should interact with
EpcX2SapUser * GetEpcX2SapUser()
Get the X2 SAP offered by this RRC.
void SetLteEnbCphySapProvider(LteEnbCphySapProvider *s)
set the CPHY SAP this RRC should use to interact with the PHY
bool m_needTransmissionModeConfiguration
uint16_t m_lastAllocatedRnti
uint16_t GetNewSrsConfigurationIndex(void)
Allocate a new SRS configuration index for a new UE.
LteEnbCmacSapUser * GetLteEnbCmacSapUser()
Get the CMAC SAP offered by this RRC.
uint8_t m_lastRrcTransactionIdentifier
uint16_t m_srsCurrentPeriodicityId
The LTE Radio Resource Control entity at the eNB.
void SetLteEnbRrcSapUser(LteEnbRrcSapUser *s)
set the RRC SAP this RRC should interact with
void SetLteEnbCmacSapProvider(LteEnbCmacSapProvider *s)
set the CMAC SAP this RRC should interact with
uint16_t DoAllocateTemporaryCellRnti()
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
LteEpsBearerToRlcMapping_t
Identifies how EPS Bearer parameters are mapped to different RLC types.
Time m_handoverLeavingTimeoutDuration
Time m_connectionRejectedTimeoutDuration
LteMacSapProvider * m_macSapProvider
LteHandoverManagementSapUser * GetLteHandoverManagementSapUser()
Get the Handover Management SAP offered by this RRC.
LteEnbRrcSapProvider * m_rrcSapProvider
void RemoveSrsConfigurationIndex(uint16_t srcCi)
remove a previously allocated SRS configuration index
void SetImsi(uint64_t imsi)
Set the IMSI.
void SetLteMacSapProvider(LteMacSapProvider *s)
set the MAC SAP provider.
void SendUeContextRelease()
send the UE CONTEXT RELEASE X2 message to the source eNB, thus successfully terminating an X2 handove...
LteRrcSap::RrcConnectionReconfiguration GetRrcConnectionReconfigurationForHandover()
void SwitchToState(State s)
Switch the UeManager to the given state.
void RecvRrcConnectionReconfigurationCompleted(LteRrcSap::RrcConnectionReconfigurationCompleted msg)
Part of the RRC protocol. Implement the LteEnbRrcSapProvider::RecvRrcConnectionReconfigurationComplet...
void ReleaseDataRadioBearer(uint8_t drbid)
Release a given radio bearer.
uint8_t AddDataRadioBearerInfo(Ptr< LteDataRadioBearerInfo > radioBearerInfo)
Add a new LteDataRadioBearerInfo structure to the UeManager.
EpcX2SapUser * m_x2SapUser
uint8_t m_rsrqFilterCoefficient
LteEnbRrcSapUser * m_rrcSapUser
EpcEnbS1SapProvider * m_s1SapProvider
LteRrcSap::SystemInformationBlockType1 m_sib1
the System Information Block Type 1 that is currently broadcasted over BCH
void SetForwardUpCallback(Callback< void, Ptr< Packet > > cb)
set the callback used to forward data packets up the stack
void DoRecvRrcConnectionSetupCompleted(uint16_t rnti, LteRrcSap::RrcConnectionSetupCompleted msg)
Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvRrcConnectionSetupCompleted interface ...
void DoRecvRrcConnectionReestablishmentComplete(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentComplete msg)
Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentComplete i...
LteHandoverManagementSapUser * m_handoverManagementSapUser
void DoCompleteSetupUe(uint16_t rnti, LteEnbRrcSapProvider::CompleteSetupUeParameters params)
Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::CompleteSetupUe interface to UeManager::Co...
TracedCallback< uint16_t, uint16_t > m_newUeContextTrace
Service Access Point (SAP) offered by the MAC to the RRC See Femto Forum MAC Scheduler Interface Spec...
EventId m_connectionTimeout
LteEnbCmacSapUser * m_cmacSapUser
Ptr< UeManager > GetUeManager(uint16_t rnti)
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
This class contains the specification of EPS Bearers.
bool m_admitRrcConnectionRequest
LtePdcpSapUser * m_drbPdcpSapUser
uint8_t AddUeMeasReportConfig(LteRrcSap::ReportConfigEutra config)
Add a new UE measurement reporting configuration.
EventId m_connectionRejectedTimeout
LteRrcSap::RrcConnectionReconfiguration BuildRrcConnectionReconfiguration()
Ptr< LteSignalingRadioBearerInfo > m_srb0
void DoRecvRrcConnectionRequest(uint16_t rnti, LteRrcSap::RrcConnectionRequest msg)
Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvRrcConnectionRequest interface to UeMa...
void SetSrsConfigurationIndex(uint16_t srsConfIndex)
Set the SRS configuration index and do the necessary reconfiguration.
void DoTriggerHandover(uint16_t rnti, uint16_t targetCellId)
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionEstablishedTrace
Parameters of the HANDOVER PREPARATION FAILURE message.
void DoPathSwitchRequestAcknowledge(EpcEnbS1SapUser::PathSwitchRequestAcknowledgeParameters params)
Parameters of the SN STATUS TRANSFER message.
LteEnbCphySapProvider * m_cphySapProvider
Service Access Point (SAP) offered by the eNodeB RRC instance to the ANR instance.
uint8_t Drbid2Lcid(uint8_t drbid)
void SendData(uint8_t bid, Ptr< Packet > p)
Send a data packet over the appropriate Data Radio Bearer.
std::set< uint8_t > m_handoverMeasIds
void DoRecvUeContextRelease(EpcX2SapUser::UeContextReleaseParams params)
uint8_t m_lastAllocatedDrbid
uint8_t Bid2Lcid(uint8_t bid)
std::map< uint32_t, X2uTeidInfo > m_x2uTeidInfoMap
TracedCallback< uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport > m_recvMeasurementReportTrace
uint8_t m_rsrpFilterCoefficient
Part of the RRC protocol.
uint8_t DoAddUeMeasReportConfigForAnr(LteRrcSap::ReportConfigEutra reportConfig)
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 RemoveDataRadioBearerInfo(uint8_t drbid)
remove the LteDataRadioBearerInfo corresponding to a bearer being released
static TypeId GetTypeId(void)
void RecvSnStatusTransfer(EpcX2SapUser::SnStatusTransferParams params)
Take the necessary actions in response to the reception of an X2 SN STATUS TRANSFER message...
EpcX2SapProvider * m_x2SapProvider
Parameters of the RESOURCE STATUS UPDATE message.
void ConnectionTimeout(uint16_t rnti)
Method triggered when a UE is expected to get connected but does not do so in a reasonable time...
Manages all the radio bearer information possessed by the ENB RRC for a single UE.
LteRrcSap::RadioResourceConfigDedicated BuildRadioResourceConfigDedicated()
EventId m_handoverLeavingTimeout
void SetLteAnrSapProvider(LteAnrSapProvider *s)
set the ANR SAP this RRC should interact with
Parameters of the UE CONTEXT RELEASE message.
Parameters of the HANDOVER REQUEST ACKNOWLEDGE message.
void RecvRrcConnectionSetupCompleted(LteRrcSap::RrcConnectionSetupCompleted msg)
Part of the RRC protocol. Implement the LteEnbRrcSapProvider::RecvRrcConnectionSetupCompleted interfa...
std::list< uint8_t > m_drbsToBeStarted
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_handoverStartTrace
std::vector< EpcX2Sap::ErabToBeSetupItem > GetErabList()
void ScheduleRrcConnectionReconfiguration()
schedule an RRC Connection Reconfiguration procedure with the UE
These service primitives of this part of the X2 SAP are provided by the RRC entity and issued by the ...
LteAnrSapUser * GetLteAnrSapUser()
Get the ANR SAP offered by this RRC.
Parameters for [re]configuring the UE.
Time m_systemInformationPeriodicity
LteEnbRrcSapProvider * GetLteEnbRrcSapProvider()
uint8_t m_defaultTransmissionMode
void DoRecvResourceStatusUpdate(EpcX2SapUser::ResourceStatusUpdateParams params)
void DoRecvUeData(EpcX2SapUser::UeDataParams params)
uint64_t GetImsi(void) const
void PrepareHandover(uint16_t cellId)
Start the handover preparation and send the handover request.
uint8_t DoAddUeMeasReportConfigForHandover(LteRrcSap::ReportConfigEutra reportConfig)
uint16_t GetRnti(void) const
void RecvRrcConnectionReestablishmentComplete(LteRrcSap::RrcConnectionReestablishmentComplete msg)
Part of the RRC protocol. Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentComplet...
EpcEnbS1SapUser * m_s1SapUser
std::set< uint16_t > m_ueSrsConfigurationIndexSet
void SetSrsPeriodicity(uint32_t p)
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
TypeId GetRlcType(EpsBearer bearer)
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...
Ipv4 addresses are stored in host order in this class.
LteAnrSapUser * m_anrSapUser
Template for the implementation of the LteEnbRrcSapProvider as a member of an owner class of type C t...
bool m_pendingRrcConnectionReconfiguration
Service Access Point (SAP) offered by the ANR instance to the eNodeB RRC instance.
void DoRrcConfigurationUpdateInd(LteEnbCmacSapUser::UeConfig params)
an identifier for simulation events.
void DoRecvHandoverPreparationFailure(EpcX2SapUser::HandoverPreparationFailureParams params)
Service Access Point (SAP) offered by the handover algorithm instance to the eNodeB RRC instance...
void StartDataRadioBearers()
Start the data radio bearers that have been previously recorded to be started using RecordDataRadioBe...
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
EpcEnbS1SapUser * GetS1SapUser()
void RecvRrcConnectionReestablishmentRequest(LteRrcSap::RrcConnectionReestablishmentRequest msg)
Part of the RRC protocol. Implement the LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentRequest...
LteEnbCmacSapProvider * m_cmacSapProvider
LteRrcSap::PhysicalConfigDedicated m_physicalConfigDedicated
std::map< uint16_t, Ptr< UeManager > > m_ueMap
void RecvRrcConnectionRequest(LteRrcSap::RrcConnectionRequest msg)
Part of the RRC protocol. Implement the LteEnbRrcSapProvider::RecvRrcConnectionRequest interface...
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
std::map< uint8_t, Ptr< LteDataRadioBearerInfo > > m_drbMap
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReconfigurationTrace
uint8_t GetLogicalChannelPriority(EpsBearer bearer)
uint8_t GetNewRrcTransactionIdentifier()
void DoRecvSnStatusTransfer(EpcX2SapUser::SnStatusTransferParams params)
LteEnbCphySapUser * GetLteEnbCphySapUser()
void ConnectionRejectedTimeout(uint16_t rnti)
Method triggered a while after sending RRC Connection Rejected.
uint32_t GetSrsPeriodicity() const
Ptr< LteDataRadioBearerInfo > GetDataRadioBearerInfo(uint8_t drbid)
Template for the implementation of the LteAnrSapUser as a member of an owner class of type C to which...
Time m_handoverJoiningTimeoutDuration
uint16_t m_lastAllocatedConfigurationIndex
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 ...
LteHandoverManagementSapProvider * m_handoverManagementSapProvider
a base class which provides memory management and object aggregation
std::set< uint8_t > m_anrMeasIds
void ConfigureCell(uint8_t ulBandwidth, uint8_t dlBandwidth, uint16_t ulEarfcn, uint16_t dlEarfcn, uint16_t cellId)
Configure cell-specific parameters.
void DoRecvRrcConnectionReestablishmentRequest(uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentRequest msg)
Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvRrcConnectionReestablishmentRequest in...
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 UE PHY to the UE RRC for control purposes.
void RemoveUe(uint16_t rnti)
remove a UE from the cell
void DoRecvMeasurementReport(uint16_t rnti, LteRrcSap::MeasurementReport msg)
Part of the RRC protocol. Forwarding LteEnbRrcSapProvider::RecvMeasurementReport interface to UeManag...
void CmacUeConfigUpdateInd(LteEnbCmacSapUser::UeConfig cmacParams)
Parameters of the UE DATA primitive.
enum LteEpsBearerToRlcMapping_t m_epsBearerToRlcMapping
void RecvMeasurementReport(LteRrcSap::MeasurementReport msg)
Part of the RRC protocol. Implement the LteEnbRrcSapProvider::RecvMeasurementReport interface...
a unique identifier for an interface.
uint8_t Bid2Drbid(uint8_t bid)
void SetS1SapProvider(EpcEnbS1SapProvider *s)
Set the S1 SAP Provider.
uint8_t Lcid2Drbid(uint8_t lcid)
LteEnbCphySapUser * m_cphySapUser
LteAnrSapProvider * m_anrSapProvider
Service Access Point (SAP) offered by the eNodeB RRC instance to the handover algorithm instance...
void DoDataRadioBearerSetupRequest(EpcEnbS1SapUser::DataRadioBearerSetupRequestParameters params)
void DoRecvLoadInformation(EpcX2SapUser::LoadInformationParams params)
void RecvHandoverRequestAck(EpcX2SapUser::HandoverRequestAckParams params)
take the necessary actions in response to the reception of an X2 HANDOVER REQUEST ACK message ...
bool SendData(Ptr< Packet > p)
Enqueue an IP data packet on the proper bearer for downlink transmission.
EventId m_handoverJoiningTimeout
Time m_connectionTimeoutDuration
void CompleteSetupUe(LteEnbRrcSapProvider::CompleteSetupUeParameters params)
Part of the RRC protocol. Implement the LteEnbRrcSapProvider::CompleteSetupUe interface.
virtual void DoInitialize()
This method is called only once by Object::Initialize.
LteRrcSap::MeasConfig m_ueMeasConfig
List of measurement configuration which are active in every UE attached to this eNodeB instance...
void DoRecvHandoverRequestAck(EpcX2SapUser::HandoverRequestAckParams params)
void DoRecvHandoverRequest(EpcX2SapUser::HandoverRequestParams params)