A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
lte-ue-cphy-sap.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011, 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
* Marco Miozzo <mmiozzo@cttc.es>
20
*/
21
22
#ifndef LTE_UE_CPHY_SAP_H
23
#define LTE_UE_CPHY_SAP_H
24
25
#include <stdint.h>
26
#include <ns3/ptr.h>
27
28
#include <ns3/lte-rrc-sap.h>
29
30
namespace
ns3 {
31
32
33
class
LteEnbNetDevice;
34
41
class
LteUeCphySapProvider
42
{
43
public
:
44
48
virtual
~LteUeCphySapProvider
();
49
54
virtual
void
Reset
() = 0;
55
62
virtual
void
SyncronizeWithEnb
(uint16_t cellId, uint16_t dlEarfcn) = 0;
63
67
virtual
void
SetDlBandwidth
(uint8_t dlBandwidth) = 0;
68
75
virtual
void
ConfigureUplink
(uint16_t ulEarfcn, uint8_t ulBandwidth) = 0;
76
81
virtual
void
SetRnti
(uint16_t rnti) = 0;
82
86
virtual
void
SetTransmissionMode
(uint8_t txMode) = 0;
87
91
virtual
void
SetSrsConfigurationIndex
(uint16_t srcCi) = 0;
92
93
};
94
95
102
class
LteUeCphySapUser
103
{
104
public
:
105
109
virtual
~LteUeCphySapUser
();
110
111
116
struct
UeMeasurementsElement
117
{
118
uint16_t
m_cellId
;
119
double
m_rsrp
;
// [dBm]
120
double
m_rsrq
;
// [dB]
121
};
122
struct
UeMeasurementsParameters
123
{
124
std::vector <struct UeMeasurementsElement>
m_ueMeasurementsList
;
125
};
126
127
132
virtual
void
RecvMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib) = 0;
133
138
virtual
void
ReportUeMeasurements
(
UeMeasurementsParameters
params) = 0;
139
};
140
141
142
143
149
template
<
class
C>
150
class
MemberLteUeCphySapProvider
:
public
LteUeCphySapProvider
151
{
152
public
:
153
MemberLteUeCphySapProvider
(C* owner);
154
155
// inherited from LteUeCphySapProvider
156
virtual
void
Reset
();
157
virtual
void
SyncronizeWithEnb
(uint16_t cellId, uint16_t dlEarfcn);
158
virtual
void
SetDlBandwidth
(uint8_t ulBandwidth);
159
virtual
void
ConfigureUplink
(uint16_t ulEarfcn, uint8_t ulBandwidth);
160
virtual
void
SetRnti
(uint16_t rnti);
161
virtual
void
SetTransmissionMode
(uint8_t txMode);
162
virtual
void
SetSrsConfigurationIndex
(uint16_t srcCi);
163
164
private
:
165
MemberLteUeCphySapProvider
();
166
C*
m_owner
;
167
};
168
169
template
<
class
C>
170
MemberLteUeCphySapProvider<C>::MemberLteUeCphySapProvider
(C* owner)
171
: m_owner (owner)
172
{
173
}
174
175
template
<
class
C>
176
MemberLteUeCphySapProvider<C>::MemberLteUeCphySapProvider
()
177
{
178
}
179
180
template
<
class
C>
181
void
182
MemberLteUeCphySapProvider<C>::Reset
()
183
{
184
m_owner->DoReset ();
185
}
186
187
template
<
class
C>
188
void
189
MemberLteUeCphySapProvider<C>::SyncronizeWithEnb
(uint16_t cellId, uint16_t dlEarfcn)
190
{
191
m_owner->DoSyncronizeWithEnb (cellId, dlEarfcn);
192
}
193
194
template
<
class
C>
195
void
196
MemberLteUeCphySapProvider<C>::SetDlBandwidth
(uint8_t dlBandwidth)
197
{
198
m_owner->DoSetDlBandwidth (dlBandwidth);
199
}
200
201
template
<
class
C>
202
void
203
MemberLteUeCphySapProvider<C>::ConfigureUplink
(uint16_t ulEarfcn, uint8_t ulBandwidth)
204
{
205
m_owner->DoConfigureUplink (ulEarfcn, ulBandwidth);
206
}
207
208
template
<
class
C>
209
void
210
MemberLteUeCphySapProvider<C>::SetRnti
(uint16_t rnti)
211
{
212
m_owner->DoSetRnti (rnti);
213
}
214
215
template
<
class
C>
216
void
217
MemberLteUeCphySapProvider<C>::SetTransmissionMode
(uint8_t txMode)
218
{
219
m_owner->DoSetTransmissionMode (txMode);
220
}
221
222
template
<
class
C>
223
void
224
MemberLteUeCphySapProvider<C>::SetSrsConfigurationIndex
(uint16_t srcCi)
225
{
226
m_owner->DoSetSrsConfigurationIndex (srcCi);
227
}
228
229
230
236
template
<
class
C>
237
class
MemberLteUeCphySapUser
:
public
LteUeCphySapUser
238
{
239
public
:
240
MemberLteUeCphySapUser
(C* owner);
241
242
// methods inherited from LteUeCphySapUser go here
243
virtual
void
RecvMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib);
244
245
virtual
void
ReportUeMeasurements
(
LteUeCphySapUser::UeMeasurementsParameters
params);
246
247
private
:
248
MemberLteUeCphySapUser
();
249
C*
m_owner
;
250
};
251
252
template
<
class
C>
253
MemberLteUeCphySapUser<C>::MemberLteUeCphySapUser
(C* owner)
254
: m_owner (owner)
255
{
256
}
257
258
template
<
class
C>
259
MemberLteUeCphySapUser<C>::MemberLteUeCphySapUser
()
260
{
261
}
262
263
template
<
class
C>
264
void
265
MemberLteUeCphySapUser<C>::RecvMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib)
266
{
267
m_owner->DoRecvMasterInformationBlock (mib);
268
}
269
270
template
<
class
C>
271
void
272
MemberLteUeCphySapUser<C>::ReportUeMeasurements
(
LteUeCphySapUser::UeMeasurementsParameters
params)
273
{
274
m_owner->DoReportUeMeasurements (params);
275
}
276
277
278
}
// namespace ns3
279
280
281
#endif // LTE_UE_CPHY_SAP_H
src
lte
model
lte-ue-cphy-sap.h
Generated on Fri Aug 30 2013 01:42:55 for ns-3 by
1.8.1.2