A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
epc-helper.h
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011-2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: 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/object.h>
27 #include <ns3/ipv4-address-helper.h>
28 #include <ns3/data-rate.h>
29 #include <ns3/epc-tft.h>
30 #include <ns3/eps-bearer.h>
31 
32 namespace ns3 {
33 
34 class Node;
35 class NetDevice;
36 class VirtualNetDevice;
37 class EpcSgwPgwApplication;
38 class EpcX2;
39 class EpcMme;
40 
49 class EpcHelper : public Object
50 {
51 public:
52 
56  EpcHelper ();
57 
61  virtual ~EpcHelper ();
62 
63  // inherited from Object
64  static TypeId GetTypeId (void);
65  virtual void DoDispose ();
66 
67 
76  void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId);
77 
84  void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
85 
92  void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2);
93 
105  void ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer);
106 
107 
117 
126 
127 
133 
134 
135 
136 private:
137 
146 
147  Ptr<Node> m_sgwPgw;
148  Ptr<EpcSgwPgwApplication> m_sgwPgwApp;
149  Ptr<VirtualNetDevice> m_tunDevice;
150  Ptr<EpcMme> m_mme;
151 
160 
161  DataRate m_s1uLinkDataRate;
162  Time m_s1uLinkDelay;
163  uint16_t m_s1uLinkMtu;
164 
168  uint16_t m_gtpuUdpPort;
169 
174  std::map<uint64_t, Ptr<NetDevice> > m_imsiEnbDeviceMap;
175 
180 
181  DataRate m_x2LinkDataRate;
182  Time m_x2LinkDelay;
183  uint16_t m_x2LinkMtu;
184 
185 };
186 
187 
188 
189 
190 } // namespace ns3
191 
192 #endif // EPC_HELPER_H
Ipv4AddressHelper m_x2Ipv4AddressHelper
Definition: epc-helper.h:179
keep track of time unit.
Definition: nstime.h:149
holds a vector of std::pair of Ptr<Ipv4> and interface index.
uint16_t m_gtpuUdpPort
Definition: epc-helper.h:168
Ptr< Node > GetPgwNode()
Definition: epc-helper.cc:319
Class for representing data rates.
Definition: data-rate.h:71
holds a vector of ns3::NetDevice pointers
virtual ~EpcHelper()
Definition: epc-helper.cc:105
void AddUe(Ptr< NetDevice > ueLteDevice, uint64_t imsi)
Definition: epc-helper.cc:282
Helper class to handle the creation of the EPC entities and protocols.
Definition: epc-helper.h:49
virtual void DoDispose()
Definition: epc-helper.cc:151
Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Definition: epc-helper.cc:326
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:38
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void ActivateEpsBearer(Ptr< NetDevice > ueLteDevice, uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer)
Definition: epc-helper.cc:293
a base class which provides memory management and object aggregation
Definition: object.h:63
Ipv4AddressHelper m_s1uIpv4AddressHelper
Definition: epc-helper.h:159
std::map< uint64_t, Ptr< NetDevice > > m_imsiEnbDeviceMap
Definition: epc-helper.h:174
void AddEnb(Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, uint16_t cellId)
Definition: epc-helper.cc:162
void AddX2Interface(Ptr< Node > enbNode1, Ptr< Node > enbNode2)
Definition: epc-helper.cc:238
a unique identifier for an interface.
Definition: type-id.h:44
Ipv4Address GetUeDefaultGatewayAddress()
Definition: epc-helper.cc:334
Ipv4AddressHelper m_ueAddressHelper
Definition: epc-helper.h:145