Helper class to handle the creation of the EPC entities and protocols. More...
#include <epc-helper.h>
Public Member Functions | |
EpcHelper () | |
virtual | ~EpcHelper () |
void | ActivateEpsBearer (Ptr< NetDevice > ueLteDevice, uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer) |
void | AddEnb (Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, uint16_t cellId) |
void | AddUe (Ptr< NetDevice > ueLteDevice, uint64_t imsi) |
void | AddX2Interface (Ptr< Node > enbNode1, Ptr< Node > enbNode2) |
Ipv4InterfaceContainer | AssignUeIpv4Address (NetDeviceContainer ueDevices) |
virtual void | DoDispose () |
Ptr< Node > | GetPgwNode () |
Ipv4Address | GetUeDefaultGatewayAddress () |
![]() | |
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 | Initialize (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
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) |
Private Attributes | |
uint16_t | m_gtpuUdpPort |
std::map< uint64_t, Ptr < NetDevice > > | m_imsiEnbDeviceMap |
Ptr< EpcMme > | m_mme |
Ipv4AddressHelper | m_s1uIpv4AddressHelper |
DataRate | m_s1uLinkDataRate |
Time | m_s1uLinkDelay |
uint16_t | m_s1uLinkMtu |
Ptr< Node > | m_sgwPgw |
Ptr< EpcSgwPgwApplication > | m_sgwPgwApp |
Ptr< VirtualNetDevice > | m_tunDevice |
Ipv4AddressHelper | m_ueAddressHelper |
Ipv4AddressHelper | m_x2Ipv4AddressHelper |
DataRate | m_x2LinkDataRate |
Time | m_x2LinkDelay |
uint16_t | m_x2LinkMtu |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
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.
Doxygen introspection did not find any typical Config paths.
No TraceSources are defined for this type.
Definition at line 49 of file epc-helper.h.
ns3::EpcHelper::EpcHelper | ( | ) |
Constructor
Definition at line 50 of file epc-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::Node::AddApplication(), ns3::Node::AddDevice(), ns3::Mac48Address::Allocate(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Bind(), ns3::Socket::CreateSocket(), ns3::Ipv4Address::GetAny(), ns3::EpcMme::GetS11SapMme(), ns3::EpcSgwPgwApplication::GetS11SapSgw(), ns3::InternetStackHelper::Install(), ns3::TypeId::LookupByName(), m_gtpuUdpPort, m_mme, m_s1uIpv4AddressHelper, m_sgwPgw, m_sgwPgwApp, m_tunDevice, m_ueAddressHelper, m_x2Ipv4AddressHelper, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, ns3::EpcSgwPgwApplication::RecvFromTunDevice(), ns3::VirtualNetDevice::SetAddress(), ns3::ObjectBase::SetAttribute(), ns3::Ipv4AddressHelper::SetBase(), ns3::EpcSgwPgwApplication::SetS11SapMme(), and ns3::EpcMme::SetS11SapSgw().
|
virtual |
void ns3::EpcHelper::ActivateEpsBearer | ( | Ptr< NetDevice > | ueLteDevice, |
uint64_t | imsi, | ||
Ptr< EpcTft > | tft, | ||
EpsBearer | bearer | ||
) |
Activate an EPS bearer, setting up the corresponding S1-U tunnel.
ueLteDevice | the Ipv4-enabled device of the UE, normally connected via the LTE radio interface |
imsi | the unique identifier of the UE |
tft | the Traffic Flow Template of the new bearer |
bearer | struct describing the characteristics of the EPS bearer to be activated |
Definition at line 293 of file epc-helper.cc.
References ns3::EpcMme::AddBearer(), ns3::Ipv4::GetAddress(), ns3::Ipv4InterfaceAddress::GetLocal(), ns3::Ipv4::GetNAddresses(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), m_mme, m_sgwPgwApp, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_LOGIC, and ns3::EpcSgwPgwApplication::SetUeAddress().
Referenced by ns3::LteHelper::ActivateDedicatedEpsBearer(), ns3::LteHelper::Attach(), ns3::EpcS1uDlTestCase::DoRun(), and ns3::EpcS1uUlTestCase::DoRun().
void ns3::EpcHelper::AddEnb | ( | Ptr< Node > | enbNode, |
Ptr< NetDevice > | lteEnbNetDevice, | ||
uint16_t | cellId | ||
) |
Add an eNB to the EPC
enbNode | the previosuly created eNB node which is to be added to the EPC |
lteEnbNetDevice | the LteEnbNetDevice of the eNB node |
cellId | ID of the eNB |
Definition at line 162 of file epc-helper.cc.
References ns3::NodeContainer::Add(), ns3::Node::AddApplication(), ns3::EpcMme::AddEnb(), ns3::EpcSgwPgwApplication::AddEnb(), ns3::Object::AggregateObject(), ns3::Ipv4AddressHelper::Assign(), ns3::Socket::Bind(), ns3::Socket::Connect(), ns3::Socket::CreateSocket(), ns3::NetDeviceContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::Node::GetApplication(), ns3::Mac48Address::GetBroadcast(), ns3::NetDevice::GetIfIndex(), ns3::Node::GetNApplications(), ns3::Ipv4::GetNInterfaces(), ns3::NetDevice::GetNode(), ns3::Object::GetObject(), ns3::EpcMme::GetS1apSapMme(), ns3::PointToPointHelper::Install(), ns3::InternetStackHelper::Install(), ns3::TypeId::LookupByName(), m_gtpuUdpPort, m_mme, m_s1uIpv4AddressHelper, m_s1uLinkDataRate, m_s1uLinkDelay, m_s1uLinkMtu, m_sgwPgw, m_sgwPgwApp, ns3::Ipv4AddressHelper::NewNetwork(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, ns3::Ipv4L3Protocol::PROT_NUMBER, ns3::PointToPointHelper::SetChannelAttribute(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), and ns3::PacketSocketAddress::SetSingleDevice().
Referenced by ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and ns3::LteHelper::InstallSingleEnbDevice().
Notify the EPC of the existance of a new UE which might attach at a later time
ueLteDevice | the UE device to be attached |
imsi | the unique identifier of the UE |
Definition at line 282 of file epc-helper.cc.
References ns3::EpcMme::AddUe(), ns3::EpcSgwPgwApplication::AddUe(), m_mme, m_sgwPgwApp, and NS_LOG_FUNCTION.
Referenced by ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and ns3::LteHelper::InstallSingleUeDevice().
Add an X2 interface between two eNB
enbNode1 | one eNB peer of the X2 interface |
enbNode2 | the other eNB peer of the X2 interface |
Definition at line 238 of file epc-helper.cc.
References ns3::NodeContainer::Add(), ns3::Ipv4AddressHelper::Assign(), ns3::NetDeviceContainer::Get(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::LteEnbNetDevice::GetCellId(), ns3::Node::GetDevice(), ns3::Ipv4::GetNInterfaces(), ns3::Object::GetObject(), ns3::PointToPointHelper::Install(), m_x2Ipv4AddressHelper, m_x2LinkDataRate, m_x2LinkDelay, m_x2LinkMtu, ns3::Ipv4AddressHelper::NewNetwork(), NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::PointToPointHelper::SetChannelAttribute(), and ns3::PointToPointHelper::SetDeviceAttribute().
Referenced by ns3::LteHelper::AddX2Interface().
Ipv4InterfaceContainer ns3::EpcHelper::AssignUeIpv4Address | ( | NetDeviceContainer | ueDevices | ) |
Assign IPv4 addresses to UE devices
ueDevices | the set of UE devices |
Definition at line 326 of file epc-helper.cc.
References ns3::Ipv4AddressHelper::Assign(), and m_ueAddressHelper.
Referenced by ns3::LteX2HandoverTestCase::DoRun(), ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and main().
|
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 151 of file epc-helper.cc.
References ns3::Object::Dispose(), m_sgwPgw, m_sgwPgwApp, m_tunDevice, ns3::MakeNullCallback(), NS_LOG_FUNCTION, and ns3::VirtualNetDevice::SetSendCallback().
Definition at line 319 of file epc-helper.cc.
References m_sgwPgw.
Referenced by ns3::LteX2HandoverTestCase::DoRun(), ns3::EpcS1uDlTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and main().
|
static |
Reimplemented from ns3::Object.
Definition at line 111 of file epc-helper.cc.
References m_s1uLinkDataRate, m_s1uLinkDelay, m_s1uLinkMtu, m_x2LinkDataRate, m_x2LinkDelay, m_x2LinkMtu, ns3::Seconds(), and ns3::TypeId::SetParent().
Ipv4Address ns3::EpcHelper::GetUeDefaultGatewayAddress | ( | ) |
Definition at line 334 of file epc-helper.cc.
References ns3::Object::GetObject(), and m_sgwPgw.
Referenced by ns3::LteX2HandoverTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), and main().
|
private |
UDP port where the GTP-U Socket is bound, fixed by the standard as 2152
Definition at line 168 of file epc-helper.h.
Referenced by AddEnb(), and EpcHelper().
Map storing for each IMSI the corresponding eNB NetDevice
Definition at line 174 of file epc-helper.h.
Definition at line 150 of file epc-helper.h.
Referenced by ActivateEpsBearer(), AddEnb(), AddUe(), and EpcHelper().
|
private |
S1-U interfaces helper to assign addresses to S1-U NetDevices
Definition at line 159 of file epc-helper.h.
Referenced by AddEnb(), and EpcHelper().
|
private |
Definition at line 161 of file epc-helper.h.
Referenced by AddEnb(), and GetTypeId().
|
private |
Definition at line 162 of file epc-helper.h.
Referenced by AddEnb(), and GetTypeId().
|
private |
Definition at line 163 of file epc-helper.h.
Referenced by AddEnb(), and GetTypeId().
Definition at line 147 of file epc-helper.h.
Referenced by AddEnb(), DoDispose(), EpcHelper(), GetPgwNode(), and GetUeDefaultGatewayAddress().
|
private |
Definition at line 148 of file epc-helper.h.
Referenced by ActivateEpsBearer(), AddEnb(), AddUe(), DoDispose(), and EpcHelper().
|
private |
Definition at line 149 of file epc-helper.h.
Referenced by DoDispose(), and EpcHelper().
|
private |
SGW-PGW network element helper to assign addresses to UE devices as well as to the TUN device of the SGW/PGW
Definition at line 145 of file epc-helper.h.
Referenced by AssignUeIpv4Address(), and EpcHelper().
|
private |
helper to assign addresses to X2 NetDevices
Definition at line 179 of file epc-helper.h.
Referenced by AddX2Interface(), and EpcHelper().
|
private |
Definition at line 181 of file epc-helper.h.
Referenced by AddX2Interface(), and GetTypeId().
|
private |
Definition at line 182 of file epc-helper.h.
Referenced by AddX2Interface(), and GetTypeId().
|
private |
Definition at line 183 of file epc-helper.h.
Referenced by AddX2Interface(), and GetTypeId().