A Discrete-Event Network Simulator
API
epc-s1ap-sap.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Nicola Baldo <nbaldo@cttc.cat>
18  */
19 
20 #ifndef EPC_S1AP_SAP_H
21 #define EPC_S1AP_SAP_H
22 
23 #include "eps-bearer.h"
24 
25 #include <ns3/address.h>
26 #include <ns3/ipv4-address.h>
27 #include <ns3/object.h>
28 #include <ns3/ptr.h>
29 
30 #include <list>
31 
32 namespace ns3
33 {
34 
41 {
42  public:
43  virtual ~EpcS1apSap();
44 };
45 
52 class EpcS1apSapMme : public EpcS1apSap
53 {
54  public:
63  virtual void InitialUeMessage(uint64_t mmeUeS1Id,
64  uint16_t enbUeS1Id,
65  uint64_t stmsi,
66  uint16_t ecgi) = 0;
67 
72  {
73  uint8_t erabId;
74  };
75 
85  virtual void ErabReleaseIndication(
86  uint64_t mmeUeS1Id,
87  uint16_t enbUeS1Id,
88  std::list<ErabToBeReleasedIndication> erabToBeReleaseIndication) = 0;
89 
94  {
95  uint16_t erabId;
97  uint32_t enbTeid;
98  };
99 
108  virtual void InitialContextSetupResponse(uint64_t mmeUeS1Id,
109  uint16_t enbUeS1Id,
110  std::list<ErabSetupItem> erabSetupList) = 0;
111 
116  {
117  uint16_t erabId;
119  uint32_t enbTeid;
120  };
121 
130  virtual void PathSwitchRequest(
131  uint64_t enbUeS1Id,
132  uint64_t mmeUeS1Id,
133  uint16_t gci,
134  std::list<ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList) = 0;
135 };
136 
143 class EpcS1apSapEnb : public EpcS1apSap
144 {
145  public:
148  {
149  uint8_t erabId;
152  uint32_t sgwTeid;
153  };
154 
162  virtual void InitialContextSetupRequest(uint64_t mmeUeS1Id,
163  uint16_t enbUeS1Id,
164  std::list<ErabToBeSetupItem> erabToBeSetupList) = 0;
165 
170  {
171  uint8_t erabId;
173  uint32_t enbTeid;
174  };
175 
185  uint64_t enbUeS1Id,
186  uint64_t mmeUeS1Id,
187  uint16_t cgi,
188  std::list<ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList) = 0;
189 };
190 
195 template <class C>
197 {
198  public:
204  MemberEpcS1apSapMme(C* owner);
205 
206  // Delete default constructor to avoid misuse
208 
209  // inherited from EpcS1apSapMme
217  void InitialUeMessage(uint64_t mmeUeS1Id,
218  uint16_t enbUeS1Id,
219  uint64_t imsi,
220  uint16_t ecgi) override;
228  uint64_t mmeUeS1Id,
229  uint16_t enbUeS1Id,
230  std::list<ErabToBeReleasedIndication> erabToBeReleaseIndication) override;
231 
238  void InitialContextSetupResponse(uint64_t mmeUeS1Id,
239  uint16_t enbUeS1Id,
240  std::list<ErabSetupItem> erabSetupList) override;
248  void PathSwitchRequest(
249  uint64_t enbUeS1Id,
250  uint64_t mmeUeS1Id,
251  uint16_t cgi,
252  std::list<ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList) override;
253 
254  private:
255  C* m_owner;
256 };
257 
258 template <class C>
260  : m_owner(owner)
261 {
262 }
263 
264 template <class C>
265 void
267  uint16_t enbUeS1Id,
268  uint64_t imsi,
269  uint16_t ecgi)
270 {
271  m_owner->DoInitialUeMessage(mmeUeS1Id, enbUeS1Id, imsi, ecgi);
272 }
273 
274 template <class C>
275 void
277  uint64_t mmeUeS1Id,
278  uint16_t enbUeS1Id,
279  std::list<ErabToBeReleasedIndication> erabToBeReleaseIndication)
280 {
281  m_owner->DoErabReleaseIndication(mmeUeS1Id, enbUeS1Id, erabToBeReleaseIndication);
282 }
283 
284 template <class C>
285 void
287  uint16_t enbUeS1Id,
288  std::list<ErabSetupItem> erabSetupList)
289 {
290  m_owner->DoInitialContextSetupResponse(mmeUeS1Id, enbUeS1Id, erabSetupList);
291 }
292 
293 template <class C>
294 void
296  uint64_t enbUeS1Id,
297  uint64_t mmeUeS1Id,
298  uint16_t cgi,
299  std::list<ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList)
300 {
301  m_owner->DoPathSwitchRequest(enbUeS1Id, mmeUeS1Id, cgi, erabToBeSwitchedInDownlinkList);
302 }
303 
308 template <class C>
310 {
311  public:
317  MemberEpcS1apSapEnb(C* owner);
318 
319  // Delete default constructor to avoid misuse
321 
322  // inherited from EpcS1apSapEnb
329  void InitialContextSetupRequest(uint64_t mmeUeS1Id,
330  uint16_t enbUeS1Id,
331  std::list<ErabToBeSetupItem> erabToBeSetupList) override;
340  uint64_t enbUeS1Id,
341  uint64_t mmeUeS1Id,
342  uint16_t cgi,
343  std::list<ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList) override;
344 
345  private:
346  C* m_owner;
347 };
348 
349 template <class C>
351  : m_owner(owner)
352 {
353 }
354 
355 template <class C>
356 void
358  uint16_t enbUeS1Id,
359  std::list<ErabToBeSetupItem> erabToBeSetupList)
360 {
361  m_owner->DoInitialContextSetupRequest(mmeUeS1Id, enbUeS1Id, erabToBeSetupList);
362 }
363 
364 template <class C>
365 void
367  uint64_t enbUeS1Id,
368  uint64_t mmeUeS1Id,
369  uint16_t cgi,
370  std::list<ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList)
371 {
372  m_owner->DoPathSwitchRequestAcknowledge(enbUeS1Id,
373  mmeUeS1Id,
374  cgi,
375  erabToBeSwitchedInUplinkList);
376 }
377 
378 } // namespace ns3
379 
380 #endif /* EPC_S1AP_SAP_H */
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:144
virtual void PathSwitchRequestAcknowledge(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< ErabSwitchedInUplinkItem > erabToBeSwitchedInUplinkList)=0
PATH SWITCH REQUEST ACKNOWLEDGE message, see 3GPP TS 36.413 9.1.5.9.
virtual void InitialContextSetupRequest(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabToBeSetupItem > erabToBeSetupList)=0
Initial context setup request.
Base class that defines EPC S1-AP Service Access Point (SAP) interface.
Definition: epc-s1ap-sap.h:41
virtual ~EpcS1apSap()
Definition: epc-s1ap-sap.cc:25
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
virtual void InitialContextSetupResponse(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabSetupItem > erabSetupList)=0
INITIAL CONTEXT SETUP RESPONSE message, see 3GPP TS 36.413 9.1.4.2.
virtual void InitialUeMessage(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t stmsi, uint16_t ecgi)=0
Initial UE message.
virtual void ErabReleaseIndication(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabToBeReleasedIndication > erabToBeReleaseIndication)=0
As per 3GPP TS 36.413 version 9.8.0 section 8.2.3.2.2, the eNB indicates bearer release by sending an...
virtual void PathSwitchRequest(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t gci, std::list< ErabSwitchedInDownlinkItem > erabToBeSwitchedInDownlinkList)=0
PATH SWITCH REQUEST message, see 3GPP TS 36.413 9.1.5.8.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
Template for the implementation of the EpcS1apSapEnb as a member of an owner class of type C to which...
Definition: epc-s1ap-sap.h:310
void InitialContextSetupRequest(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabToBeSetupItem > erabToBeSetupList) override
Initial context setup request function.
Definition: epc-s1ap-sap.h:357
void PathSwitchRequestAcknowledge(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< ErabSwitchedInUplinkItem > erabToBeSwitchedInUplinkList) override
Path switch request acknowledge function.
Definition: epc-s1ap-sap.h:366
C * m_owner
owner class
Definition: epc-s1ap-sap.h:346
Template for the implementation of the EpcS1apSapMme as a member of an owner class of type C to which...
Definition: epc-s1ap-sap.h:197
void PathSwitchRequest(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< ErabSwitchedInDownlinkItem > erabToBeSwitchedInDownlinkList) override
Path switch request.
Definition: epc-s1ap-sap.h:295
void InitialUeMessage(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi) override
Initial UE Message function.
Definition: epc-s1ap-sap.h:266
C * m_owner
owner class
Definition: epc-s1ap-sap.h:255
void ErabReleaseIndication(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabToBeReleasedIndication > erabToBeReleaseIndication) override
ERAB Release Indiation function.
Definition: epc-s1ap-sap.h:276
void InitialContextSetupResponse(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabSetupItem > erabSetupList) override
Initial context setup response.
Definition: epc-s1ap-sap.h:286
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ErabToBeSetupItem structure.
Definition: epc-s1ap-sap.h:148
EpsBearer erabLevelQosParameters
Level QOS parameters.
Definition: epc-s1ap-sap.h:150
Ipv4Address transportLayerAddress
transport layer address
Definition: epc-s1ap-sap.h:151
E-RAB Setup Item IEs, see 3GPP TS 36.413 9.1.4.2.
Definition: epc-s1ap-sap.h:94
Ipv4Address enbTransportLayerAddress
transport layer address
Definition: epc-s1ap-sap.h:96
E-RAB Release Indication Item IEs, 3GPP TS 36.413 version 9.8.0 section 9.1.3.7.
Definition: epc-s1ap-sap.h:72