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...
 
 ~EpcX2 () override
 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...
 
void DoDispose () override
 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...
 
 ~Object () override
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose ()
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one. More...
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated 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...
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized () 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 () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () 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 errors. 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 ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID. More...
 

Protected Member Functions

virtual void DoSendHandoverCancel (EpcX2SapProvider::HandoverCancelParams params)
 Send Handover Cancel function. More...
 
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 ()
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate ()
 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 ()
 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.

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

Constructor & Destructor Documentation

◆ EpcX2()

ns3::EpcX2::EpcX2 ( )

Constructor.

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

References EpcX2SpecificEpcX2SapProvider< EpcX2 >, m_x2SapProvider, and NS_LOG_FUNCTION.

◆ ~EpcX2()

ns3::EpcX2::~EpcX2 ( )
override

Destructor.

Definition at line 94 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  )
overridevirtual

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 100 of file epc-x2.cc.

References m_x2InterfaceCellIds, m_x2InterfaceSockets, m_x2SapProvider, and NS_LOG_FUNCTION.

◆ DoSendHandoverCancel()

◆ DoSendHandoverPreparationFailure()

◆ DoSendHandoverRequest()

◆ DoSendHandoverRequestAck()

◆ DoSendLoadInformation()

◆ DoSendResourceStatusUpdate()

◆ DoSendSnStatusTransfer()

◆ DoSendUeContextRelease()

◆ DoSendUeData()

void ns3::EpcX2::DoSendUeData ( EpcX2SapProvider::UeDataParams  params)
protectedvirtual

Send UE data function.

Parameters
paramsEpcX2SapProvider::UeDataParams
Todo:
This should be done in GtpuHeader

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

References ns3::Packet::AddHeader(), ns3::GtpuHeader::GetSerializedSize(), m_x2InterfaceSockets, m_x2uUdpPort, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, two-ray-to-three-gpp-ch-calibration::params, ns3::Socket::SendTo(), ns3::GtpuHeader::SetLength(), and ns3::GtpuHeader::SetTeid().

+ Here is the call graph for this function:

◆ GetEpcX2SapProvider()

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

Definition at line 124 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 110 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 180 of file epc-x2.cc.

References ns3::EpcX2HandoverRequestAckHeader::GetAdmittedBearers(), ns3::EpcX2HandoverRequestHeader::GetBearers(), ns3::EpcX2HandoverRequestHeader::GetCause(), ns3::EpcX2HandoverPreparationFailureHeader::GetCause(), ns3::EpcX2HandoverCancelHeader::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::EpcX2HandoverCancelHeader::GetNewEnbUeX2apId(), ns3::EpcX2HandoverRequestAckHeader::GetNotAdmittedBearers(), ns3::EpcX2HandoverRequestHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverRequestAckHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverPreparationFailureHeader::GetOldEnbUeX2apId(), ns3::EpcX2SnStatusTransferHeader::GetOldEnbUeX2apId(), ns3::EpcX2UeContextReleaseHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverCancelHeader::GetOldEnbUeX2apId(), ns3::EpcX2Header::GetProcedureCode(), ns3::Packet::GetSize(), ns3::EpcX2HandoverRequestHeader::GetTargetCellId(), ns3::EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateDownlink(), ns3::EpcX2HandoverRequestHeader::GetUeAggregateMaxBitRateUplink(), ns3::EpcX2Header::HandoverCancel, ns3::EpcX2Header::HandoverPreparation, ns3::EpcX2Header::InitiatingMessage, ns3::EpcX2Header::LoadIndication, m_x2InterfaceCellIds, m_x2SapUser, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, two-ray-to-three-gpp-ch-calibration::params, ns3::Socket::Recv(), ns3::EpcX2SapUser::RecvHandoverCancel(), 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::EpcX2Header::SnStatusTransfer, ns3::EpcX2Header::SuccessfulOutcome, 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 407 of file epc-x2.cc.

References ns3::Packet::GetSize(), ns3::GtpuHeader::GetTeid(), m_x2InterfaceCellIds, m_x2SapUser, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, two-ray-to-three-gpp-ch-calibration::params, ns3::Socket::Recv(), ns3::EpcX2SapUser::RecvUeData(), and ns3::Packet::RemoveHeader().

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 117 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 224 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 218 of file epc-x2.h.

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

◆ m_x2SapProvider

EpcX2SapProvider* ns3::EpcX2::m_x2SapProvider
protected

X2 SAP provider.

Definition at line 211 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 210 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 233 of file epc-x2.h.

Referenced by AddX2Interface(), and DoSendUeData().


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