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
virtual
void
RecvMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib) = 0;
117
};
118
119
120
121
127
template
<
class
C>
128
class
MemberLteUeCphySapProvider
:
public
LteUeCphySapProvider
129
{
130
public
:
131
MemberLteUeCphySapProvider
(C* owner);
132
133
// inherited from LteUeCphySapProvider
134
virtual
void
Reset
();
135
virtual
void
SyncronizeWithEnb
(uint16_t cellId, uint16_t dlEarfcn);
136
virtual
void
SetDlBandwidth
(uint8_t ulBandwidth);
137
virtual
void
ConfigureUplink
(uint16_t ulEarfcn, uint8_t ulBandwidth);
138
virtual
void
SetRnti
(uint16_t rnti);
139
virtual
void
SetTransmissionMode
(uint8_t txMode);
140
virtual
void
SetSrsConfigurationIndex
(uint16_t srcCi);
141
142
private
:
143
MemberLteUeCphySapProvider
();
144
C*
m_owner
;
145
};
146
147
template
<
class
C>
148
MemberLteUeCphySapProvider<C>::MemberLteUeCphySapProvider
(C* owner)
149
: m_owner (owner)
150
{
151
}
152
153
template
<
class
C>
154
MemberLteUeCphySapProvider<C>::MemberLteUeCphySapProvider
()
155
{
156
}
157
158
template
<
class
C>
159
void
160
MemberLteUeCphySapProvider<C>::Reset
()
161
{
162
m_owner->DoReset ();
163
}
164
165
template
<
class
C>
166
void
167
MemberLteUeCphySapProvider<C>::SyncronizeWithEnb
(uint16_t cellId, uint16_t dlEarfcn)
168
{
169
m_owner->DoSyncronizeWithEnb (cellId, dlEarfcn);
170
}
171
172
template
<
class
C>
173
void
174
MemberLteUeCphySapProvider<C>::SetDlBandwidth
(uint8_t dlBandwidth)
175
{
176
m_owner->DoSetDlBandwidth (dlBandwidth);
177
}
178
179
template
<
class
C>
180
void
181
MemberLteUeCphySapProvider<C>::ConfigureUplink
(uint16_t ulEarfcn, uint8_t ulBandwidth)
182
{
183
m_owner->DoConfigureUplink (ulEarfcn, ulBandwidth);
184
}
185
186
template
<
class
C>
187
void
188
MemberLteUeCphySapProvider<C>::SetRnti
(uint16_t rnti)
189
{
190
m_owner->DoSetRnti (rnti);
191
}
192
193
template
<
class
C>
194
void
195
MemberLteUeCphySapProvider<C>::SetTransmissionMode
(uint8_t txMode)
196
{
197
m_owner->DoSetTransmissionMode (txMode);
198
}
199
200
template
<
class
C>
201
void
202
MemberLteUeCphySapProvider<C>::SetSrsConfigurationIndex
(uint16_t srcCi)
203
{
204
m_owner->DoSetSrsConfigurationIndex (srcCi);
205
}
206
207
208
214
template
<
class
C>
215
class
MemberLteUeCphySapUser
:
public
LteUeCphySapUser
216
{
217
public
:
218
MemberLteUeCphySapUser
(C* owner);
219
220
// methods inherited from LteUeCphySapUser go here
221
virtual
void
RecvMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib);
222
223
private
:
224
MemberLteUeCphySapUser
();
225
C*
m_owner
;
226
};
227
228
template
<
class
C>
229
MemberLteUeCphySapUser<C>::MemberLteUeCphySapUser
(C* owner)
230
: m_owner (owner)
231
{
232
}
233
234
template
<
class
C>
235
MemberLteUeCphySapUser<C>::MemberLteUeCphySapUser
()
236
{
237
}
238
239
template
<
class
C>
240
void
241
MemberLteUeCphySapUser<C>::RecvMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib)
242
{
243
m_owner->DoRecvMasterInformationBlock (mib);
244
}
245
246
247
248
249
}
// namespace ns3
250
251
252
#endif // LTE_UE_CPHY_SAP_H
src
lte
model
lte-ue-cphy-sap.h
Generated on Tue May 14 2013 11:08:26 for ns-3 by
1.8.1.2