A Discrete-Event Network Simulator
API
epc-mme.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 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: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 #ifndef EPC_MME_H
22 #define EPC_MME_H
23 
24 #include <ns3/object.h>
25 #include <ns3/epc-s1ap-sap.h>
26 #include <ns3/epc-s11-sap.h>
27 
28 #include <map>
29 #include <list>
30 
31 namespace ns3 {
32 
33 class Node;
34 class NetDevice;
35 
40 class EpcMme : public Object
41 {
42 
44  friend class MemberEpcS1apSapMme<EpcMme>;
46  friend class MemberEpcS11SapMme<EpcMme>;
47 
48 public:
49 
53  EpcMme ();
54 
58  virtual ~EpcMme ();
59 
64  static TypeId GetTypeId (void);
65 protected:
66  virtual void DoDispose ();
67 
68 public:
69 
70 
76 
82  void SetS11SapSgw (EpcS11SapSgw * s);
83 
89 
96  void AddEnb (uint16_t ecgi, Ipv4Address enbS1UAddr, EpcS1apSapEnb* enbS1apSap);
97 
104  void AddUe (uint64_t imsi);
105 
116  uint8_t AddBearer (uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer);
117 
118 
119 private:
120 
121  // S1-AP SAP MME forwarded methods
129  void DoInitialUeMessage (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi);
136  void DoInitialContextSetupResponse (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list<EpcS1apSapMme::ErabSetupItem> erabSetupList);
144  void DoPathSwitchRequest (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list<EpcS1apSapMme::ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList);
151  void DoErabReleaseIndication (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list<EpcS1apSapMme::ErabToBeReleasedIndication> erabToBeReleaseIndication);
152 
153  // S11 SAP MME forwarded methods
169 
170 
175  struct BearerInfo
176  {
179  uint8_t bearerId;
180  };
181 
186  struct UeInfo : public SimpleRefCount<UeInfo>
187  {
188  uint64_t mmeUeS1Id;
189  uint16_t enbUeS1Id;
190  uint64_t imsi;
191  uint16_t cellId;
192  std::list<BearerInfo> bearersToBeActivated;
193  uint16_t bearerCounter;
194  };
195 
200  std::map<uint64_t, Ptr<UeInfo> > m_ueInfoMap;
201 
207  void RemoveBearer (Ptr<UeInfo> ueInfo, uint8_t epsBearerId);
208 
213  struct EnbInfo : public SimpleRefCount<EnbInfo>
214  {
215  uint16_t gci;
218  };
219 
224  std::map<uint16_t, Ptr<EnbInfo> > m_enbInfoMap;
225 
226 
227 
228 
230 
233 
234 };
235 
236 
237 
238 
239 } // namespace ns3
240 
241 #endif // EPC_MME_H
void DoDeleteBearerRequest(EpcS11SapMme::DeleteBearerRequestMessage msg)
Delete Bearer Request function.
Definition: epc-mme.cc:247
void AddUe(uint64_t imsi)
Add a new UE to the MME.
Definition: epc-mme.cc:98
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
MME side of the S1-AP Service Access Point (SAP), provides the MME methods to be called when an S1-AP...
Definition: epc-s1ap-sap.h:53
MME side of the S11 Service Access Point (SAP), provides the MME methods to be called when an S11 mes...
Definition: epc-s11-sap.h:78
void DoModifyBearerResponse(EpcS11SapMme::ModifyBearerResponseMessage msg)
Modify Bearer Response function.
Definition: epc-mme.cc:208
Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2.
Definition: epc-s11-sap.h:123
std::map< uint16_t, Ptr< EnbInfo > > m_enbInfoMap
EnbInfo stored by EGCI.
Definition: epc-mme.h:224
EpcS1apSapMme * GetS1apSapMme()
Definition: epc-mme.cc:69
This object implements the MME functionality.
Definition: epc-mme.h:40
uint64_t imsi
UE identifier.
Definition: epc-mme.h:190
void DoErabReleaseIndication(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabToBeReleasedIndication > erabToBeReleaseIndication)
ERAB Release Indication function.
Definition: epc-mme.cc:225
EpcS11SapSgw * m_s11SapSgw
EpcS11SapSgw.
Definition: epc-mme.h:232
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
Hold info on a ENB.
Definition: epc-mme.h:213
eNB side of the S1-AP Service Access Point (SAP), provides the eNB methods to be called when an S1-AP...
Definition: epc-s1ap-sap.h:141
EpcS11SapMme * GetS11SapMme()
Definition: epc-mme.cc:81
uint8_t AddBearer(uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer)
Add an EPS bearer to the list of bearers to be activated for this UE.
Definition: epc-mme.cc:109
uint64_t mmeUeS1Id
mmeUeS1Id
Definition: epc-mme.h:188
Hold info on a UE.
Definition: epc-mme.h:186
virtual ~EpcMme()
Destructor.
Definition: epc-mme.cc:44
uint8_t bearerId
bearer ID
Definition: epc-mme.h:179
Ptr< EpcTft > tft
traffic flow template
Definition: epc-mme.h:177
std::list< BearerInfo > bearersToBeActivated
list of bearers to be activated
Definition: epc-mme.h:192
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoDispose()
Destructor implementation.
Definition: epc-mme.cc:50
uint16_t enbUeS1Id
enbUeS1Id
Definition: epc-mme.h:189
void DoInitialUeMessage(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi)
Initial UE Message function.
Definition: epc-mme.cc:127
uint16_t cellId
cell ID
Definition: epc-mme.h:191
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
SGW side of the S11 Service Access Point (SAP), provides the SGW methods to be called when an S11 mes...
Definition: epc-s11-sap.h:166
uint16_t gci
GCI.
Definition: epc-mme.h:215
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoMap
UeInfo stored by IMSI.
Definition: epc-mme.h:200
void DoInitialContextSetupResponse(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabSetupItem > erabSetupList)
Initial Context Setup Response function.
Definition: epc-mme.cc:151
void AddEnb(uint16_t ecgi, Ipv4Address enbS1UAddr, EpcS1apSapEnb *enbS1apSap)
Add a new ENB to the MME.
Definition: epc-mme.cc:87
void DoPathSwitchRequest(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< EpcS1apSapMme::ErabSwitchedInDownlinkItem > erabToBeSwitchedInDownlinkList)
Path Switch Request function.
Definition: epc-mme.cc:158
Template for the implementation of the EpcS1apSapMme as a member of an owner class of type C to which...
Definition: epc-s1ap-sap.h:203
A base class which provides memory management and object aggregation.
Definition: object.h:87
Modify Bearer Response message, see 3GPP TS 29.274 7.2.7
Definition: epc-s11-sap.h:140
EpcMme()
Constructor.
Definition: epc-mme.cc:35
EpcS1apSapMme * m_s1apSapMme
EpcS1apSapMme.
Definition: epc-mme.h:229
EpsBearer bearer
bearer QOS characteristics
Definition: epc-mme.h:178
void RemoveBearer(Ptr< UeInfo > ueInfo, uint8_t epsBearerId)
This Function erases all contexts of bearer from MME side.
Definition: epc-mme.cc:271
A template-based reference counting class.
void SetS11SapSgw(EpcS11SapSgw *s)
Set the SGW side of the S11 SAP.
Definition: epc-mme.cc:75
a unique identifier for an interface.
Definition: type-id.h:58
Template for the implementation of the EpcS11SapMme as a member of an owner class of type C to which ...
Definition: epc-s11-sap.h:266
EpcS11SapMme * m_s11SapMme
EpcS11SapMme.
Definition: epc-mme.h:231
Ipv4Address s1uAddr
IP address.
Definition: epc-mme.h:216
uint16_t bearerCounter
bearer counter
Definition: epc-mme.h:193
void DoCreateSessionResponse(EpcS11SapMme::CreateSessionResponseMessage msg)
Create Session Response function.
Definition: epc-mme.cc:180
static TypeId GetTypeId(void)
Get the type ID.
Definition: epc-mme.cc:58
Hold info on an EPS bearer to be activated.
Definition: epc-mme.h:175
EpcS1apSapEnb * s1apSapEnb
EpcS1apSapEnb.
Definition: epc-mme.h:217
Create Session Response message, see 3GPP TS 29.274 7.2.2
Definition: epc-s11-sap.h:99