A Discrete-Event Network Simulator
API
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 
29 namespace ns3
30 {
31 
39 {
40  public:
41  virtual ~EpcEnbS1SapProvider();
42 
49  virtual void InitialUeMessage(uint64_t imsi, uint16_t rnti) = 0;
50 
57  virtual void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId) = 0;
58 
61  {
62  uint8_t epsBearerId;
63  uint32_t teid;
64  };
65 
68  {
69  uint16_t rnti;
70  uint16_t cellId;
71  uint32_t mmeUeS1Id;
72  std::list<BearerToBeSwitched> bearersToBeSwitched;
73  };
74 
81 
89  virtual void UeContextRelease(uint16_t rnti) = 0;
90 };
91 
99 {
100  public:
101  virtual ~EpcEnbS1SapUser();
102 
107  {
108  uint16_t rnti;
109  };
110 
117 
122  {
123  uint16_t rnti;
126  uint8_t bearerId;
127  uint32_t gtpTeid;
129  };
130 
137 
140  {
141  uint16_t rnti;
142  };
143 
150 };
151 
156 template <class C>
158 {
159  public:
165  MemberEpcEnbS1SapProvider(C* owner);
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;
179 };
180 
181 template <class C>
183  : m_owner(owner)
184 {
185 }
186 
187 template <class C>
188 void
190 {
191  m_owner->DoInitialUeMessage(imsi, rnti);
192 }
193 
194 template <class C>
195 void
197  uint16_t rnti,
198  uint8_t bearerId)
199 {
200  m_owner->DoReleaseIndication(imsi, rnti, bearerId);
201 }
202 
203 template <class C>
204 void
206 {
207  m_owner->DoPathSwitchRequest(params);
208 }
209 
210 template <class C>
211 void
213 {
214  m_owner->DoUeContextRelease(rnti);
215 }
216 
221 template <class C>
223 {
224  public:
230  MemberEpcEnbS1SapUser(C* owner);
231 
232  // Delete default constructor to avoid misuse
234 
235  // inherited from EpcEnbS1SapUser
239 
240  private:
241  C* m_owner;
242 };
243 
244 template <class C>
246  : m_owner(owner)
247 {
248 }
249 
250 template <class C>
251 void
253 {
254  m_owner->DoInitialContextSetupRequest(params);
255 }
256 
257 template <class C>
258 void
260 {
261  m_owner->DoDataRadioBearerSetupRequest(params);
262 }
263 
264 template <class C>
265 void
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.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
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.