A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
epc-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2013 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors:
7 * Jaume Nin <jnin@cttc.es>
8 * Nicola Baldo <nbaldo@cttc.es>
9 * Manuel Requena <manuel.requena@cttc.es>
10 */
11
12#ifndef EPC_HELPER_H
13#define EPC_HELPER_H
14
15#include <ns3/data-rate.h>
16#include <ns3/epc-tft.h>
17#include <ns3/eps-bearer.h>
18#include <ns3/ipv4-address-helper.h>
19#include <ns3/ipv6-address-helper.h>
20#include <ns3/object.h>
21
22namespace ns3
23{
24
25class Node;
26class NetDevice;
27class VirtualNetDevice;
28class EpcX2;
29
30/**
31 * @ingroup lte
32 *
33 * @brief Base helper class to handle the creation of the EPC entities.
34 *
35 * This class provides the API for the implementation of helpers that
36 * allow to create EPC entities and the nodes and interfaces that host
37 * and connect them.
38 */
39class EpcHelper : public Object
40{
41 public:
42 /**
43 * Constructor
44 */
45 EpcHelper();
46
47 /**
48 * Destructor
49 */
50 ~EpcHelper() override;
51
52 // inherited from Object
53 /**
54 * Register this type.
55 * @return The object TypeId.
56 */
57 static TypeId GetTypeId();
58 void DoDispose() override;
59
60 /**
61 * Add an eNB to the EPC
62 *
63 * @param enbNode the previously created eNB node which is to be
64 * added to the EPC
65 * @param lteEnbNetDevice the LteEnbNetDevice of the eNB node
66 * @param cellIds IDs of cells served by this eNB
67 */
68 virtual void AddEnb(Ptr<Node> enbNode,
69 Ptr<NetDevice> lteEnbNetDevice,
70 std::vector<uint16_t> cellIds) = 0;
71
72 /**
73 * Notify the EPC of the existence of a new UE which might attach at a later time
74 *
75 * @param ueLteDevice the UE device to be attached
76 * @param imsi the unique identifier of the UE
77 */
78 virtual void AddUe(Ptr<NetDevice> ueLteDevice, uint64_t imsi) = 0;
79
80 /**
81 * Add an X2 interface between two eNB
82 *
83 * @param enbNode1 one eNB peer of the X2 interface
84 * @param enbNode2 the other eNB peer of the X2 interface
85 */
86 virtual void AddX2Interface(Ptr<Node> enbNode1, Ptr<Node> enbNode2) = 0;
87
88 /**
89 * Add an S1 interface between an eNB and a SGW
90 *
91 * @param enb eNB peer of the S1 interface
92 * @param enbAddress eNB IPv4 address of the S1 interface
93 * @param sgwAddress SGW IPv4 address of the S1 interface
94 * @param cellIds cellIds of the eNB
95 */
96 virtual void AddS1Interface(Ptr<Node> enb,
97 Ipv4Address enbAddress,
98 Ipv4Address sgwAddress,
99 std::vector<uint16_t> cellIds) = 0;
100
101 /**
102 * Activate an EPS bearer, setting up the corresponding S1-U tunnel.
103 *
104 *
105 *
106 * @param ueLteDevice the Ipv4-enabled device of the UE, normally
107 * connected via the LTE radio interface
108 * @param imsi the unique identifier of the UE
109 * @param tft the Traffic Flow Template of the new bearer
110 * @param bearer struct describing the characteristics of the EPS bearer to be activated
111 * @return bearer ID
112 */
113 virtual uint8_t ActivateEpsBearer(Ptr<NetDevice> ueLteDevice,
114 uint64_t imsi,
115 Ptr<EpcTft> tft,
116 EpsBearer bearer) = 0;
117
118 /**
119 * Get the SGW node
120 *
121 * @return a pointer to the SGW
122 */
123 virtual Ptr<Node> GetSgwNode() const = 0;
124
125 /**
126 * Get the PGW node
127 *
128 * @return a pointer to the PGW node
129 * The primary use intended for this method is to allow the user to configure the SGi
130 * interface of the PGW, i.e., to connect the PGW to the internet.
131 */
132 virtual Ptr<Node> GetPgwNode() const = 0;
133
134 /**
135 * Assign IPv4 addresses to UE devices
136 *
137 * @param ueDevices the set of UE devices
138 *
139 * @return the interface container, \see Ipv4AddressHelper::Assign() which has similar semantics
140 */
142
143 /**
144 * Assign IPv6 addresses to UE devices
145 *
146 * @param ueDevices the set of UE devices
147 *
148 * @return the interface container, \see Ipv6AddressHelper::Assign() which has similar semantics
149 */
151
152 /**
153 *
154 * @return the IPv4 address of the Default Gateway to be used by UEs to reach the internet
155 */
157
158 /**
159 *
160 * @return the IPv6 address of the Default Gateway to be used by UEs to reach the internet
161 */
163
164 /**
165 * Assign a fixed random variable stream number to the random variables used.
166 *
167 * @param stream first stream index to use
168 * @return the number of stream indices (possibly zero) that have been assigned
169 */
170 virtual int64_t AssignStreams(int64_t stream) = 0;
171};
172
173} // namespace ns3
174
175#endif // EPC_HELPER_H
Base helper class to handle the creation of the EPC entities.
Definition epc-helper.h:40
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)=0
Assign IPv4 addresses to UE devices.
static TypeId GetTypeId()
Register this type.
Definition epc-helper.cc:37
virtual int64_t AssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used.
EpcHelper()
Constructor.
Definition epc-helper.cc:26
virtual void AddX2Interface(Ptr< Node > enbNode1, Ptr< Node > enbNode2)=0
Add an X2 interface between two eNB.
void DoDispose() override
Destructor implementation.
Definition epc-helper.cc:44
virtual void AddUe(Ptr< NetDevice > ueLteDevice, uint64_t imsi)=0
Notify the EPC of the existence of a new UE which might attach at a later time.
virtual Ptr< Node > GetSgwNode() const =0
Get the SGW node.
virtual void AddEnb(Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, std::vector< uint16_t > cellIds)=0
Add an eNB to the EPC.
virtual Ptr< Node > GetPgwNode() const =0
Get the PGW node.
virtual Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices)=0
Assign IPv6 addresses to UE devices.
~EpcHelper() override
Destructor.
Definition epc-helper.cc:31
virtual Ipv4Address GetUeDefaultGatewayAddress()=0
virtual void AddS1Interface(Ptr< Node > enb, Ipv4Address enbAddress, Ipv4Address sgwAddress, std::vector< uint16_t > cellIds)=0
Add an S1 interface between an eNB and a SGW.
virtual Ipv6Address GetUeDefaultGatewayAddress6()=0
virtual uint8_t ActivateEpsBearer(Ptr< NetDevice > ueLteDevice, uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer)=0
Activate an EPS bearer, setting up the corresponding S1-U tunnel.
This class contains the specification of EPS Bearers.
Definition eps-bearer.h:80
Ipv4 addresses are stored in host order in this class.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Describes an IPv6 address.
Keep track of a set of IPv6 interfaces.
holds a vector of ns3::NetDevice pointers
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.