A Discrete-Event Network Simulator
API
lte-as-sap.h
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Author: Nicola Baldo <nbaldo@cttc.es>
19 */
20
21
22#ifndef LTE_AS_SAP_H
23#define LTE_AS_SAP_H
24
25#include <stdint.h>
26#include <ns3/ptr.h>
27#include <ns3/packet.h>
28
29namespace ns3 {
30
40{
41public:
42 virtual ~LteAsSapProvider ();
43
50 virtual void SetCsgWhiteList (uint32_t csgId) = 0;
51
57 virtual void StartCellSelection (uint32_t dlEarfcn) = 0;
58
65 virtual void ForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn) = 0;
66
75 virtual void Connect (void) = 0;
76
83 virtual void SendData (Ptr<Packet> packet, uint8_t bid) = 0;
84
85
90 virtual void Disconnect () = 0;
91
92};
93
94
104{
105public:
106 virtual ~LteAsSapUser ();
107
112 virtual void NotifyConnectionSuccessful () = 0;
113
118 virtual void NotifyConnectionFailed () = 0;
119
120
125 virtual void NotifyConnectionReleased () = 0;
126
132 virtual void RecvData (Ptr<Packet> packet) = 0;
133
134};
135
136
137
138
144template <class C>
146{
147public:
153 MemberLteAsSapProvider (C* owner);
154
155 // inherited from LteAsSapProvider
156 virtual void SetCsgWhiteList (uint32_t csgId);
157 virtual void StartCellSelection (uint32_t dlEarfcn);
158 virtual void ForceCampedOnEnb (uint16_t cellId, uint32_t dlEarfcn);
159 virtual void Connect (void);
160 virtual void SendData (Ptr<Packet> packet, uint8_t bid);
161 virtual void Disconnect ();
162
163private:
166};
167
168template <class C>
170 : m_owner (owner)
171{
172}
173
174template <class C>
176{
177}
178
179template <class C>
180void
182{
183 m_owner->DoSetCsgWhiteList (csgId);
184}
185
186template <class C>
187void
189{
190 m_owner->DoStartCellSelection (dlEarfcn);
191}
192
193template <class C>
194void
196{
197 m_owner->DoForceCampedOnEnb (cellId, dlEarfcn);
198}
199
200template <class C>
201void
203{
204 m_owner->DoConnect ();
205}
206
207template <class C>
208void
210{
211 m_owner->DoSendData (packet, bid);
212}
213
214template <class C>
215void
217{
218 m_owner->DoDisconnect ();
219}
220
221
227template <class C>
229{
230public:
236 MemberLteAsSapUser (C* owner);
237
238 // inherited from LteAsSapUser
239 virtual void NotifyConnectionSuccessful ();
240 virtual void NotifyConnectionFailed ();
241 virtual void RecvData (Ptr<Packet> packet);
242 virtual void NotifyConnectionReleased ();
243
244private:
247};
248
249template <class C>
251 : m_owner (owner)
252{
253}
254
255template <class C>
257{
258}
259
260template <class C>
261void
263{
264 m_owner->DoNotifyConnectionSuccessful ();
265}
266
267template <class C>
268void
270{
271 m_owner->DoNotifyConnectionFailed ();
272}
273
274template <class C>
275void
277{
278 m_owner->DoRecvData (packet);
279}
280
281template <class C>
282void
284{
285 m_owner->DoNotifyConnectionReleased ();
286}
287
288
289} // namespace ns3
290
291#endif // LTE_AS_SAP_H
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
Definition: lte-as-sap.h:40
virtual void SetCsgWhiteList(uint32_t csgId)=0
Set the selected Closed Subscriber Group subscription list to be used for cell selection.
virtual void StartCellSelection(uint32_t dlEarfcn)=0
Initiate Idle mode cell selection procedure.
virtual void Disconnect()=0
Tell the RRC entity to release the connection.
virtual void SendData(Ptr< Packet > packet, uint8_t bid)=0
Send a data packet.
virtual void ForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn)=0
Force the RRC entity to stay camped on a certain eNodeB.
virtual ~LteAsSapProvider()
Definition: lte-as-sap.cc:25
virtual void Connect(void)=0
Tell the RRC entity to enter Connected mode.
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
Definition: lte-as-sap.h:104
virtual void NotifyConnectionFailed()=0
Notify the NAS that RRC Connection Establishment failed.
virtual ~LteAsSapUser()
Definition: lte-as-sap.cc:29
virtual void NotifyConnectionSuccessful()=0
Notify the NAS that RRC Connection Establishment was successful.
virtual void NotifyConnectionReleased()=0
Notify the NAS that RRC Connection was released.
virtual void RecvData(Ptr< Packet > packet)=0
receive a data packet
Template for the implementation of the LteAsSapProvider as a member of an owner class of type C to wh...
Definition: lte-as-sap.h:146
virtual void Connect(void)
Tell the RRC entity to enter Connected mode.
Definition: lte-as-sap.h:202
virtual void Disconnect()
Tell the RRC entity to release the connection.
Definition: lte-as-sap.h:216
virtual void ForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn)
Force the RRC entity to stay camped on a certain eNodeB.
Definition: lte-as-sap.h:195
C * m_owner
the owner class
Definition: lte-as-sap.h:165
virtual void SendData(Ptr< Packet > packet, uint8_t bid)
Send a data packet.
Definition: lte-as-sap.h:209
virtual void SetCsgWhiteList(uint32_t csgId)
Set the selected Closed Subscriber Group subscription list to be used for cell selection.
Definition: lte-as-sap.h:181
virtual void StartCellSelection(uint32_t dlEarfcn)
Initiate Idle mode cell selection procedure.
Definition: lte-as-sap.h:188
Template for the implementation of the LteAsSapUser as a member of an owner class of type C to which ...
Definition: lte-as-sap.h:229
virtual void NotifyConnectionReleased()
Notify the NAS that RRC Connection was released.
Definition: lte-as-sap.h:283
virtual void NotifyConnectionFailed()
Notify the NAS that RRC Connection Establishment failed.
Definition: lte-as-sap.h:269
virtual void RecvData(Ptr< Packet > packet)
receive a data packet
Definition: lte-as-sap.h:276
C * m_owner
the owner class
Definition: lte-as-sap.h:246
virtual void NotifyConnectionSuccessful()
Notify the NAS that RRC Connection Establishment was successful.
Definition: lte-as-sap.h:262
Every class exported by the ns3 library is enclosed in the ns3 namespace.