A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::EpcHelper Class Reference

Helper class to handle the creation of the EPC entities and protocols. More...

#include <epc-helper.h>

+ Inheritance diagram for ns3::EpcHelper:
+ Collaboration diagram for ns3::EpcHelper:

Public Member Functions

 EpcHelper ()
virtual ~EpcHelper ()
void ActivateEpsBearer (Ptr< NetDevice > ueLteDevice, Ptr< NetDevice > enbLteDevice, Ptr< EpcTft > tft, uint16_t rnti, uint8_t lcid)
void AddEnb (Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice)
Ipv4InterfaceContainer AssignUeIpv4Address (NetDeviceContainer ueDevices)
virtual void DoDispose ()
Ptr< NodeGetPgwNode ()
Ipv4Address GetUeDefaultGatewayAddress ()
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~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 Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
virtual ~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)
 This method returns the TypeId associated to ns3::EpcHelper.

Private Attributes

uint16_t m_gtpuUdpPort
Ipv4AddressHelper m_s1uIpv4AddressHelper
DataRate m_s1uLinkDataRate
Time m_s1uLinkDelay
uint16_t m_s1uLinkMtu
Ptr< Nodem_sgwPgw
Ptr< EpcSgwPgwApplicationm_sgwPgwApp
Ptr< VirtualNetDevicem_tunDevice
Ipv4AddressHelper m_ueAddressHelper

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void DoStart (void)
virtual void NotifyNewAggregate (void)

Detailed Description

Helper class to handle the creation of the EPC entities and protocols.

This Helper will create an EPC network topology comprising of a single node that implements both the SGW and PGW functionality, and is connected to all the eNBs in the simulation by means of the S1-U interface.

Definition at line 46 of file epc-helper.h.

Constructor & Destructor Documentation

ns3::EpcHelper::~EpcHelper ( )
virtual

Destructor

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

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::EpcHelper::ActivateEpsBearer ( Ptr< NetDevice ueLteDevice,
Ptr< NetDevice enbLteDevice,
Ptr< EpcTft tft,
uint16_t  rnti,
uint8_t  lcid 
)

Activate an EPS bearer, setting up the corresponding S1-U tunnel.

Parameters
ueLteDevicethe Ipv4-enabled device of the UE, normally connected via the LTE radio interface
enbLteDevicethe non-Ipv4-enabled device of the eNB
tftthe Traffic Flow Template of the new bearer
rntithe Radio Network Temporary Identifier that identifies the UE
lcidthe Logical Channel IDentifier of the corresponding RadioBearer

Definition at line 199 of file epc-helper.cc.

