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 
43  friend class MemberEpcS1apSapMme<EpcMme>;
44  friend class MemberEpcS11SapMme<EpcMme>;
45 
46 public:
47 
51  EpcMme ();
52 
56  virtual ~EpcMme ();
57 
58  // inherited from Object
59  static TypeId GetTypeId (void);
60 protected:
61  virtual void DoDispose ();
62 
63 public:
64 
65 
71 
77  void SetS11SapSgw (EpcS11SapSgw * s);
78 
84 
90  void AddEnb (uint16_t ecgi, Ipv4Address enbS1UAddr, EpcS1apSapEnb* enbS1apSap);
91 
98  void AddUe (uint64_t imsi);
99 
109  uint8_t AddBearer (uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer);
110 
111 
112 private:
113 
114  // S1-AP SAP MME forwarded methods
115  void DoInitialUeMessage (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi);
116  void DoInitialContextSetupResponse (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list<EpcS1apSapMme::ErabSetupItem> erabSetupList);
117  void DoPathSwitchRequest (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list<EpcS1apSapMme::ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList);
118  void DoErabReleaseIndication (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list<EpcS1apSapMme::ErabToBeReleasedIndication> erabToBeReleaseIndication);
119 
120  // S11 SAP MME forwarded methods
124 
125 
130  struct BearerInfo
131  {
134  uint8_t bearerId;
135  };
136 
141  struct UeInfo : public SimpleRefCount<UeInfo>
142  {
143  uint64_t mmeUeS1Id;
144  uint16_t enbUeS1Id;
145  uint64_t imsi;
146  uint16_t cellId;
147  std::list<BearerInfo> bearersToBeActivated;
148  uint16_t bearerCounter;
149  };
150 
155  std::map<uint64_t, Ptr<UeInfo> > m_ueInfoMap;
156 
162  void RemoveBearer (Ptr<UeInfo> ueInfo, uint8_t epsBearerId);
163 
168  struct EnbInfo : public SimpleRefCount<EnbInfo>
169  {
170  uint16_t gci;
173  };
174 
179  std::map<uint16_t, Ptr<EnbInfo> > m_enbInfoMap;
180 
181 
182 
183 
185 
188 
189 };
190 
191 
192 
193 
194 } // namespace ns3
195 
196 #endif // EPC_MME_H
void DoDeleteBearerRequest(EpcS11SapMme::DeleteBearerRequestMessage msg)
Definition: epc-mme.cc:246
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:48
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:72
void DoModifyBearerResponse(EpcS11SapMme::ModifyBearerResponseMessage msg)
Definition: epc-mme.cc:207
Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2.
Definition: epc-s11-sap.h:114
std::map< uint16_t, Ptr< EnbInfo > > m_enbInfoMap
EnbInfo stored by EGCI.
Definition: epc-mme.h:179
EpcS1apSapMme * GetS1apSapMme()
Definition: epc-mme.cc:69
This object implements the MME functionality.
Definition: epc-mme.h:40
void DoErabReleaseIndication(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabToBeReleasedIndication > erabToBeReleaseIndication)
Definition: epc-mme.cc:224
EpcS11SapSgw * m_s11SapSgw
Definition: epc-mme.h:187
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
Hold info on a ENB.
Definition: epc-mme.h:168
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:132
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
Definition: epc-mme.h:143
Hold info on a UE.
Definition: epc-mme.h:141
virtual ~EpcMme()
Destructor.
Definition: epc-mme.cc:44
Ptr< EpcTft > tft
Definition: epc-mme.h:132
std::list< BearerInfo > bearersToBeActivated
Definition: epc-mme.h:147
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
Definition: epc-mme.h:144
void DoInitialUeMessage(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi)
Definition: epc-mme.cc:127
uint16_t cellId
Definition: epc-mme.h:146
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:156
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoMap
UeInfo stored by IMSI.
Definition: epc-mme.h:155
void DoInitialContextSetupResponse(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabSetupItem > erabSetupList)
Definition: epc-mme.cc:150
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)
Definition: epc-mme.cc:157
Template for the implementation of the EpcS1apSapMme as a member of an owner class of type C to which...
Definition: epc-s1ap-sap.h:189
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:131
EpcMme()
Constructor.
Definition: epc-mme.cc:35
EpcS1apSapMme * m_s1apSapMme
Definition: epc-mme.h:184
void RemoveBearer(Ptr< UeInfo > ueInfo, uint8_t epsBearerId)
This Function erases all contexts of bearer from MME side.
Definition: epc-mme.cc:270
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:253
EpcS11SapMme * m_s11SapMme
Definition: epc-mme.h:186
Ipv4Address s1uAddr
Definition: epc-mme.h:171
uint16_t bearerCounter
Definition: epc-mme.h:148
void DoCreateSessionResponse(EpcS11SapMme::CreateSessionResponseMessage msg)
Definition: epc-mme.cc:179
static TypeId GetTypeId(void)
Definition: epc-mme.cc:58
Hold info on an EPS bearer to be activated.
Definition: epc-mme.h:130
EpcS1apSapEnb * s1apSapEnb
Definition: epc-mme.h:172
Create Session Response message, see 3GPP TS 29.274 7.2.2.
Definition: epc-s11-sap.h:93