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, uint16_t enb2CellId, 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
 Implement the GetInstanceTypeId method defined in ObjectBase. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. 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 ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. 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)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. 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)
 
virtual void DoSendHandoverRequest (EpcX2SapProvider::HandoverRequestParams params)
 
virtual void DoSendHandoverRequestAck (EpcX2SapProvider::HandoverRequestAckParams params)
 
virtual void DoSendLoadInformation (EpcX2SapProvider::LoadInformationParams params)
 
virtual void DoSendResourceStatusUpdate (EpcX2SapProvider::ResourceStatusUpdateParams params)
 
virtual void DoSendSnStatusTransfer (EpcX2SapProvider::SnStatusTransferParams params)
 
virtual void DoSendUeContextRelease (EpcX2SapProvider::UeContextReleaseParams params)
 
virtual void DoSendUeData (EpcX2SapProvider::UeDataParams params)
 
- 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
 
EpcX2SapUserm_x2SapUser
 

Private Attributes

uint16_t m_x2cUdpPort
 UDP ports to be used for the X2 interfaces: X2-C and X2-U. 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
 

Friends

class EpcX2SpecificEpcX2SapProvider< EpcX2 >
 

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 70 of file epc-x2.h.

Constructor & Destructor Documentation

ns3::EpcX2::EpcX2 ( )

Constructor.

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

References m_x2SapProvider, and NS_LOG_FUNCTION.

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

Destructor.

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

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::EpcX2::AddX2Interface ( uint16_t  enb1CellId,
Ipv4Address  enb1X2Address,
uint16_t  enb2CellId,
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
enb2CellIdthe cell ID of the neighbouring eNodeB
enb2X2Addressthe address of the neighbouring eNodeB

Definition at line 133 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:

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

References m_x2InterfaceCellIds, m_x2InterfaceSockets, m_x2SapProvider, and NS_LOG_FUNCTION.

void ns3::EpcX2::DoSendHandoverRequest ( EpcX2SapProvider::HandoverRequestParams  params)
protectedvirtual
EpcX2SapProvider * ns3::EpcX2::GetEpcX2SapProvider ( )
Returns
the X2 SAP Provider interface offered by this EPC X2 entity

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

References m_x2SapProvider, and NS_LOG_FUNCTION.

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

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

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

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 170 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:

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 371 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:

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

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

References m_x2SapUser, and NS_LOG_FUNCTION.

Friends And Related Function Documentation

friend class EpcX2SpecificEpcX2SapProvider< EpcX2 >
friend

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

Member Data Documentation

uint16_t ns3::EpcX2::m_x2cUdpPort
private
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 155 of file epc-x2.h.

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

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 149 of file epc-x2.h.

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

EpcX2SapProvider* ns3::EpcX2::m_x2SapProvider
protected

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

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

EpcX2SapUser* ns3::EpcX2::m_x2SapUser
protected

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

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

uint16_t ns3::EpcX2::m_x2uUdpPort
private

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

Referenced by AddX2Interface(), and DoSendUeData().


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