A Discrete-Event Network Simulator
API
ns3::EpcX2 Class Reference

This entity is installed inside an eNB and provides the functionality for the X2 interface. More...

#include "epc-x2.h"

+ Inheritance diagram for ns3::EpcX2:
+ Collaboration diagram for ns3::EpcX2:

Public Member Functions

 EpcX2 ()
 Constructor. More...
 
virtual ~EpcX2 (void)
 Destructor. More...
 
void AddX2Interface (uint16_t enb1CellId, Ipv4Address enb1X2Address, std::vector< uint16_t > enb2CellIds, Ipv4Address enb2X2Address)
 Add an X2 interface to this EPC X2 entity. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
EpcX2SapProviderGetEpcX2SapProvider ()
 
void RecvFromX2cSocket (Ptr< Socket > socket)
 Method to be assigned to the recv callback of the X2-C (X2 Control Plane) socket. More...
 
void RecvFromX2uSocket (Ptr< Socket > socket)
 Method to be assigned to the recv callback of the X2-U (X2 User Plane) socket. More...
 
void SetEpcX2SapUser (EpcX2SapUser *s)
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Protected Member Functions

virtual void DoSendHandoverPreparationFailure (EpcX2SapProvider::HandoverPreparationFailureParams params)
 Send handover preparation failure function. More...
 
virtual void DoSendHandoverRequest (EpcX2SapProvider::HandoverRequestParams params)
 Send handover request function. More...
 
virtual void DoSendHandoverRequestAck (EpcX2SapProvider::HandoverRequestAckParams params)
 Send handover request ack function. More...
 
virtual void DoSendLoadInformation (EpcX2SapProvider::LoadInformationParams params)
 Send load information function. More...
 
virtual void DoSendResourceStatusUpdate (EpcX2SapProvider::ResourceStatusUpdateParams params)
 Send resource status update function. More...
 
virtual void DoSendSnStatusTransfer (EpcX2SapProvider::SnStatusTransferParams params)
 Send SN status transfer function. More...
 
virtual void DoSendUeContextRelease (EpcX2SapProvider::UeContextReleaseParams params)
 Send UE context release function. More...
 
virtual void DoSendUeData (EpcX2SapProvider::UeDataParams params)
 Send UE data function. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Protected Attributes

EpcX2SapProviderm_x2SapProvider
 X2 SAP provider. More...
 
EpcX2SapUserm_x2SapUser
 X2 SAP user. More...
 

Private Attributes

uint16_t m_x2cUdpPort
 UDP ports to be used for the X2-C interface. More...
 
std::map< Ptr< Socket >, Ptr< X2CellInfo > > m_x2InterfaceCellIds
 Map the localSocket (the one receiving the X2 message) to the corresponding (sourceCellId, targetCellId) associated with the X2 interface. More...
 
std::map< uint16_t, Ptr< X2IfaceInfo > > m_x2InterfaceSockets
 Map the targetCellId to the corresponding (sourceSocket, remoteIpAddr) to be used to send the X2 message. More...
 
uint16_t m_x2uUdpPort
 UDP ports to be used for the X2-U interface. More...
 

Friends

class EpcX2SpecificEpcX2SapProvider< EpcX2 >
 allow EpcX2SpecificEpcX2SapProvider<EpcX2> class friend access More...
 

Additional Inherited Members

Detailed Description

This entity is installed inside an eNB and provides the functionality for the X2 interface.

Introspection did not find any typical Config paths.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 152 bytes (on a 64-bit architecture).

Definition at line 99 of file epc-x2.h.

Constructor & Destructor Documentation

◆ EpcX2()

ns3::EpcX2::EpcX2 ( )

Constructor.

Definition at line 82 of file epc-x2.cc.

References EpcX2SpecificEpcX2SapProvider< EpcX2 >, m_x2SapProvider, and NS_LOG_FUNCTION.

◆ ~EpcX2()

ns3::EpcX2::~EpcX2 ( void  )
virtual

Destructor.

Definition at line 91 of file epc-x2.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddX2Interface()

void ns3::EpcX2::AddX2Interface ( uint16_t  enb1CellId,
Ipv4Address  enb1X2Address,
std::vector< uint16_t >  enb2CellIds,
Ipv4Address  enb2X2Address 
)

Add an X2 interface to this EPC X2 entity.

Parameters
enb1CellIdthe cell ID of the current eNodeB
enb1X2Addressthe address of the current eNodeB
enb2CellIdsthe cell IDs of the neighbouring eNodeB
enb2X2Addressthe address of the neighbouring eNodeB

