A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
epc-enb-s1-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.es>
18 */
19
20#ifndef EPC_ENB_S1_SAP_H
21#define EPC_ENB_S1_SAP_H
22
23#include "eps-bearer.h"
24
25#include <ns3/ipv4-address.h>
26
27#include <list>
28
29namespace ns3
30{
31
32/**
33 * This class implements the Service Access Point (SAP) between the
34 * LteEnbRrc and the EpcEnbApplication. In particular, this class implements the
35 * Provider part of the SAP, i.e., the methods exported by the
36 * EpcEnbApplication and called by the LteEnbRrc.
37 */
39{
40 public:
41 virtual ~EpcEnbS1SapProvider();
42
43 /**
44 * Initial UE message.
45 *
46 * \param imsi IMSI
47 * \param rnti RNTI
48 */
49 virtual void InitialUeMessage(uint64_t imsi, uint16_t rnti) = 0;
50
51 /**
52 * \brief Triggers epc-enb-application to send ERAB Release Indication message towards MME
53 * \param imsi the UE IMSI
54 * \param rnti the UE RNTI
55 * \param bearerId Bearer Identity which is to be de-activated
56 */
57 virtual void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId) = 0;
58
59 /// BearerToBeSwitched structure
61 {
62 uint8_t epsBearerId; ///< Bearer ID
63 uint32_t teid; ///< TEID
64 };
65
66 /// PathSwitchRequestParameters structure
68 {
69 uint16_t rnti; ///< RNTI
70 uint16_t cellId; ///< cell ID
71 uint32_t mmeUeS1Id; ///< mmeUeS1Id in practice, we use the IMSI
72 std::list<BearerToBeSwitched> bearersToBeSwitched; ///< list of bearers to be switched
73 };
74
75 /**
76 * Path Switch Request
77 *
78 * \param params
79 */
81
82 /**
83 * Release UE context at the S1 Application of the source eNB after
84 * reception of the UE CONTEXT RELEASE X2 message from the target eNB
85 * during X2-based handover
86 *
87 * \param rnti RNTI
88 */
89 virtual void UeContextRelease(uint16_t rnti) = 0;
90};
91
92/**
93 * This class implements the Service Access Point (SAP) between the
94 * LteEnbRrc and the EpcEnbApplication. In particular, this class implements the
95 * User part of the SAP, i.e., the methods exported by the LteEnbRrc
96 * and called by the EpcEnbApplication.
97 */
99{
100 public:
101 virtual ~EpcEnbS1SapUser();
102
103 /**
104 * Parameters passed to InitialContextSetupRequest ()
105 */
107 {
108 uint16_t rnti; /**< the RNTI identifying the UE */
109 };
110
111 /**
112 * Initial context setup request
113 *
114 * \param params Parameters
115 */
117
118 /**
119 * Parameters passed to DataRadioBearerSetupRequest ()
120 */
122 {
123 uint16_t rnti; /**< the RNTI identifying the UE for which the
124 DataRadioBearer is to be created */
125 EpsBearer bearer; /**< the characteristics of the bearer to be setup */
126 uint8_t bearerId; /**< the EPS Bearer Identifier */
127 uint32_t gtpTeid; /**< S1-bearer GTP tunnel endpoint identifier, see 36.423 9.2.1 */
128 Ipv4Address transportLayerAddress; /**< IP Address of the SGW, see 36.423 9.2.1 */
129 };
130
131 /**
132 * Request the setup of a DataRadioBearer
133 *
134 * \param params Parameters
135 */
137
138 /// PathSwitchRequestAcknowledgeParameters structure
140 {
141 uint16_t rnti; ///< RNTI
142 };
143
144 /**
145 * Request a path switch acknowledge
146 *
147 * \param params Parameters
148 */
150};
151
152/**
153 * Template for the implementation of the EpcEnbS1SapProvider as a member
154 * of an owner class of type C to which all methods are forwarded
155 */
156template <class C>
158{
159 public:
160 /**
161 * Constructor
162 *
163 * \param owner the owner class
164 */
166
167 // Delete default constructor to avoid misuse
169
170 // inherited from EpcEnbS1SapProvider
171 void InitialUeMessage(uint64_t imsi, uint16_t rnti) override;
172 void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId) override;
173
175 void UeContextRelease(uint16_t rnti) override;
176
177 private:
178 C* m_owner; ///< owner class
179};
180
181template <class C>
183 : m_owner(owner)
184{
185}
186
187template <class C>
188void
190{
191 m_owner->DoInitialUeMessage(imsi, rnti);
192}
193
194template <class C>
195void
197 uint16_t rnti,
198 uint8_t bearerId)
199{
200 m_owner->DoReleaseIndication(imsi, rnti, bearerId);
201}
202
203template <class C>
204void
206{
207 m_owner->DoPathSwitchRequest(params);
208}
209
210template <class C>
211void
213{
214 m_owner->DoUeContextRelease(rnti);
215}
216
217/**
218 * Template for the implementation of the EpcEnbS1SapUser as a member
219 * of an owner class of type C to which all methods are forwarded
220 */
221template <class C>
223{
224 public:
225 /**
226 * Constructor
227 *
228 * \param owner the owner class
229 */
230 MemberEpcEnbS1SapUser(C* owner);
231
232 // Delete default constructor to avoid misuse
234
235 // inherited from EpcEnbS1SapUser
239
240 private:
241 C* m_owner; ///< owner class
242};
243
244template <class C>
246 : m_owner(owner)
247{
248}
249
250template <class C>
251void
253{
254 m_owner->DoInitialContextSetupRequest(params);
255}
256
257template <class C>
258void
260{
261 m_owner->DoDataRadioBearerSetupRequest(params);
262}
263
264template <class C>
265void
268{
269 m_owner->DoPathSwitchRequestAcknowledge(params);
270}
271
272} // namespace ns3
273
274#endif // EPC_ENB_S1_SAP_H
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
virtual void UeContextRelease(uint16_t rnti)=0
Release UE context at the S1 Application of the source eNB after reception of the UE CONTEXT RELEASE ...
virtual void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId)=0
Triggers epc-enb-application to send ERAB Release Indication message towards MME.
virtual void PathSwitchRequest(PathSwitchRequestParameters params)=0
Path Switch Request.
virtual void InitialUeMessage(uint64_t imsi, uint16_t rnti)=0
Initial UE message.
This class implements the Service Access Point (SAP) between the LteEnbRrc and the EpcEnbApplication.
virtual void PathSwitchRequestAcknowledge(PathSwitchRequestAcknowledgeParameters params)=0
Request a path switch acknowledge.
virtual void DataRadioBearerSetupRequest(DataRadioBearerSetupRequestParameters params)=0
Request the setup of a DataRadioBearer.
virtual void InitialContextSetupRequest(InitialContextSetupRequestParameters params)=0
Initial context setup request.
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 EpcEnbS1SapProvider as a member of an owner class of type C to...
void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId) override
Triggers epc-enb-application to send ERAB Release Indication message towards MME.
void InitialUeMessage(uint64_t imsi, uint16_t rnti) override
Initial UE message.
void PathSwitchRequest(PathSwitchRequestParameters params) override
Path Switch Request.
void UeContextRelease(uint16_t rnti) override
Release UE context at the S1 Application of the source eNB after reception of the UE CONTEXT RELEASE ...
Template for the implementation of the EpcEnbS1SapUser as a member of an owner class of type C to whi...
void DataRadioBearerSetupRequest(DataRadioBearerSetupRequestParameters params) override
Request the setup of a DataRadioBearer.
void PathSwitchRequestAcknowledge(PathSwitchRequestAcknowledgeParameters params) override
Request a path switch acknowledge.
void InitialContextSetupRequest(InitialContextSetupRequestParameters params) override
Initial context setup request.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
PathSwitchRequestParameters structure.
std::list< BearerToBeSwitched > bearersToBeSwitched
list of bearers to be switched
uint32_t mmeUeS1Id
mmeUeS1Id in practice, we use the IMSI
Parameters passed to DataRadioBearerSetupRequest ()
EpsBearer bearer
the characteristics of the bearer to be setup
uint16_t rnti
the RNTI identifying the UE for which the DataRadioBearer is to be created
uint32_t gtpTeid
S1-bearer GTP tunnel endpoint identifier, see 36.423 9.2.1.
Ipv4Address transportLayerAddress
IP Address of the SGW, see 36.423 9.2.1.
Parameters passed to InitialContextSetupRequest ()
PathSwitchRequestAcknowledgeParameters structure.