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 egci, 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