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

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

EpcX2SapProviderm_x2SapProvider
 X2 SAP provider.
 
EpcX2SapUserm_x2SapUser
 X2 SAP user.
 

Private Attributes

uint16_t m_x2cUdpPort
 UDP ports to be used for the X2-C interface.
 
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.
 
std::map< uint16_t, Ptr< X2IfaceInfo > > m_x2InterfaceSockets
 Map the targetCellId to the corresponding (sourceSocket, remoteIpAddr) to be used to send the X2 message.
 
uint16_t m_x2uUdpPort
 UDP ports to be used for the X2-U interface.
 

Friends

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

Additional Inherited Members

Detailed Description

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

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

Constructor & Destructor Documentation

◆ EpcX2()

ns3::EpcX2::EpcX2 ( )

Constructor.

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

References EpcX2SpecificEpcX2SapProvider< EpcX2 >, m_x2SapProvider, and NS_LOG_FUNCTION.

◆ ~EpcX2()

ns3::EpcX2::~EpcX2 ( )
override

Destructor.

Definition at line 83 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 120 of file epc-x2.cc.

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

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::EpcX2::DoDispose ( )
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 89 of file epc-x2.cc.

References m_x2InterfaceCellIds, m_x2InterfaceSockets, m_x2SapProvider, and NS_LOG_FUNCTION.

◆ DoSendHandoverCancel()

◆ DoSendHandoverPreparationFailure()

◆ DoSendHandoverRequest()

◆ DoSendHandoverRequestAck()

◆ DoSendLoadInformation()

void ns3::EpcX2::DoSendLoadInformation ( EpcX2SapProvider::LoadInformationParams params)
protectedvirtual

◆ DoSendResourceStatusUpdate()

◆ DoSendSnStatusTransfer()

◆ DoSendUeContextRelease()

void ns3::EpcX2::DoSendUeContextRelease ( EpcX2SapProvider::UeContextReleaseParams params)
protectedvirtual

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

References ns3::GtpuHeader::GetSerializedSize(), m_x2InterfaceSockets, m_x2uUdpPort, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, 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 113 of file epc-x2.cc.

References m_x2SapProvider, and NS_LOG_FUNCTION.

◆ GetTypeId()

TypeId ns3::EpcX2::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 99 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 169 of file epc-x2.cc.

References ns3::EpcX2HandoverRequestAckHeader::GetAdmittedBearers(), ns3::EpcX2HandoverRequestHeader::GetBearers(), ns3::EpcX2HandoverCancelHeader::GetCause(), ns3::EpcX2HandoverPreparationFailureHeader::GetCause(), ns3::EpcX2HandoverRequestHeader::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::EpcX2HandoverCancelHeader::GetNewEnbUeX2apId(), ns3::EpcX2HandoverRequestAckHeader::GetNewEnbUeX2apId(), ns3::EpcX2SnStatusTransferHeader::GetNewEnbUeX2apId(), ns3::EpcX2UeContextReleaseHeader::GetNewEnbUeX2apId(), ns3::EpcX2HandoverRequestAckHeader::GetNotAdmittedBearers(), ns3::EpcX2HandoverCancelHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverPreparationFailureHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverRequestAckHeader::GetOldEnbUeX2apId(), ns3::EpcX2HandoverRequestHeader::GetOldEnbUeX2apId(), ns3::EpcX2SnStatusTransferHeader::GetOldEnbUeX2apId(), ns3::EpcX2UeContextReleaseHeader::GetOldEnbUeX2apId(), ns3::EpcX2Header::GetProcedureCode(), 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, 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::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 396 of file epc-x2.cc.

References ns3::GtpuHeader::GetTeid(), m_x2InterfaceCellIds, m_x2SapUser, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::EpcX2SapUser::RecvUeData().

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

References m_x2SapUser, and NS_LOG_FUNCTION.

Friends And Related Symbol Documentation

◆ EpcX2SpecificEpcX2SapProvider< EpcX2 >

friend class EpcX2SpecificEpcX2SapProvider< EpcX2 >
friend

allow EpcX2SpecificEpcX2SapProvider<EpcX2> class friend access

Definition at line 79 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 213 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 207 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 200 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 199 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 222 of file epc-x2.h.

Referenced by AddX2Interface(), and DoSendUeData().


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