A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-as-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 LTE_AS_SAP_H
21#define LTE_AS_SAP_H
22
23#include <ns3/packet.h>
24#include <ns3/ptr.h>
25
26#include <stdint.h>
27
28namespace ns3
29{
30
39{
40 public:
41 virtual ~LteAsSapProvider();
42
49 virtual void SetCsgWhiteList(uint32_t csgId) = 0;
50
56 virtual void StartCellSelection(uint32_t dlEarfcn) = 0;
57
64 virtual void ForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn) = 0;
65
74 virtual void Connect() = 0;
75
82 virtual void SendData(Ptr<Packet> packet, uint8_t bid) = 0;
83
87 virtual void Disconnect() = 0;
88};
89
98{
99 public:
100 virtual ~LteAsSapUser();
101
105 virtual void NotifyConnectionSuccessful() = 0;
106
110 virtual void NotifyConnectionFailed() = 0;
111
115 virtual void NotifyConnectionReleased() = 0;
116
122 virtual void RecvData(Ptr<Packet> packet) = 0;
123};
124
129template <class C>
131{
132 public:
138 MemberLteAsSapProvider(C* owner);
139
140 // Delete default constructor to avoid misuse
142
143 // inherited from LteAsSapProvider
144 void SetCsgWhiteList(uint32_t csgId) override;
145 void StartCellSelection(uint32_t dlEarfcn) override;
146 void ForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn) override;
147 void Connect() override;
148 void SendData(Ptr<Packet> packet, uint8_t bid) override;
149 void Disconnect() override;
150
151 private:
153};
154
155template <class C>
157 : m_owner(owner)
158{
159}
160
161template <class C>
162void
164{
165 m_owner->DoSetCsgWhiteList(csgId);
166}
167
168template <class C>
169void
171{
172 m_owner->DoStartCellSelection(dlEarfcn);
173}
174
175template <class C>
176void
178{
179 m_owner->DoForceCampedOnEnb(cellId, dlEarfcn);
180}
181
182template <class C>
183void
185{
186 m_owner->DoConnect();
187}
188
189template <class C>
190void
192{
193 m_owner->DoSendData(packet, bid);
194}
195
196template <class C>
197void
199{
200 m_owner->DoDisconnect();
201}
202
207template <class C>
209{
210 public:
216 MemberLteAsSapUser(C* owner);
217
218 // Delete default constructor to avoid misuse
220
221 // inherited from LteAsSapUser
222 void NotifyConnectionSuccessful() override;
223 void NotifyConnectionFailed() override;
224 void RecvData(Ptr<Packet> packet) override;
225 void NotifyConnectionReleased() override;
226
227 private:
229};
230
231template <class C>
233 : m_owner(owner)
234{
235}
236
237template <class C>
238void
240{
241 m_owner->DoNotifyConnectionSuccessful();
242}
243
244template <class C>
245void
247{
248 m_owner->DoNotifyConnectionFailed();
249}
250
251template <class C>
252void
254{
255 m_owner->DoRecvData(packet);
256}
257
258template <class C>
259void
261{
262 m_owner->DoNotifyConnectionReleased();
263}
264
265} // namespace ns3
266
267#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:39
virtual void SetCsgWhiteList(uint32_t csgId)=0
Set the selected Closed Subscriber Group subscription list to be used for cell selection.
virtual void Connect()=0
Tell the RRC entity to enter Connected mode.
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
This class implements the Access Stratum (AS) Service Access Point (SAP), i.e., the interface between...
Definition: lte-as-sap.h:98
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:131
void ForceCampedOnEnb(uint16_t cellId, uint32_t dlEarfcn) override
Force the RRC entity to stay camped on a certain eNodeB.
Definition: lte-as-sap.h:177
void SetCsgWhiteList(uint32_t csgId) override
Set the selected Closed Subscriber Group subscription list to be used for cell selection.
Definition: lte-as-sap.h:163
C * m_owner
the owner class
Definition: lte-as-sap.h:152
void StartCellSelection(uint32_t dlEarfcn) override
Initiate Idle mode cell selection procedure.
Definition: lte-as-sap.h:170
void SendData(Ptr< Packet > packet, uint8_t bid) override
Send a data packet.
Definition: lte-as-sap.h:191
void Disconnect() override
Tell the RRC entity to release the connection.
Definition: lte-as-sap.h:198
void Connect() override
Tell the RRC entity to enter Connected mode.
Definition: lte-as-sap.h:184
Template for the implementation of the LteAsSapUser as a member of an owner class of type C to which ...
Definition: lte-as-sap.h:209
void NotifyConnectionReleased() override
Notify the NAS that RRC Connection was released.
Definition: lte-as-sap.h:260
void NotifyConnectionFailed() override
Notify the NAS that RRC Connection Establishment failed.
Definition: lte-as-sap.h:246
void RecvData(Ptr< Packet > packet) override
receive a data packet
Definition: lte-as-sap.h:253
void NotifyConnectionSuccessful() override
Notify the NAS that RRC Connection Establishment was successful.
Definition: lte-as-sap.h:239
C * m_owner
the owner class
Definition: lte-as-sap.h:228
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Every class exported by the ns3 library is enclosed in the ns3 namespace.