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 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors:
18 * Jaume Nin <jnin@cttc.es>
19 * Nicola Baldo <nbaldo@cttc.es>
20 * Manuel Requena <manuel.requena@cttc.es>
21 */
22
23#ifndef EPC_HELPER_H
24#define EPC_HELPER_H
25
26#include <ns3/data-rate.h>
27#include <ns3/epc-tft.h>
28#include <ns3/eps-bearer.h>
29#include <ns3/ipv4-address-helper.h>
30#include <ns3/ipv6-address-helper.h>
31#include <ns3/object.h>
32
33namespace ns3
34{
35
36class Node;
37class NetDevice;
38class VirtualNetDevice;
39class EpcX2;
40
41/**
42 * \ingroup lte
43 *
44 * \brief Base helper class to handle the creation of the EPC entities.
45 *
46 * This class provides the API for the implementation of helpers that
47 * allow to create EPC entities and the nodes and interfaces that host
48 * and connect them.
49 */
50class EpcHelper : public Object
51{
52 public:
53 /**
54 * Constructor
55 */
56 EpcHelper();
57
58 /**
59 * Destructor
60 */
61 ~EpcHelper() override;
62
63 // inherited from Object
64 /**
65 * Register this type.
66 * \return The object TypeId.
67 */
68 static TypeId GetTypeId();
69 void DoDispose() override;
70
71 /**
72 * Add an eNB to the EPC
73 *
74 * \param enbNode the previously created eNB node which is to be
75 * added to the EPC
76 * \param lteEnbNetDevice the LteEnbNetDevice of the eNB node
77 * \param cellIds IDs of cells served by this eNB
78 */
79 virtual void AddEnb(Ptr<Node> enbNode,
80 Ptr<NetDevice> lteEnbNetDevice,
81 std::vector<uint16_t> cellIds) = 0;
82
83 /**
84 * Notify the EPC of the existence of a new UE which might attach at a later time
85 *
86 * \param ueLteDevice the UE device to be attached
87 * \param imsi the unique identifier of the UE
88 */
89 virtual void AddUe(Ptr<NetDevice> ueLteDevice, uint64_t imsi) = 0;
90
91 /**
92 * Add an X2 interface between two eNB
93 *
94 * \param enbNode1 one eNB peer of the X2 interface
95 * \param enbNode2 the other eNB peer of the X2 interface
96 */
97 virtual void AddX2Interface(Ptr<Node> enbNode1, Ptr<Node> enbNode2) = 0;
98
99 /**
100 * Add an S1 interface between an eNB and a SGW
101 *
102 * \param enb eNB peer of the S1 interface
103 * \param enbAddress eNB IPv4 address of the S1 interface
104 * \param sgwAddress SGW IPv4 address of the S1 interface
105 * \param cellIds cellIds of the eNB
106 */
107 virtual void AddS1Interface(Ptr<Node> enb,
108 Ipv4Address enbAddress,
109 Ipv4Address sgwAddress,
110 std::vector<uint16_t> cellIds) = 0;
111
112 /**
113 * Activate an EPS bearer, setting up the corresponding S1-U tunnel.
114 *
115 *
116 *
117 * \param ueLteDevice the Ipv4-enabled device of the UE, normally
118 * connected via the LTE radio interface
119 * \param imsi the unique identifier of the UE
120 * \param tft the Traffic Flow Template of the new bearer
121 * \param bearer struct describing the characteristics of the EPS bearer to be activated
122 * \return bearer ID
123 */
124 virtual uint8_t ActivateEpsBearer(Ptr<NetDevice> ueLteDevice,
125 uint64_t imsi,
126 Ptr<EpcTft> tft,
127 EpsBearer bearer) = 0;
128
129 /**
130 * Get the SGW node
131 *
132 * \return a pointer to the SGW
133 */
134 virtual Ptr<Node> GetSgwNode() const = 0;
135
136 /**
137 * Get the PGW node
138 *
139 * \return a pointer to the PGW node
140 * The primary use intended for this method is to allow the user to configure the SGi
141 * interface of the PGW, i.e., to connect the PGW to the internet.
142 */
143 virtual Ptr<Node> GetPgwNode() const = 0;
144
145 /**
146 * Assign IPv4 addresses to UE devices
147 *
148 * \param ueDevices the set of UE devices
149 *
150 * \return the interface container, \see Ipv4AddressHelper::Assign() which has similar semantics
151 */
153
154 /**
155 * Assign IPv6 addresses to UE devices
156 *
157 * \param ueDevices the set of UE devices
158 *
159 * \return the interface container, \see Ipv6AddressHelper::Assign() which has similar semantics
160 */
162
163 /**
164 *
165 * \return the IPv4 address of the Default Gateway to be used by UEs to reach the internet
166 */
168
169 /**
170 *
171 * \return the IPv6 address of the Default Gateway to be used by UEs to reach the internet
172 */
174
175 /**
176 * Assign a fixed random variable stream number to the random variables used.
177 *
178 * \param stream first stream index to use
179 * \return the number of stream indices (possibly zero) that have been assigned
180 */
181 virtual int64_t AssignStreams(int64_t stream) = 0;
182};
183
184} // namespace ns3
185
186#endif // EPC_HELPER_H
Base helper class to handle the creation of the EPC entities.
Definition: epc-helper.h:51
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)=0
Assign IPv4 addresses to UE devices.
static TypeId GetTypeId()
Register this type.
Definition: epc-helper.cc:48
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:37
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:55
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:42
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:91
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Describes an IPv6 address.
Definition: ipv6-address.h:49
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:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.