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-enb-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_ENB_CPHY_SAP_H
23
#define LTE_ENB_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
class
LteEnbNetDevice;
33
40
class
LteEnbCphySapProvider
41
{
42
public
:
43
47
virtual
~LteEnbCphySapProvider
();
48
54
virtual
void
SetCellId
(uint16_t cellId) = 0;
55
60
virtual
void
SetBandwidth
(uint8_t ulBandwidth, uint8_t dlBandwidth) = 0;
61
66
virtual
void
SetEarfcn
(uint16_t ulEarfcn, uint16_t dlEarfcn) = 0;
67
73
virtual
void
AddUe
(uint16_t rnti) = 0;
74
80
virtual
void
RemoveUe
(uint16_t rnti) = 0;
81
86
virtual
void
SetTransmissionMode
(uint16_t rnti, uint8_t txMode) = 0;
87
92
virtual
void
SetSrsConfigurationIndex
(uint16_t rnti, uint16_t srsCi) = 0;
93
98
virtual
void
SetMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib) = 0;
99
};
100
101
108
class
LteEnbCphySapUser
109
{
110
public
:
111
115
virtual
~LteEnbCphySapUser
();
116
117
};
118
119
125
template
<
class
C>
126
class
MemberLteEnbCphySapProvider
:
public
LteEnbCphySapProvider
127
{
128
public
:
129
MemberLteEnbCphySapProvider
(C* owner);
130
131
// inherited from LteEnbCphySapProvider
132
virtual
void
SetCellId
(uint16_t cellId);
133
virtual
void
SetBandwidth
(uint8_t ulBandwidth, uint8_t dlBandwidth);
134
virtual
void
SetEarfcn
(uint16_t ulEarfcn, uint16_t dlEarfcn);
135
virtual
void
AddUe
(uint16_t rnti);
136
virtual
void
RemoveUe
(uint16_t rnti);
137
virtual
void
SetTransmissionMode
(uint16_t rnti, uint8_t txMode);
138
virtual
void
SetSrsConfigurationIndex
(uint16_t rnti, uint16_t srsCi);
139
virtual
void
SetMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib);
140
141
private
:
142
MemberLteEnbCphySapProvider
();
143
C*
m_owner
;
144
};
145
146
template
<
class
C>
147
MemberLteEnbCphySapProvider<C>::MemberLteEnbCphySapProvider
(C* owner)
148
: m_owner (owner)
149
{
150
}
151
152
template
<
class
C>
153
MemberLteEnbCphySapProvider<C>::MemberLteEnbCphySapProvider
()
154
{
155
}
156
157
template
<
class
C>
158
void
159
MemberLteEnbCphySapProvider<C>::SetCellId
(uint16_t cellId)
160
{
161
m_owner->DoSetCellId (cellId);
162
}
163
164
165
template
<
class
C>
166
void
167
MemberLteEnbCphySapProvider<C>::SetBandwidth
(uint8_t ulBandwidth, uint8_t dlBandwidth)
168
{
169
m_owner->DoSetBandwidth (ulBandwidth, dlBandwidth);
170
}
171
172
template
<
class
C>
173
void
174
MemberLteEnbCphySapProvider<C>::SetEarfcn
(uint16_t ulEarfcn, uint16_t dlEarfcn)
175
{
176
m_owner->DoSetEarfcn (ulEarfcn, dlEarfcn);
177
}
178
179
template
<
class
C>
180
void
181
MemberLteEnbCphySapProvider<C>::AddUe
(uint16_t rnti)
182
{
183
m_owner->DoAddUe (rnti);
184
}
185
186
template
<
class
C>
187
void
188
MemberLteEnbCphySapProvider<C>::RemoveUe
(uint16_t rnti)
189
{
190
m_owner->DoRemoveUe (rnti);
191
}
192
193
template
<
class
C>
194
void
195
MemberLteEnbCphySapProvider<C>::SetTransmissionMode
(uint16_t rnti, uint8_t txMode)
196
{
197
m_owner->DoSetTransmissionMode (rnti, txMode);
198
}
199
200
template
<
class
C>
201
void
202
MemberLteEnbCphySapProvider<C>::SetSrsConfigurationIndex
(uint16_t rnti, uint16_t srsCi)
203
{
204
m_owner->DoSetSrsConfigurationIndex (rnti, srsCi);
205
}
206
207
template
<
class
C>
208
void
209
MemberLteEnbCphySapProvider<C>::SetMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib)
210
{
211
m_owner->DoSetMasterInformationBlock (mib);
212
}
213
214
215
221
template
<
class
C>
222
class
MemberLteEnbCphySapUser
:
public
LteEnbCphySapUser
223
{
224
public
:
225
MemberLteEnbCphySapUser
(C* owner);
226
227
// methods inherited from LteEnbCphySapUser go here
228
229
private
:
230
MemberLteEnbCphySapUser
();
231
C*
m_owner
;
232
};
233
234
template
<
class
C>
235
MemberLteEnbCphySapUser<C>::MemberLteEnbCphySapUser
(C* owner)
236
: m_owner (owner)
237
{
238
}
239
240
template
<
class
C>
241
MemberLteEnbCphySapUser<C>::MemberLteEnbCphySapUser
()
242
{
243
}
244
245
246
247
248
249
250
}
// namespace ns3
251
252
253
#endif // LTE_ENB_CPHY_SAP_H
src
lte
model
lte-enb-cphy-sap.h
Generated on Tue May 14 2013 11:08:25 for ns-3 by
1.8.1.2