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 <ns3/eps-bearer.h>
24 #include <ns3/ipv4-address.h>
25 
26 #include <list>
27 
28 namespace ns3
29 {
30 
38 {
39  public:
40  virtual ~EpcEnbS1SapProvider();
41 
48  virtual void InitialUeMessage(uint64_t imsi, uint16_t rnti) = 0;
49 
56  virtual void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId) = 0;
57 
60  {
61  uint8_t epsBearerId;
62  uint32_t teid;
63  };
64 
67  {
68  uint16_t rnti;
69  uint16_t cellId;
70  uint32_t mmeUeS1Id;
71  std::list<BearerToBeSwitched> bearersToBeSwitched;
72  };
73 
80 
88  virtual void UeContextRelease(uint16_t rnti) = 0;
89 };
90 
98 {
99  public:
100  virtual ~EpcEnbS1SapUser();
101 
106  {
107  uint16_t rnti;
108  };
109 
116 
121  {
122  uint16_t rnti;
125  uint8_t bearerId;
126  uint32_t gtpTeid;
128  };
129 
136 
139  {
140  uint16_t rnti;
141  };
142 
149 };
150 
155 template <class C>
157 {
158  public:
164  MemberEpcEnbS1SapProvider(C* owner);
165 
166  // Delete default constructor to avoid misuse
168 
169  // inherited from EpcEnbS1SapProvider
170  void InitialUeMessage(uint64_t imsi, uint16_t rnti) override;
171  void DoSendReleaseIndication(uint64_t imsi, uint16_t rnti, uint8_t bearerId) override;
172 
174  void UeContextRelease(uint16_t rnti) override;
175 
176  private:
177  C* m_owner;
178 };
179 
180 template <class C>
182  : m_owner(owner)
183 {
184 }
185 
186 template <class C>
187 void
189 {
190  m_owner->DoInitialUeMessage(imsi, rnti);
191 }
192 
193 template <class C>
194 void
196  uint16_t rnti,
197  uint8_t bearerId)
198 {
199  m_owner->DoReleaseIndication(imsi, rnti, bearerId);
200 }
201 
202 template <class C>
203 void
205 {
206  m_owner->DoPathSwitchRequest(params);
207 }
208 
209 template <class C>
210 void
212 {
213  m_owner->DoUeContextRelease(rnti);
214 }
215 
220 template <class C>
222 {
223  public:
229  MemberEpcEnbS1SapUser(C* owner);
230 
231  // Delete default constructor to avoid misuse
233 
234  // inherited from EpcEnbS1SapUser
238 
239  private:
240  C* m_owner;
241 };
242 
243 template <class C>
245  : m_owner(owner)
246 {
247 }
248 
249 template <class C>
250 void
252 {
253  m_owner->DoInitialContextSetupRequest(params);
254 }
255 
256 template <class C>
257 void
259 {
260  m_owner->DoDataRadioBearerSetupRequest(params);
261 }
262 
263 template <class C>
264 void
267 {
268  m_owner->DoPathSwitchRequestAcknowledge(params);
269 }
270 
271 } // namespace ns3
272 
273 #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:43
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.