28 #include <ns3/object.h> 29 #include <ns3/packet.h> 30 #include <ns3/lte-ue-cmac-sap.h> 31 #include <ns3/lte-pdcp-sap.h> 32 #include <ns3/lte-as-sap.h> 33 #include <ns3/lte-ue-cphy-sap.h> 34 #include <ns3/lte-rrc-sap.h> 35 #include <ns3/traced-callback.h> 36 #include "ns3/component-carrier-ue.h" 37 #include <ns3/lte-ue-ccm-rrc-sap.h> 44 #define MAX_NO_CC 5 // this is the maximum number of carrier components allowed by 3GPP up to R13 318 (uint64_t imsi, uint16_t cellId);
328 (uint64_t imsi, uint16_t cellId, uint16_t rnti);
340 (uint64_t imsi, uint16_t cellId, uint16_t rnti, uint16_t otherCid);
352 (uint64_t imsi, uint16_t cellId, uint16_t rnti,
602 bool useLayer3Filtering);
621 bool useLayer3Filtering, uint16_t componentCarrierId);
763 std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >
m_drbMap;
1181 #endif // LTE_UE_RRC_H
std::map< uint16_t, MeasValues > m_storedScellMeasValues
Internal storage of the latest measurement results from all detected detected Secondary carrier compo...
MemberLteUeCcmRrcSapUser class.
uint64_t GetImsi(void) const
Simulation virtual time values and global simulation resolution.
void(* SCarrierConfiguredTracedCallback)(Ptr< LteUeRrc >, std::list< LteRrcSap::SCellToAddMod >)
TracedCallback signature for secondary carrier configuration events.
Smart pointer class similar to boost::intrusive_ptr.
Part of the RRC protocol.
void DoRecvRrcConnectionSetup(LteRrcSap::RrcConnectionSetup msg)
Part of the RRC protocol.
void DoRecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock msg)
Receive master information block function.
std::map< uint8_t, LteRrcSap::MeasObjectToAddMod > measObjectList
measure object list
UeMemberLteUeCmacSapUser class.
void CancelEnteringTrigger(uint8_t measId)
Clear all the waiting triggers in m_enteringTriggerQueue which are associated with the given measurem...
void DoRecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 msg)
Receive system information block type 1 function.
void DoComponentCarrierEnabling(std::vector< uint8_t > res)
RRC CCM SAP USER Method.
static TypeId GetTypeId(void)
Get the type ID.
std::set< uint16_t > cellsTriggeredList
note: only E-UTRA is supported.
uint8_t GetDlBandwidth() const
LtePdcpSapUser * m_drbPdcpSapUser
DRB PDCP SAP user.
EventId periodicReportTimer
periodic report timer
void(* MibSibHandoverTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti, uint16_t otherCid)
TracedCallback signature for MIBRecieved, Sib1Received and HandoverStart events.
void DoRecvSystemInformation(LteRrcSap::SystemInformation msg)
Part of the RRC protocol.
Template for the implementation of the LteUeCphySapUser as a member of an owner class of type C to wh...
void SetAsSapUser(LteAsSapUser *s)
Set the AS SAP user to interact with the NAS entity.
void MeasurementReportTriggering(uint8_t measId)
Evaluate the reporting criteria of a measurement identity and invoke some reporting actions based on ...
void DoRecvRrcConnectionReject(LteRrcSap::RrcConnectionReject msg)
Part of the RRC protocol.
bool m_hasReceivedSib2
True if SIB2 was received for the current cell.
std::map< uint8_t, Ptr< LteDataRadioBearerInfo > > m_drbMap
The DataRadioBearerMap attribute.
void ApplyMeasConfig(LteRrcSap::MeasConfig mc)
Update the current measurement configuration m_varMeasConfig.
virtual void DoDispose(void)
Destructor implementation.
void SetUseRlcSm(bool val)
uint16_t m_numberOfComponentCarriers
The number of component carriers.
uint8_t measId
The measurement identity which raised the trigger.
Includes the accumulated configuration of the measurements to be performed by the UE...
LteRrcSap::PdschConfigDedicated m_pdschConfigDedicated
the PDSCH condig dedicated
void DoSetTemporaryCellRnti(uint16_t rnti)
Set temporary cell rnti function.
Represents a single triggered event from a measurement identity which reporting criteria have been fu...
EventId m_connectionTimeout
Invokes ConnectionEstablishmentTimeout() if RRC connection establishment procedure for this UE takes ...
LteUeRrc()
create an RRC instance for use within an ue
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
std::vector< LteUeCmacSapProvider * > m_cmacSapProvider
UE CMac SAP provider.
virtual ~LteUeRrc()
Destructor.
uint16_t m_cellId
The CellId attribute.
EventId timer
The pending reporting event, scheduled at the end of the time-to-trigger.
void CancelLeavingTrigger(uint8_t measId)
Clear all the waiting triggers in m_leavingTriggerQueue which are associated with the given measureme...
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
bool m_hasReceivedMib
True if MIB was received for the current cell.
void DoRecvRrcConnectionReestablishmentReject(LteRrcSap::RrcConnectionReestablishmentReject msg)
Part of the RRC protocol.
uint8_t GetUlBandwidth() const
uint32_t m_dlEarfcn
Downlink carrier frequency.
QuantityConfig structure.
bool m_connectionPending
True if a connection request by upper layers is pending.
void DoStartCellSelection(uint32_t dlEarfcn)
Start cell selection function.
bool m_hasReceivedSib1
True if SIB1 was received for the current cell.
LteMacSapProvider * m_macSapProvider
MAC SAP provider.
uint32_t numberOfReportsSent
number of reports sent
uint8_t Bid2Drbid(uint8_t bid)
Bid 2 DR bid.
void(* ImsiCidRntiTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti)
TracedCallback signature for imsi, cellId and rnti events.
Parameters for LtePdcpSapUser::ReceivePdcpSdu.
LteUeCmacSapUser * GetLteUeCmacSapUser()
This function is overloaded to maintain backward compatibility.
static const Time UE_MEASUREMENT_REPORT_DELAY
Artificial delay of UE measurements procedure.
LteRrcSap::QuantityConfig quantityConfig
quantity config
store information on active data radio bearer instance
std::vector< LteUeCphySapProvider * > m_cphySapProvider
UE CPhy SAP provider.
void SetLteUeRrcSapUser(LteUeRrcSapUser *s)
set the RRC SAP this RRC should interact with
LteUeRrcSapUser * m_rrcSapUser
RRC SAP user.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndOkTrace
The HandoverEndOk trace source.
State m_state
The current UE RRC state.
Ptr< LteSignalingRadioBearerInfo > m_srb0
The Srb0 attribute.
ConcernedCells_t concernedCells
The list of cells responsible for this trigger.
TracedCallback< Ptr< LteUeRrc >, std::list< LteRrcSap::SCellToAddMod > > m_sCarrierConfiguredTrace
The SCarrierConfigured trace source.
RrcConnectionReestablishment structure.
Represents a measurement result from a certain cell.
void DisposeOldSrb1()
Dispose old SRB1.
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_handoverStartTrace
The HandoverStart trace source.
void DoRecvRrcConnectionReconfiguration(LteRrcSap::RrcConnectionReconfiguration msg)
Part of the RRC protocol.
void DoRecvRrcConnectionReestablishment(LteRrcSap::RrcConnectionReestablishment msg)
Part of the RRC protocol.
uint8_t m_dlBandwidth
Downlink bandwidth in RBs.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
TracedCallback< uint64_t, uint16_t, uint16_t > m_randomAccessErrorTrace
The RandomAccessError trace source.
Service Access Point (SAP) offered by the UE RRC to the UE CCM.
TracedCallback< uint64_t, uint16_t, uint16_t > m_sib2ReceivedTrace
The Sib2Received trace source.
void ConnectionTimeout()
Invoked after timer T300 expires, notifying upper layers that RRC connection establishment procedure ...
void EvaluateCellForSelection()
Performs cell selection evaluation to the current serving cell.
RrcConnectionReconfiguration structure.
virtual void DoInitialize(void)
Initialize() implementation.
std::map< uint16_t, MeasValues > m_storedMeasValues
Internal storage of the latest measurement results from all detected detected cells, indexed by the cell ID where the measurement was taken from.
void SetLteCcmRrcSapProvider(LteUeCcmRrcSapProvider *s)
set the Component Carrier Management SAP this RRC should interact with
Ptr< LteSignalingRadioBearerInfo > m_srb1
The Srb1 attribute.
void SetLteUeCmacSapProvider(LteUeCmacSapProvider *s)
set the CMAC SAP this RRC should interact with
bool m_useRlcSm
True if RLC SM is to be used, false if RLC UM/AM are to be used.
Template for the implementation of the LteAsSapProvider as a member of an owner class of type C to wh...
uint32_t m_csgWhiteList
List of CSG ID which this UE entity has access to.
Service Access Point (SAP) offered by the UE MAC to the UE RRC.
std::map< uint8_t, LteRrcSap::MeasIdToAddMod > measIdList
measure ID list
std::map< uint8_t, uint8_t > m_bid2DrbidMap
bid to DR bid map
void SetLteMacSapProvider(LteMacSapProvider *s)
set the MAC SAP provider.
TracedCallback< uint64_t, uint16_t > m_initialCellSelectionEndOkTrace
The InitialCellSelectionEndOk trace source.
RrcConnectionSetup structure.
std::list< LteRrcSap::SCellToAddMod > m_sCellToAddModList
Secondary carriers.
void SetLteUeCphySapProvider(LteUeCphySapProvider *s)
set the CPHY SAP this RRC should use to interact with the PHY
void SwitchToState(State s)
Switch the UE RRC to the given state.
TracedCallback< uint64_t, uint16_t > m_initialCellSelectionEndErrorTrace
The InitialCellSelectionEndError trace source.
VarMeasConfig m_varMeasConfig
Includes the accumulated configuration of the measurements to be performed by the UE...
std::map< uint8_t, std::list< PendingTrigger_t > > m_leavingTriggerQueue
List of triggers that were raised because leaving condition have been true, but are still delayed fro...
std::vector< LteUeCphySapUser * > m_cphySapUser
UE CPhy SAP user.
std::map< uint8_t, LteRrcSap::ReportConfigToAddMod > reportConfigList
report config list
Every class exported by the ns3 library is enclosed in the ns3 namespace.
RrcConnectionReject structure.
LteAsSapUser * m_asSapUser
AS SAP user.
Template for the implementation of the LteUeRrcSapProvider as a member of an owner class of type C to...
void DoNotifyRandomAccessSuccessful()
Notify random access successful function.
void SaveScellUeMeasurements(uint16_t cellId, double rsrp, double rsrq, bool useLayer3Filtering, uint16_t componentCarrierId)
keep the given measurement result as the latest measurement figures, to be utilised by UE RRC functio...
LteUeCcmRrcSapUser * m_ccmRrcSapUser
CCM RRC SAP user.
store information on active signaling radio bearer instance
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_sib1ReceivedTrace
The Sib1Received trace source.
double rsrq
Measured RSRQ in dB.
void DoSendData(Ptr< Packet > packet, uint8_t bid)
Send data function.
Service Access Point (SAP) offered by the UE MAC to the UE RRC.
void DoForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn)
Force camped on ENB function.
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
LtePdcpSpecificLtePdcpSapUser class.
RrcConnectionReestablishmentReject structure.
void DoRecvRrcConnectionRelease(LteRrcSap::RrcConnectionRelease msg)
Part of the RRC protocol.
double rsrp
Measured RSRP in dBm.
void VarMeasReportListErase(uint8_t measId, ConcernedCells_t leavingCells, bool reportOnLeave)
Remove some cells from an existing reporting entry in m_varMeasReportList.
LteUeCcmRrcSapUser * GetLteCcmRrcSapUser()
Get the Component Carrier Management SAP offered by this RRC.
LteUeCcmRrcSapProvider * m_ccmRrcSapProvider
Interface to the LteUeComponentCarrierManage instance.
uint8_t m_ulBandwidth
Uplink bandwidth in RBs.
LteUeCphySapUser * GetLteUeCphySapUser()
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionReconfigurationTrace
The ConnectionReconfiguration trace source.
Ptr< LteSignalingRadioBearerInfo > m_srb1Old
SRB1 configuration before RRC connection reconfiguration.
State
The states of the UE RRC entity.
void StartConnection()
Start connetion function.
void SaveUeMeasurements(uint16_t cellId, double rsrp, double rsrq, bool useLayer3Filtering)
Keep the given measurement result as the latest measurement figures, to be utilised by UE RRC functio...
Service Access Point (SAP) offered by the UE component carrier manager to the UE RRC...
friend class UeRrcMemberLteEnbCmacSapUser
allow UeRrcMemberLteEnbCmacSapUser class friend access
void DoSetCsgWhiteList(uint32_t csgId)
Set CSG white list function.
std::vector< LteUeCmacSapUser * > m_cmacSapUser
UE CMac SAP user.
void DoNotifyRandomAccessFailed()
Notify random access failed function.
An identifier for simulation events.
void DoCompleteSetup(LteUeRrcSapProvider::CompleteSetupParameters params)
Part of the RRC protocol.
LteUeRrcSapProvider * m_rrcSapProvider
RRC SAP provider.
Service Access Point (SAP) offered by the PDCP entity to the RRC entity See 3GPP 36.323 Packet Data Convergence Protocol (PDCP) specification.
void DoConnect()
Connect function.
void(* StateTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti, State oldState, State newState)
TracedCallback signature for state transition events.
void ApplyRadioResourceConfigDedicated(LteRrcSap::RadioResourceConfigDedicated rrcd)
Apply radio resource config dedicated.
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionEstablishedTrace
The ConnectionEstablished trace source.
std::map< uint8_t, VarMeasReport > m_varMeasReportList
The list of active reporting entries, indexed by the measurement identity which triggered the reporti...
LteAsSapProvider * m_asSapProvider
AS SAP provider.
TracedCallback< uint64_t, uint16_t, uint16_t, uint16_t > m_mibReceivedTrace
The MibReceived trace source.
uint16_t m_rnti
The C-RNTI attribute.
uint64_t m_imsi
The unique UE identifier.
void ApplyRadioResourceConfigDedicatedSecondaryCarrier(LteRrcSap::NonCriticalExtensionConfiguration nonCec)
Apply radio resource config dedicated secondary carrier.
UeMeasurementsParameters structure.
std::set< uint16_t > m_acceptableCell
List of cell ID of acceptable cells for cell selection that have been detected.
LteAsSapProvider * GetAsSapProvider()
Service Access Point (SAP) offered by the MAC to the RLC See Femto Forum MAC Scheduler Interface Spec...
void DoReportUeMeasurements(LteUeCphySapUser::UeMeasurementsParameters params)
Report UE measurements function.
TracedCallback< uint64_t, uint16_t, uint16_t > m_connectionTimeoutTrace
The ConnectionTimeout trace source.
Represents a single measurement reporting entry., which includes information about a measurement for ...
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
CompleteSetupParameters structure.
TracedCallback< uint64_t, uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
void SendMeasurementReport(uint8_t measId)
Produce a proper measurement report from the given measurement identity's reporting entry in m_varMea...
uint32_t GetDlEarfcn() const
A base class which provides memory management and object aggregation.
void SynchronizeToStrongestCell()
Go through the list of measurement results, choose the one with the strongest RSRP, and tell PHY to synchronize to it.
void InitializeSap(void)
Initiaize SAP.
void DoReceivePdcpSdu(LtePdcpSapUser::ReceivePdcpSduParameters params)
Receive PDCP SDU function.
Part of the RRC protocol.
NonCriticalExtensionConfiguration structure.
uint32_t GetUlEarfcn() const
RrcConnectionRelease structure.
PdschConfigDedicated structure.
LteUeRrcSapProvider * GetLteUeRrcSapProvider()
std::list< uint16_t > ConcernedCells_t
List of cell IDs which are responsible for a certain trigger.
std::map< uint16_t, std::map< uint8_t, MeasValues > > m_storedMeasValuesPerCarrier
Stored measure values per carrier.
Time m_t300
The T300 attribute.
void VarMeasReportListAdd(uint8_t measId, ConcernedCells_t enteringCells)
Compose a new reporting entry of the given measurement identity, insert it into m_varMeasReportList, and set it up for submission to eNodeB.
void DoDisconnect()
Disconnect function.
TracedCallback< uint64_t, uint16_t, uint16_t > m_randomAccessSuccessfulTrace
The RandomAccessSuccessful trace source.
std::map< uint8_t, std::list< PendingTrigger_t > > m_enteringTriggerQueue
List of triggers that were raised because entering condition have been true, but are still delayed fr...
This abstract base class defines the API to interact with the Radio Link Control (LTE_RLC) in LTE...
a unique identifier for an interface.
void(* CellSelectionTracedCallback)(uint64_t imsi, uint16_t cellId)
TracedCallback signature for imsi, cellId and rnti events.
void SetImsi(uint64_t imsi)
uint8_t m_lastRrcTransactionIdentifier
last RRC transaction identifier
void VarMeasReportListClear(uint8_t measId)
Remove the reporting entry of the given measurement identity from m_varMeasReportList.
void LeaveConnectedMode()
Leave connected mode.
uint32_t m_ulEarfcn
Uplink carrier frequency.
TracedCallback< uint64_t, uint16_t, uint16_t > m_handoverEndErrorTrace
The HandoverEndError trace source.
LteRrcSap::SystemInformationBlockType1 m_lastSib1
Stored content of the last SIB1 received.
RadioResourceConfigDedicated structure.
uint16_t GetCellId() const