References ns3::EpcSgwPgwApplication::ActivateS1Bearer(), ns3::Ipv4::GetAddress(), ns3::Node::GetApplication(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4::GetNAddresses(), ns3::Node::GetNApplications(), ns3::Ipv4::GetNInterfaces(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), m_sgwPgwApp, NS_ASSERT, and NS_LOG_LOGIC.

Referenced by ns3::LteHelper::ActivateEpsBearer(), ns3::EpcS1uDlTestCase::DoRun(), and ns3::EpcS1uUlTestCase::DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EpcHelper::AddEnb ( Ptr< Node enbNode,
Ptr< NetDevice lteEnbNetDevice 
)
Ipv4InterfaceContainer ns3::EpcHelper::AssignUeIpv4Address ( NetDeviceContainer  ueDevices)

Assign IPv4 addresses to UE devices

Parameters
ueDevicesthe set of UE devices
Returns
the interface container,
See Also
Ipv4AddressHelper::Assign() which has similar semantics

Definition at line 248 of file epc-helper.cc.

References ns3::Ipv4AddressHelper::Assign(), and m_ueAddressHelper.

Referenced by ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EpcHelper::DoDispose ( void  )
virtual

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 122 of file epc-helper.cc.

References ns3::Object::Dispose(), m_sgwPgw, m_sgwPgwApp, m_tunDevice, ns3::MakeNullCallback(), and ns3::VirtualNetDevice::SetSendCallback().

+ Here is the call graph for this function:

Ptr< Node > ns3::EpcHelper::GetPgwNode ( )
Returns
a pointer to the node implementing PGW functionality. Note that in this particular implementation this node will also hold the SGW functionality. The primary use intended for this method is to allow the user to configure the Gi interface of the PGW, i.e., to connect the PGW to the internet.

Definition at line 241 of file epc-helper.cc.

References m_sgwPgw.

Referenced by ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and main().

+ Here is the caller graph for this function:

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

This method returns the TypeId associated to ns3::EpcHelper.

Attributes defined for this type:

  • S1uLinkDataRate: The data rate to be used for the next S1-U link to be created
    • Set with class: DataRateValue
    • Underlying type: DataRate
    • Initial value: 10000000000bps
    • Flags: construct write read
  • S1uLinkDelay: The delay to be used for the next S1-U link to be created
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +0.0ns
    • Flags: construct write read
  • S1uLinkMtu: The MTU of the next S1-U link to be created. Note that, because of the additional GTP/UDP/IP tunneling overhead, you need a MTU larger than the end-to-end MTU that you want to support.

No TraceSources defined for this type.

Reimplemented from ns3::Object.

Definition at line 97 of file epc-helper.cc.

References m_s1uLinkDataRate, m_s1uLinkDelay, m_s1uLinkMtu, ns3::Seconds(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

Ipv4Address ns3::EpcHelper::GetUeDefaultGatewayAddress ( )
Returns
the address of the Default Gateway to be used by UEs to reach the internet

Definition at line 256 of file epc-helper.cc.

References ns3::Object::GetObject(), and m_sgwPgw.

Referenced by ns3::EpcS1uUlTestCase::DoRun(), and main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint16_t ns3::EpcHelper::m_gtpuUdpPort
private

UDP port where the GTP-U Socket is bound, fixed by the standard as 2152

Definition at line 142 of file epc-helper.h.

Referenced by AddEnb(), and EpcHelper().

Ipv4AddressHelper ns3::EpcHelper::m_s1uIpv4AddressHelper
private

helper to assign addresses to S1-U NetDevices

Definition at line 123 of file epc-helper.h.

Referenced by AddEnb(), and EpcHelper().

DataRate ns3::EpcHelper::m_s1uLinkDataRate
private

Definition at line 134 of file epc-helper.h.

Referenced by AddEnb(), and GetTypeId().

Time ns3::EpcHelper::m_s1uLinkDelay
private

Definition at line 135 of file epc-helper.h.

Referenced by AddEnb(), and GetTypeId().

uint16_t ns3::EpcHelper::m_s1uLinkMtu
private

Definition at line 136 of file epc-helper.h.

Referenced by AddEnb(), and GetTypeId().

Ptr<Node> ns3::EpcHelper::m_sgwPgw
private

Definition at line 130 of file epc-helper.h.

Referenced by AddEnb(), DoDispose(), EpcHelper(), GetPgwNode(), and GetUeDefaultGatewayAddress().

Ptr<EpcSgwPgwApplication> ns3::EpcHelper::m_sgwPgwApp
private

Definition at line 131 of file epc-helper.h.

Referenced by ActivateEpsBearer(), DoDispose(), and EpcHelper().

Ptr<VirtualNetDevice> ns3::EpcHelper::m_tunDevice
private

Definition at line 132 of file epc-helper.h.

Referenced by DoDispose(), and EpcHelper().

Ipv4AddressHelper ns3::EpcHelper::m_ueAddressHelper
private

helper to assign addresses to UE devices as well as to the TUN device of the SGW/PGW

Definition at line 128 of file epc-helper.h.

Referenced by AssignUeIpv4Address(), and EpcHelper().


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