#include <lte-enb-rrc.h>
Public Types | |
enum | State { INITIAL_RANDOM_ACCESS = 0, CONNECTION_SETUP, CONNECTION_REJECTED, CONNECTED_NORMALLY, CONNECTION_RECONFIGURATION, CONNECTION_REESTABLISHMENT, HANDOVER_PREPARATION, HANDOVER_JOINING, HANDOVER_PATH_SWITCH, HANDOVER_LEAVING, NUM_STATES } |
Public Member Functions | |
UeManager (Ptr< LteEnbRrc > rrc, uint16_t rnti, State s) | |
void | CmacUeConfigUpdateInd (LteEnbCmacSapUser::UeConfig cmacParams) |
void | CompleteSetupUe (LteEnbRrcSapProvider::CompleteSetupUeParameters params) |
void | DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params) |
std::vector < EpcX2Sap::ErabToBeSetupItem > | GetErabList () |
uint64_t | GetImsi (void) |
LteRrcSap::RadioResourceConfigDedicated | GetRadioResourceConfigForHandoverPreparationInfo () |
uint16_t | GetRnti (void) |
LteRrcSap::RrcConnectionReconfiguration | GetRrcConnectionReconfigurationForHandover () |
uint16_t | GetSrsConfigurationIndex (void) |
State | GetState () |
void | PrepareHandover (uint16_t cellId) |
void | RecordDataRadioBearersToBeStarted () |
void | RecvHandoverPreparationFailure (uint16_t cellId) |
void | RecvHandoverRequestAck (EpcX2SapUser::HandoverRequestAckParams params) |
void | RecvMeasurementReport (LteRrcSap::MeasurementReport msg) |
void | RecvRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionReconfigurationCompleted msg) |
void | RecvRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionReestablishmentComplete msg) |
void | RecvRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionReestablishmentRequest msg) |
void | RecvRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg) |
void | RecvRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupCompleted msg) |
void | RecvSnStatusTransfer (EpcX2SapUser::SnStatusTransferParams params) |
void | ReleaseDataRadioBearer (uint8_t drbid) |
void | ScheduleRrcConnectionReconfiguration () |
void | SendData (uint8_t bid, Ptr< Packet > p) |
void | SendUeContextRelease () |
void | SetImsi (uint64_t imsi) |
void | SetSource (uint16_t sourceCellId, uint16_t sourceX2apId) |
void | SetSrsConfigurationIndex (uint16_t srsConfIndex) |
void | SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress) |
void | StartDataRadioBearers () |
Public Member Functions inherited from ns3::Object | |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Protected Member Functions | |
virtual void | DoDispose () |
virtual void | DoInitialize () |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
Private Member Functions | |
uint8_t | AddDataRadioBearerInfo (Ptr< LteDataRadioBearerInfo > radioBearerInfo) |
uint8_t | Bid2Drbid (uint8_t bid) |
uint8_t | Bid2Lcid (uint8_t bid) |
LteRrcSap::RadioResourceConfigDedicated | BuildRadioResourceConfigDedicated () |
LteRrcSap::RrcConnectionReconfiguration | BuildRrcConnectionReconfiguration () |
uint8_t | Drbid2Bid (uint8_t drbid) |
uint8_t | Drbid2Lcid (uint8_t drbid) |
Ptr< LteDataRadioBearerInfo > | GetDataRadioBearerInfo (uint8_t drbid) |
uint8_t | GetNewRrcTransactionIdentifier () |
uint8_t | Lcid2Bid (uint8_t lcid) |
uint8_t | Lcid2Drbid (uint8_t lcid) |
void | RemoveDataRadioBearerInfo (uint8_t drbid) |
void | SwitchToState (State s) |
Private Attributes | |
EventId | m_connectionTimeout |
std::map< uint8_t, Ptr < LteDataRadioBearerInfo > > | m_drbMap |
LtePdcpSapUser * | m_drbPdcpSapUser |
std::list< uint8_t > | m_drbsToBeStarted |
uint64_t | m_imsi |
uint8_t | m_lastAllocatedDrbid |
uint8_t | m_lastRrcTransactionIdentifier |
bool | m_needTransmissionModeConfiguration |
bool | m_pendingRrcConnectionReconfiguration |
LteRrcSap::PhysicalConfigDedicated | m_physicalConfigDedicated |
uint16_t | m_rnti |
Ptr< LteEnbRrc > | m_rrc |
uint16_t | m_sourceCellId |
uint16_t | m_sourceX2apId |
Ptr< LteSignalingRadioBearerInfo > | m_srb0 |
Ptr< LteSignalingRadioBearerInfo > | m_srb1 |
State | m_state |
TracedCallback< uint64_t, uint16_t, uint16_t, State, State > | m_stateTransitionTrace |
uint16_t | m_targetCellId |
Friends | |
class | LtePdcpSpecificLtePdcpSapUser< UeManager > |
Manages all the radio bearer information possessed by the ENB RRC for a single UE
ns3::UeManager is accessible through the following paths with Config::Set and Config::Connect:
Definition at line 57 of file lte-enb-rrc.h.
The state of the UeManager at the eNB RRC
Definition at line 68 of file lte-enb-rrc.h.
UeManager constructor
rrc | pointer to the LteEnbRrc holding this UeManager |
rnti | RNTI of the UE |
s | initial state of the UeManager |
Definition at line 133 of file lte-enb-rrc.cc.
References NS_LOG_FUNCTION.
|
private |
Add a new LteDataRadioBearerInfo structure to the UeManager
radioBearerInfo |
Definition at line 979 of file lte-enb-rrc.cc.
References NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by SetupDataRadioBearer().
|
private |
bid | an EPS Bearer Identifier |
Definition at line 1104 of file lte-enb-rrc.cc.
Referenced by SendData().
|
private |
bid | an EPS Bearer Identifier |
Definition at line 1092 of file lte-enb-rrc.cc.
Referenced by SendData().
|
private |
Definition at line 1036 of file lte-enb-rrc.cc.
Referenced by BuildRrcConnectionReconfiguration(), and GetRadioResourceConfigForHandoverPreparationInfo().
|
private |
Definition at line 1024 of file lte-enb-rrc.cc.
References BuildRadioResourceConfigDedicated(), and GetNewRrcTransactionIdentifier().
Referenced by GetRrcConnectionReconfigurationForHandover(), and ScheduleRrcConnectionReconfiguration().
|
protectedvirtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
Definition at line 266 of file lte-enb-rrc.cc.
|
protectedvirtual |
This method is called only once by Object::Initialize. If the user calls Object::Initialize multiple times, DoInitialize is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.
Reimplemented from ns3::Object.
Definition at line 149 of file lte-enb-rrc.cc.
References ns3::LteEnbRrc::ConnectionTimeout(), ns3::LteEnbCmacSapProvider::LcInfo::gbrDl, ns3::LteEnbCmacSapProvider::LcInfo::gbrUl, ns3::LteEnbCmacSapProvider::LcInfo::isGbr, ns3::LteEnbCmacSapProvider::LcInfo::lcGroup, ns3::LteEnbCmacSapProvider::LcInfo::lcId, ns3::LteEnbCmacSapProvider::UeConfig::m_rnti, ns3::LteEnbCmacSapProvider::UeConfig::m_transmissionMode, ns3::LteEnbCmacSapProvider::LcInfo::mbrDl, ns3::LteEnbCmacSapProvider::LcInfo::mbrUl, ns3::MilliSeconds(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::LteEnbCmacSapProvider::LcInfo::qci, ns3::LteEnbCmacSapProvider::LcInfo::rnti, and ns3::Simulator::Schedule().
|
private |
drbid | Data Radio Bearer Id |
Definition at line 1098 of file lte-enb-rrc.cc.
Referenced by SetupDataRadioBearer().
|
private |
drbid | a Data Radio Bearer Id |
Definition at line 1080 of file lte-enb-rrc.cc.
Referenced by ReleaseDataRadioBearer(), and SetupDataRadioBearer().
|
private |
drbid | the Data Radio Bearer id |
Definition at line 1003 of file lte-enb-rrc.cc.
References NS_ABORT_IF, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by SendData().
std::vector< EpcX2Sap::ErabToBeSetupItem > ns3::UeManager::GetErabList | ( | ) |
Definition at line 668 of file lte-enb-rrc.cc.
References NS_LOG_FUNCTION.
Referenced by PrepareHandover().
uint64_t ns3::UeManager::GetImsi | ( | void | ) |
Definition at line 942 of file lte-enb-rrc.cc.
|
private |
Definition at line 1067 of file lte-enb-rrc.cc.
Referenced by BuildRrcConnectionReconfiguration().
LteRrcSap::RadioResourceConfigDedicated ns3::UeManager::GetRadioResourceConfigForHandoverPreparationInfo | ( | ) |
Definition at line 605 of file lte-enb-rrc.cc.
References BuildRadioResourceConfigDedicated(), and NS_LOG_FUNCTION.
Referenced by PrepareHandover().
uint16_t ns3::UeManager::GetRnti | ( | void | ) |
Definition at line 936 of file lte-enb-rrc.cc.
LteRrcSap::RrcConnectionReconfiguration ns3::UeManager::GetRrcConnectionReconfigurationForHandover | ( | ) |
Definition at line 612 of file lte-enb-rrc.cc.
References BuildRrcConnectionReconfiguration(), and NS_LOG_FUNCTION.
uint16_t ns3::UeManager::GetSrsConfigurationIndex | ( | void | ) |
Definition at line 948 of file lte-enb-rrc.cc.
UeManager::State ns3::UeManager::GetState | ( | void | ) |
Definition at line 973 of file lte-enb-rrc.cc.
|
private |
lcid | a Logical Channel Identifier |
Definition at line 1085 of file lte-enb-rrc.cc.
References NS_ASSERT.
|
private |
lcid | a Logical Channel Identifier |
Definition at line 1073 of file lte-enb-rrc.cc.
References NS_ASSERT.
void ns3::UeManager::PrepareHandover | ( | uint16_t | cellId | ) |
Start the handover preparation and send the handover request
cellId | id of the target cell |
Definition at line 502 of file lte-enb-rrc.cc.
References GetErabList(), GetRadioResourceConfigForHandoverPreparationInfo(), NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, and SwitchToState().
void ns3::UeManager::RecordDataRadioBearersToBeStarted | ( | ) |
Start all configured data radio bearers. It is safe to call this method if any bearer had been already started previously.
Definition at line 411 of file lte-enb-rrc.cc.
References NS_LOG_FUNCTION.
Referenced by ScheduleRrcConnectionReconfiguration().
void ns3::UeManager::RecvHandoverPreparationFailure | ( | uint16_t | cellId | ) |
Take the necessary actions in response to the reception of an X2 HO preparation failure message
cellId | id of the target cell |
Definition at line 711 of file lte-enb-rrc.cc.
References NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, and SwitchToState().
void ns3::UeManager::RecvHandoverRequestAck | ( | EpcX2SapUser::HandoverRequestAckParams | params | ) |
take the necessary actions in response to the reception of an X2 HANDOVER REQUEST ACK message
params |
Definition at line 561 of file lte-enb-rrc.cc.
References NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::LtePdcp::Status::rxSn, SwitchToState(), and ns3::LtePdcp::Status::txSn.
void ns3::UeManager::RecvSnStatusTransfer | ( | EpcX2SapUser::SnStatusTransferParams | params | ) |
Take the necessary actions in response to the reception of an X2 SN STATUS TRANSFER message
params | the SN STATUS |
Definition at line 729 of file lte-enb-rrc.cc.
References NS_LOG_FUNCTION.
void ns3::UeManager::ReleaseDataRadioBearer | ( | uint8_t | drbid | ) |
Release a given radio bearer
drbid | the data radio bearer id of the bearer to be released |
Definition at line 443 of file lte-enb-rrc.cc.
References Drbid2Lcid(), NS_ASSERT_MSG, and NS_LOG_FUNCTION.
|
private |
remove the LteDataRadioBearerInfo corresponding to a bearer being released
drbid | the Data Radio Bearer id |
Definition at line 1014 of file lte-enb-rrc.cc.
References NS_ASSERT_MSG, and NS_LOG_FUNCTION.
void ns3::UeManager::ScheduleRrcConnectionReconfiguration | ( | ) |
schedule an RRC Connection Reconfiguration procedure with the UE
Definition at line 469 of file lte-enb-rrc.cc.
References BuildRrcConnectionReconfiguration(), NS_FATAL_ERROR, NS_LOG_FUNCTION, RecordDataRadioBearersToBeStarted(), and SwitchToState().
Referenced by SetSrsConfigurationIndex(), SetupDataRadioBearer(), and SwitchToState().
Send a data packet over the appropriate Data Radio Bearer
bid | the corresponding EPS Bearer ID |
p | the packet |
Definition at line 619 of file lte-enb-rrc.cc.
References Bid2Drbid(), Bid2Lcid(), GetDataRadioBearerInfo(), ns3::LtePdcpSapProvider::TransmitPdcpSduParameters::lcid, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_LOGIC, NS_LOG_WARN, ns3::LtePdcpSapProvider::TransmitPdcpSduParameters::pdcpSdu, ns3::LtePdcpSapProvider::TransmitPdcpSduParameters::rnti, and ns3::LtePdcpSapProvider::TransmitPdcpSdu().
void ns3::UeManager::SendUeContextRelease | ( | ) |
send the UE CONTEXT RELEASE X2 message to the source eNB, thus successfully terminating an X2 handover procedure
Definition at line 688 of file lte-enb-rrc.cc.
References NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, and SwitchToState().
void ns3::UeManager::SetImsi | ( | uint64_t | imsi | ) |
void ns3::UeManager::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 handover procedure
sourceCellId | |
sourceX2apId |
Definition at line 309 of file lte-enb-rrc.cc.
void ns3::UeManager::SetSrsConfigurationIndex | ( | uint16_t | srsConfIndex | ) |
Set the SRS configuration index and do the necessary reconfiguration
srsConfIndex |
Definition at line 954 of file lte-enb-rrc.cc.
References NS_LOG_FUNCTION, and ScheduleRrcConnectionReconfiguration().
void ns3::UeManager::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 signaling with the UE
bearer | the QoS characteristics of the bearer |
bearerId | the EPS bearer identifier |
gtpTeid | S1-bearer GTP tunnel endpoint identifier, see 36.423 9.2.1 |
transportLayerAddress | IP Address of the SGW, see 36.423 9.2.1 |
Definition at line 322 of file lte-enb-rrc.cc.
References AddDataRadioBearerInfo(), ns3::ObjectFactory::Create(), Drbid2Bid(), Drbid2Lcid(), ns3::GbrQosInformation::gbrDl, ns3::LteEnbCmacSapProvider::LcInfo::gbrDl, ns3::GbrQosInformation::gbrUl, ns3::LteEnbCmacSapProvider::LcInfo::gbrUl, ns3::Object::GetObject(), ns3::LteEnbCmacSapProvider::LcInfo::isGbr, ns3::EpsBearer::IsGbr(), ns3::LteEnbCmacSapProvider::LcInfo::lcGroup, ns3::LteEnbCmacSapProvider::LcInfo::lcId, ns3::GbrQosInformation::mbrDl, ns3::LteEnbCmacSapProvider::LcInfo::mbrDl, ns3::GbrQosInformation::mbrUl, ns3::LteEnbCmacSapProvider::LcInfo::mbrUl, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::LteEnbCmacSapProvider::LcInfo::qci, ns3::LteEnbCmacSapProvider::LcInfo::rnti, ScheduleRrcConnectionReconfiguration(), and ns3::ObjectFactory::SetTypeId().
void ns3::UeManager::StartDataRadioBearers | ( | ) |
Start the data radio bearers that have been previously recorded to be started using RecordDataRadioBearersToBeStarted()
Definition at line 423 of file lte-enb-rrc.cc.
References NS_ASSERT, and NS_LOG_FUNCTION.
|
private |
Switch the UeManager to the given state
s | the given state |
Definition at line 1111 of file lte-enb-rrc.cc.
References NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, and ScheduleRrcConnectionReconfiguration().
Referenced by PrepareHandover(), RecvHandoverPreparationFailure(), RecvHandoverRequestAck(), ScheduleRrcConnectionReconfiguration(), and SendUeContextRelease().