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 <ns3/address.h>
24#include <ns3/epc-tft.h>
25#include <ns3/eps-bearer.h>
26#include <ns3/object.h>
27#include <ns3/ptr.h>
28
29#include <list>
30
31namespace ns3
32{
33
40{
41 public:
42 virtual ~EpcS1apSap();
43};
44
52{
53 public:
62 virtual void InitialUeMessage(uint64_t mmeUeS1Id,
63 uint16_t enbUeS1Id,
64 uint64_t stmsi,
65 uint16_t ecgi) = 0;
66
71 {
72 uint8_t erabId;
73 };
74
85 uint64_t mmeUeS1Id,
86 uint16_t enbUeS1Id,
87 std::list<ErabToBeReleasedIndication> erabToBeReleaseIndication) = 0;
88
93 {
94 uint16_t erabId;
97 };
98
107 virtual void InitialContextSetupResponse(uint64_t mmeUeS1Id,
108 uint16_t enbUeS1Id,
109 std::list<ErabSetupItem> erabSetupList) = 0;
110
115 {
116 uint16_t erabId;
119 };
120
129 virtual void PathSwitchRequest(
130 uint64_t enbUeS1Id,
131 uint64_t mmeUeS1Id,
132 uint16_t gci,
133 std::list<ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList) = 0;
134};
135
143{
144 public:
147 {
148 uint8_t erabId;
152 };
153
161 virtual void InitialContextSetupRequest(uint64_t mmeUeS1Id,
162 uint16_t enbUeS1Id,
163 std::list<ErabToBeSetupItem> erabToBeSetupList) = 0;
164
169 {
170 uint8_t erabId;
173 };
174
184 uint64_t enbUeS1Id,
185 uint64_t mmeUeS1Id,
186 uint16_t cgi,
187 std::list<ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList) = 0;
188};
189
194template <class C>
196{
197 public:
203 MemberEpcS1apSapMme(C* owner);
204
205 // Delete default constructor to avoid misuse
207
208 // inherited from EpcS1apSapMme
216 void InitialUeMessage(uint64_t mmeUeS1Id,
217 uint16_t enbUeS1Id,
218 uint64_t imsi,
219 uint16_t ecgi) override;
227 uint64_t mmeUeS1Id,
228 uint16_t enbUeS1Id,
229 std::list<ErabToBeReleasedIndication> erabToBeReleaseIndication) override;
230
237 void InitialContextSetupResponse(uint64_t mmeUeS1Id,
238 uint16_t enbUeS1Id,
239 std::list<ErabSetupItem> erabSetupList) override;
248 uint64_t enbUeS1Id,
249 uint64_t mmeUeS1Id,
250 uint16_t cgi,
251 std::list<ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList) override;
252
253 private:
255};
256
257template <class C>
259 : m_owner(owner)
260{
261}
262
263template <class C>
264void
266 uint16_t enbUeS1Id,
267 uint64_t imsi,
268 uint16_t ecgi)
269{
270 m_owner->DoInitialUeMessage(mmeUeS1Id, enbUeS1Id, imsi, ecgi);
271}
272
273template <class C>
274void
276 uint64_t mmeUeS1Id,
277 uint16_t enbUeS1Id,
278 std::list<ErabToBeReleasedIndication> erabToBeReleaseIndication)
279{
280 m_owner->DoErabReleaseIndication(mmeUeS1Id, enbUeS1Id, erabToBeReleaseIndication);
281}
282
283template <class C>
284void
286 uint16_t enbUeS1Id,
287 std::list<ErabSetupItem> erabSetupList)
288{
289 m_owner->DoInitialContextSetupResponse(mmeUeS1Id, enbUeS1Id, erabSetupList);
290}
291
292template <class C>
293void
295 uint64_t enbUeS1Id,
296 uint64_t mmeUeS1Id,
297 uint16_t cgi,
298 std::list<ErabSwitchedInDownlinkItem> erabToBeSwitchedInDownlinkList)
299{
300 m_owner->DoPathSwitchRequest(enbUeS1Id, mmeUeS1Id, cgi, erabToBeSwitchedInDownlinkList);
301}
302
307template <class C>
309{
310 public:
316 MemberEpcS1apSapEnb(C* owner);
317
318 // Delete default constructor to avoid misuse
320
321 // inherited from EpcS1apSapEnb
328 void InitialContextSetupRequest(uint64_t mmeUeS1Id,
329 uint16_t enbUeS1Id,
330 std::list<ErabToBeSetupItem> erabToBeSetupList) override;
339 uint64_t enbUeS1Id,
340 uint64_t mmeUeS1Id,
341 uint16_t cgi,
342 std::list<ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList) override;
343
344 private:
346};
347
348template <class C>
350 : m_owner(owner)
351{
352}
353
354template <class C>
355void
357 uint16_t enbUeS1Id,
358 std::list<ErabToBeSetupItem> erabToBeSetupList)
359{
360 m_owner->DoInitialContextSetupRequest(mmeUeS1Id, enbUeS1Id, erabToBeSetupList);
361}
362
363template <class C>
364void
366 uint64_t enbUeS1Id,
367 uint64_t mmeUeS1Id,
368 uint16_t cgi,
369 std::list<ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList)
370{
371 m_owner->DoPathSwitchRequestAcknowledge(enbUeS1Id,
372 mmeUeS1Id,
373 cgi,
374 erabToBeSwitchedInUplinkList);
375}
376
377} // namespace ns3
378
379#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:143
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:40
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:52
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:309
void InitialContextSetupRequest(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabToBeSetupItem > erabToBeSetupList) override
Initial context setup request function.
Definition: epc-s1ap-sap.h:356
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:365
C * m_owner
owner class
Definition: epc-s1ap-sap.h:345
Template for the implementation of the EpcS1apSapMme as a member of an owner class of type C to which...
Definition: epc-s1ap-sap.h:196
void PathSwitchRequest(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< ErabSwitchedInDownlinkItem > erabToBeSwitchedInDownlinkList) override
Path switch request.
Definition: epc-s1ap-sap.h:294
void InitialUeMessage(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi) override
Initial UE Message function.
Definition: epc-s1ap-sap.h:265
C * m_owner
owner class
Definition: epc-s1ap-sap.h:254
void ErabReleaseIndication(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabToBeReleasedIndication > erabToBeReleaseIndication) override
ERAB Release Indiation function.
Definition: epc-s1ap-sap.h:275
void InitialContextSetupResponse(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< ErabSetupItem > erabSetupList) override
Initial context setup response.
Definition: epc-s1ap-sap.h:285
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ErabToBeSetupItem structure.
Definition: epc-s1ap-sap.h:147
EpsBearer erabLevelQosParameters
Level QOS parameters.
Definition: epc-s1ap-sap.h:149
Ipv4Address transportLayerAddress
transport layer address
Definition: epc-s1ap-sap.h:150
E-RAB Setup Item IEs, see 3GPP TS 36.413 9.1.4.2.
Definition: epc-s1ap-sap.h:93
Ipv4Address enbTransportLayerAddress
transport layer address
Definition: epc-s1ap-sap.h:95
E-RAB Release Indication Item IEs, 3GPP TS 36.413 version 9.8.0 section 9.1.3.7.
Definition: epc-s1ap-sap.h:71