A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  void 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 
119 
120  // S11 SAP MME forwarded methods
123 
128  struct BearerInfo
129  {
132  uint8_t bearerId;
133  };
134 
139  struct UeInfo : public SimpleRefCount<UeInfo>
140  {
141  uint64_t mmeUeS1Id;
142  uint16_t enbUeS1Id;
143  uint64_t imsi;
144  uint16_t cellId;
145  std::list<BearerInfo> bearersToBeActivated;
146  uint16_t bearerCounter;
147  };
148 
153  std::map<uint64_t, Ptr<UeInfo> > m_ueInfoMap;
154 
159  struct EnbInfo : public SimpleRefCount<EnbInfo>
160  {
161  uint16_t gci;
164  };
165 
170  std::map<uint16_t, Ptr<EnbInfo> > m_enbInfoMap;
171 
172 
173 
174 
176 
179 
180 };
181 
182 
183 
184 
185 } // namespace ns3
186 
187 #endif // EPC_MME_H
void AddUe(uint64_t imsi)
Add a new UE to the MME.
Definition: epc-mme.cc:100
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:60
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:208
std::map< uint16_t, Ptr< EnbInfo > > m_enbInfoMap
EnbInfo stored by EGCI.
Definition: epc-mme.h:170
EpcS1apSapMme * GetS1apSapMme()
Definition: epc-mme.cc:71
This object implements the MME functionality.
Definition: epc-mme.h:40
void 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:111
EpcS11SapSgw * m_s11SapSgw
Definition: epc-mme.h:178
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
Hold info on a ENB.
Definition: epc-mme.h:159
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:113
EpcS11SapMme * GetS11SapMme()
Definition: epc-mme.cc:83
uint64_t mmeUeS1Id
Definition: epc-mme.h:141
Ptr< SampleEmitter > s
Hold info on a UE.
Definition: epc-mme.h:139
virtual ~EpcMme()
Destructor.
Definition: epc-mme.cc:47
Ptr< EpcTft > tft
Definition: epc-mme.h:130
std::list< BearerInfo > bearersToBeActivated
Definition: epc-mme.h:145
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: epc-mme.cc:53
uint16_t enbUeS1Id
Definition: epc-mme.h:142
void DoInitialUeMessage(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi)
Definition: epc-mme.cc:128
uint16_t cellId
Definition: epc-mme.h:144
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:38
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:135
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoMap
UeInfo stored by IMSI.
Definition: epc-mme.h:153
void DoInitialContextSetupResponse(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabSetupItem > erabSetupList)
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:89
void DoPathSwitchRequest(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< EpcS1apSapMme::ErabSwitchedInDownlinkItem > erabToBeSwitchedInDownlinkList)
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:170
a base class which provides memory management and object aggregation
Definition: object.h:64
Modify Bearer Response message, see 3GPP TS 29.274 7.2.7.
Definition: epc-s11-sap.h:110
EpcMme()
Constructor.
Definition: epc-mme.cc:38
EpcS1apSapMme * m_s1apSapMme
Definition: epc-mme.h:175
A template-based reference counting class.
void SetS11SapSgw(EpcS11SapSgw *s)
Set the SGW side of the S11 SAP.
Definition: epc-mme.cc:77
a unique identifier for an interface.
Definition: type-id.h:49
Template for the implementation of the EpcS11SapMme as a member of an owner class of type C to which ...
Definition: epc-s11-sap.h:195
EpcS11SapMme * m_s11SapMme
Definition: epc-mme.h:177
Ipv4Address s1uAddr
Definition: epc-mme.h:162
uint16_t bearerCounter
Definition: epc-mme.h:146
void DoCreateSessionResponse(EpcS11SapMme::CreateSessionResponseMessage msg)
Definition: epc-mme.cc:180
static TypeId GetTypeId(void)
Definition: epc-mme.cc:61
Hold info on an EPS bearer to be activated.
Definition: epc-mme.h:128
EpcS1apSapEnb * s1apSapEnb
Definition: epc-mme.h:163
Create Session Response message, see 3GPP TS 29.274 7.2.2.
Definition: epc-s11-sap.h:93