Definition at line 131 of file epc-x2.cc.

References ns3::Socket::Bind(), ns3::Socket::CreateSocket(), ns3::TypeId::LookupByName(), m_x2cUdpPort, m_x2InterfaceCellIds, m_x2InterfaceSockets, m_x2uUdpPort, ns3::MakeCallback(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, RecvFromX2cSocket(), RecvFromX2uSocket(), and ns3::Socket::SetRecvCallback().

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::EpcX2::DoDispose ( void  )
virtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden 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 97 of file epc-x2.cc.

References m_x2InterfaceCellIds, m_x2InterfaceSockets, m_x2SapProvider, and NS_LOG_FUNCTION.

◆ DoSendHandoverPreparationFailure()

◆ DoSendHandoverRequest()

void ns3::EpcX2::DoSendHandoverRequest ( EpcX2SapProvider::HandoverRequestParams  params)
protectedvirtual

Send handover request function.

Parameters
paramsthe send handover request parameters

Definition at line 404 of file epc-x2.cc.

References ns3::Packet::AddHeader(), ns3::EpcX2Sap::HandoverRequestParams::bearers, ns3::EpcX2Sap::HandoverRequestParams::cause, ns3::EpcX2HandoverRequestHeader::GetLengthOfIes(), ns3::EpcX2HandoverRequestHeader::GetNumberOfIes(), ns3::Packet::GetSize(), ns3::EpcX2Header::HandoverPreparation, ns3::EpcX2Header::InitiatingMessage, m_x2cUdpPort, m_x2InterfaceSockets, ns3::EpcX2Sap::HandoverRequestParams::mmeUeS1apId, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, ns3::EpcX2Sap::HandoverRequestParams::oldEnbUeX2apId, ns3::EpcX2Sap::HandoverRequestParams::rrcContext, ns3::Socket::SendTo(), ns3::EpcX2HandoverRequestHeader::SetBearers(), ns3::EpcX2HandoverRequestHeader::SetCause(), ns3::EpcX2Header::SetLengthOfIes(), ns3::EpcX2Header::SetMessageType(), ns3::EpcX2HandoverRequestHeader::SetMmeUeS1apId(), ns3::EpcX2Header::SetNumberOfIes(), ns3::EpcX2HandoverRequestHeader::SetOldEnbUeX2apId(), ns3::EpcX2Header::SetProcedureCode(), ns3::EpcX2HandoverRequestHeader::SetTargetCellId(), ns3::EpcX2HandoverRequestHeader::SetUeAggregateMaxBitRateDownlink(), ns3::EpcX2HandoverRequestHeader::SetUeAggregateMaxBitRateUplink(), ns3::EpcX2Sap::HandoverRequestParams::sourceCellId, ns3::EpcX2Sap::HandoverRequestParams::targetCellId, ns3::EpcX2Sap::HandoverRequestParams::ueAggregateMaxBitRateDownlink, and ns3::EpcX2Sap::HandoverRequestParams::ueAggregateMaxBitRateUplink.

+ Here is the call graph for this function:

◆ DoSendHandoverRequestAck()

◆ DoSendLoadInformation()

◆ DoSendResourceStatusUpdate()

◆ DoSendSnStatusTransfer()

◆ DoSendUeContextRelease()

◆ DoSendUeData()

◆ GetEpcX2SapProvider()

EpcX2SapProvider * ns3::EpcX2::GetEpcX2SapProvider ( )
Returns
the X2 SAP Provider interface offered by this EPC X2 entity

Definition at line 123 of file epc-x2.cc.

References m_x2SapProvider, and NS_LOG_FUNCTION.

◆ GetTypeId()

TypeId ns3::EpcX2::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 107 of file epc-x2.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ RecvFromX2cSocket()

void ns3::EpcX2::RecvFromX2cSocket ( Ptr< Socket socket)

Method to be assigned to the recv callback of the X2-C (X2 Control Plane) socket.

It is called when the eNB receives a packet from the peer eNB of the X2-C interface

Parameters
socketsocket of the X2-C interface

Definition at line 174 of file epc-x2.cc.

References ns3::EpcX2Sap::HandoverRequestAckParams::admittedBearers, ns3::EpcX2Sap::HandoverRequestParams::bearers, ns3::EpcX2Sap::HandoverRequestParams::cause, ns3::EpcX2Sap::HandoverPreparationFailureParams::cause, ns3::EpcX2Sap::LoadInformationParams::cellInformationList, ns3::EpcX2Sap::ResourceStatusUpdateParams::cellMeasurementResultList, ns3::EpcX2Sap::HandoverPreparationFailureParams::criticalityDiagnostics, ns3::EpcX2Sap::ResourceStatusUpdateParams::enb1MeasurementId, ns3::EpcX2Sap::ResourceStatusUpdateParams::enb2MeasurementId, ns3::EpcX2Sap::SnStatusTransferParams::erabsSubjectToStatusTransferList, ns3::EpcX2HandoverRequestAckHeader::GetAdmittedBearers(), ns3::EpcX2HandoverRequestHeader::GetBearers(), ns3::EpcX2HandoverRequestHeader::GetCause(), ns3::EpcX2HandoverPreparationFailureHeader::GetCause(), ns3::EpcX2LoadInformationHeader::GetCellInformationList(), ns3::EpcX2ResourceStatusUpdateHeader::GetCellMeasurementResultList(), ns3::EpcX2HandoverPreparationFailureHeader::GetCriticalityDiagnostics(), ns3::EpcX2ResourceStatusUpdateHeader::GetEnb1MeasurementId(), ns3::EpcX2ResourceStatusUpdateHeader::GetEnb2MeasurementId(), ns3::EpcX2SnStatusTransferHeader::GetErabsSubjectToStatusTransferList(), ns3::EpcX2Header::GetMessageType(), ns3::EpcX2HandoverRequestHeader::GetMmeUeS1apId(), ns3::EpcX2HandoverRequestAckHeader::GetNewEnbUeX2apId(), ns3::EpcX2SnStatusTransferHeader::GetNewEnbUeX2apId(), ns3::EpcX2UeContextReleaseHeader::GetNewEnbUeX2apId(), ns3::EpcX2HandoverRequestAckHeader::GetNotAdmittedBearers(), ns3::EpcX2HandoverRequestHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverRequestAckHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverPreparationFailureHeader::GetOldEnbUeX2apId(), ns3::EpcX2SnStatusTransferHeader::GetOldEnbUeX2apId(), ns3::EpcX2UeContextReleaseHeader::GetOldEnbUeX2apId(), ns3::EpcX2Header::GetProcedureCode(), ns3::Packet::GetSize(), ns3::EpcX2HandoverRequestHeader::GetTargetCellId(), ns3::EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateDownlink(), ns3::EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateUplink(), ns3::EpcX2Header::HandoverPreparation, ns3::EpcX2Header::InitiatingMessage, ns3::EpcX2Header::LoadIndication, m_x2InterfaceCellIds, m_x2SapUser, ns3::EpcX2Sap::HandoverRequestParams::mmeUeS1apId, ns3::EpcX2Sap::HandoverRequestAckParams::newEnbUeX2apId, ns3::EpcX2Sap::SnStatusTransferParams::newEnbUeX2apId, ns3::EpcX2Sap::UeContextReleaseParams::newEnbUeX2apId, ns3::EpcX2Sap::HandoverRequestAckParams::notAdmittedBearers, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, ns3::EpcX2Sap::HandoverRequestParams::oldEnbUeX2apId, ns3::EpcX2Sap::HandoverRequestAckParams::oldEnbUeX2apId, ns3::EpcX2Sap::HandoverPreparationFailureParams::oldEnbUeX2apId, ns3::EpcX2Sap::SnStatusTransferParams::oldEnbUeX2apId, ns3::EpcX2Sap::UeContextReleaseParams::oldEnbUeX2apId, ns3::Socket::Recv(), ns3::EpcX2SapUser::RecvHandoverPreparationFailure(), ns3::EpcX2SapUser::RecvHandoverRequest(), ns3::EpcX2SapUser::RecvHandoverRequestAck(), ns3::EpcX2SapUser::RecvLoadInformation(), ns3::EpcX2SapUser::RecvResourceStatusUpdate(), ns3::EpcX2SapUser::RecvSnStatusTransfer(), ns3::EpcX2SapUser::RecvUeContextRelease(), ns3::Packet::RemoveHeader(), ns3::EpcX2Header::ResourceStatusReporting, ns3::EpcX2Sap::HandoverRequestParams::rrcContext, ns3::EpcX2Sap::HandoverRequestAckParams::rrcContext, ns3::EpcX2Header::SnStatusTransfer, ns3::EpcX2Sap::HandoverRequestParams::sourceCellId, ns3::EpcX2Sap::HandoverRequestAckParams::sourceCellId, ns3::EpcX2Sap::HandoverPreparationFailureParams::sourceCellId, ns3::EpcX2Sap::SnStatusTransferParams::sourceCellId, ns3::EpcX2Header::SuccessfulOutcome, ns3::EpcX2Sap::HandoverRequestParams::targetCellId, ns3::EpcX2Sap::HandoverRequestAckParams::targetCellId, ns3::EpcX2Sap::HandoverPreparationFailureParams::targetCellId, ns3::EpcX2Sap::SnStatusTransferParams::targetCellId, ns3::EpcX2Sap::ResourceStatusUpdateParams::targetCellId, ns3::EpcX2Sap::HandoverRequestParams::ueAggregateMaxBitRateDownlink, ns3::EpcX2Sap::HandoverRequestParams::ueAggregateMaxBitRateUplink, and ns3::EpcX2Header::UeContextRelease.

Referenced by AddX2Interface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RecvFromX2uSocket()

void ns3::EpcX2::RecvFromX2uSocket ( Ptr< Socket socket)

Method to be assigned to the recv callback of the X2-U (X2 User Plane) socket.

It is called when the eNB receives a packet from the peer eNB of the X2-U interface

Parameters
socketsocket of the X2-U interface

Definition at line 373 of file epc-x2.cc.

References ns3::Packet::GetSize(), ns3::GtpuHeader::GetTeid(), ns3::EpcX2Sap::UeDataParams::gtpTeid, m_x2InterfaceCellIds, m_x2SapUser, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Socket::Recv(), ns3::EpcX2SapUser::RecvUeData(), ns3::Packet::RemoveHeader(), ns3::EpcX2Sap::UeDataParams::sourceCellId, ns3::EpcX2Sap::UeDataParams::targetCellId, and ns3::EpcX2Sap::UeDataParams::ueData.

Referenced by AddX2Interface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetEpcX2SapUser()

void ns3::EpcX2::SetEpcX2SapUser ( EpcX2SapUser s)
Parameters
sthe X2 SAP User to be used by this EPC X2 entity

Definition at line 116 of file epc-x2.cc.

References m_x2SapUser, and NS_LOG_FUNCTION.

Friends And Related Function Documentation

◆ EpcX2SpecificEpcX2SapProvider< EpcX2 >

friend class EpcX2SpecificEpcX2SapProvider< EpcX2 >
friend

allow EpcX2SpecificEpcX2SapProvider<EpcX2> class friend access

Definition at line 90 of file epc-x2.h.

Referenced by EpcX2().

Member Data Documentation

◆ m_x2cUdpPort

uint16_t ns3::EpcX2::m_x2cUdpPort
private

◆ m_x2InterfaceCellIds

std::map< Ptr<Socket>, Ptr<X2CellInfo> > ns3::EpcX2::m_x2InterfaceCellIds
private

Map the localSocket (the one receiving the X2 message) to the corresponding (sourceCellId, targetCellId) associated with the X2 interface.

Definition at line 222 of file epc-x2.h.

Referenced by AddX2Interface(), DoDispose(), RecvFromX2cSocket(), and RecvFromX2uSocket().

◆ m_x2InterfaceSockets

std::map< uint16_t, Ptr<X2IfaceInfo> > ns3::EpcX2::m_x2InterfaceSockets
private

Map the targetCellId to the corresponding (sourceSocket, remoteIpAddr) to be used to send the X2 message.

Definition at line 216 of file epc-x2.h.

Referenced by AddX2Interface(), DoDispose(), DoSendHandoverPreparationFailure(), DoSendHandoverRequest(), DoSendHandoverRequestAck(), DoSendLoadInformation(), DoSendResourceStatusUpdate(), DoSendSnStatusTransfer(), DoSendUeContextRelease(), and DoSendUeData().

◆ m_x2SapProvider

EpcX2SapProvider* ns3::EpcX2::m_x2SapProvider
protected

X2 SAP provider.

Definition at line 207 of file epc-x2.h.

Referenced by EpcX2(), DoDispose(), and GetEpcX2SapProvider().

◆ m_x2SapUser

EpcX2SapUser* ns3::EpcX2::m_x2SapUser
protected

X2 SAP user.

Definition at line 206 of file epc-x2.h.

Referenced by RecvFromX2cSocket(), RecvFromX2uSocket(), and SetEpcX2SapUser().

◆ m_x2uUdpPort

uint16_t ns3::EpcX2::m_x2uUdpPort
private

UDP ports to be used for the X2-U interface.

Definition at line 231 of file epc-x2.h.

Referenced by AddX2Interface(), and DoSendUeData().


The documentation for this class was generated from the following files: