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-phy.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
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: Giuseppe Piro <g.piro@poliba.it>
19
* Author: Marco Miozzo <mmiozzo@cttc.es>
20
*/
21
22
#ifndef LTE_UE_PHY_H
23
#define LTE_UE_PHY_H
24
25
26
#include <ns3/lte-phy.h>
27
#include <ns3/ff-mac-common.h>
28
29
#include <ns3/lte-control-messages.h>
30
#include <ns3/lte-amc.h>
31
#include <ns3/lte-ue-phy-sap.h>
32
#include <ns3/lte-ue-cphy-sap.h>
33
#include <ns3/ptr.h>
34
#include <ns3/lte-amc.h>
35
36
37
namespace
ns3 {
38
39
class
PacketBurst;
40
class
LteEnbPhy;
41
class
LteHarqPhy;
42
48
class
LteUePhy
:
public
LtePhy
49
{
50
51
friend
class
UeMemberLteUePhySapProvider
;
52
friend
class
MemberLteUeCphySapProvider
<
LteUePhy
>;
53
54
public
:
58
LteUePhy
();
59
65
LteUePhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy);
66
67
virtual
~LteUePhy
();
68
69
// inherited from Object
70
static
TypeId
GetTypeId
(
void
);
71
virtual
void
DoInitialize
(
void
);
72
virtual
void
DoDispose
(
void
);
73
78
LteUePhySapProvider
*
GetLteUePhySapProvider
();
79
84
void
SetLteUePhySapUser
(
LteUePhySapUser
* s);
85
90
LteUeCphySapProvider
*
GetLteUeCphySapProvider
();
91
96
void
SetLteUeCphySapUser
(
LteUeCphySapUser
* s);
97
98
102
void
SetTxPower
(
double
pow);
103
107
double
GetTxPower
()
const
;
111
void
SetNoiseFigure
(
double
pow);
112
116
double
GetNoiseFigure
()
const
;
117
121
uint8_t
GetMacChDelay
(
void
)
const
;
122
126
Ptr<LteSpectrumPhy>
GetDlSpectrumPhy
()
const
;
127
131
Ptr<LteSpectrumPhy>
GetUlSpectrumPhy
()
const
;
132
133
138
virtual
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
();
139
144
void
SetSubChannelsForTransmission
(std::vector <int> mask);
149
std::vector <int>
GetSubChannelsForTransmission
(
void
);
150
155
void
SetSubChannelsForReception
(std::vector <int> mask);
160
std::vector <int>
GetSubChannelsForReception
(
void
);
161
162
168
Ptr<DlCqiLteControlMessage>
CreateDlCqiFeedbackMessage
(
const
SpectrumValue
& sinr);
169
170
171
172
// inherited from LtePhy
173
virtual
void
GenerateCtrlCqiReport
(
const
SpectrumValue
& sinr);
174
virtual
void
GenerateDataCqiReport
(
const
SpectrumValue
& sinr);
175
virtual
void
ReportInterference
(
const
SpectrumValue
& interf);
176
virtual
void
ReportRsReceivedPower
(
const
SpectrumValue
& power);
177
178
virtual
void
ReceiveLteControlMessageList
(
std::list
<
Ptr<LteControlMessage>
>);
179
180
181
182
186
void
PhyPduReceived
(
Ptr<Packet>
p);
187
188
195
void
SubframeIndication
(uint32_t frameNo, uint32_t subframeNo);
196
197
201
void
SendSrs
();
202
206
virtual
void
ReceiveLteDlHarqFeedback
(
DlInfoListElement_s
mes);
207
211
void
SetHarqPhyModule
(
Ptr<LteHarqPhy>
harq);
212
213
214
215
216
private
:
217
218
void
SetTxMode1Gain
(
double
gain);
219
void
SetTxMode2Gain
(
double
gain);
220
void
SetTxMode3Gain
(
double
gain);
221
void
SetTxMode4Gain
(
double
gain);
222
void
SetTxMode5Gain
(
double
gain);
223
void
SetTxMode6Gain
(
double
gain);
224
void
SetTxMode7Gain
(
double
gain);
225
void
SetTxModeGain
(uint8_t txMode,
double
gain);
226
227
void
QueueSubChannelsForTransmission
(std::vector <int> rbMap);
228
229
// UE CPHY SAP methods
230
void
DoReset
();
231
void
DoSyncronizeWithEnb
(uint16_t cellId, uint16_t dlEarfcn);
232
void
DoSetDlBandwidth
(uint8_t ulBandwidth);
233
void
DoConfigureUplink
(uint16_t ulEarfcn, uint8_t ulBandwidth);
234
void
DoSetRnti
(uint16_t rnti);
235
void
DoSetTransmissionMode
(uint8_t txMode);
236
void
DoSetSrsConfigurationIndex
(uint16_t srcCi);
237
238
// UE PHY SAP methods
239
virtual
void
DoSendMacPdu
(
Ptr<Packet>
p);
240
virtual
void
DoSendLteControlMessage
(
Ptr<LteControlMessage>
msg);
241
virtual
void
DoSendRachPreamble
(uint32_t prachId, uint32_t raRnti);
242
243
std::vector <int>
m_subChannelsForTransmission
;
244
std::vector <int>
m_subChannelsForReception
;
245
246
std::vector< std::vector <int> >
m_subChannelsForTransmissionQueue
;
247
248
249
Ptr<LteAmc>
m_amc
;
250
251
Time
m_p10CqiPeriocity
;
252
Time
m_p10CqiLast
;
253
255
// NOTE defines a periodicity for academic studies
256
Time
m_a30CqiPeriocity
;
257
Time
m_a30CqiLast
;
258
259
LteUePhySapProvider
*
m_uePhySapProvider
;
260
LteUePhySapUser
*
m_uePhySapUser
;
261
262
LteUeCphySapProvider
*
m_ueCphySapProvider
;
263
LteUeCphySapUser
*
m_ueCphySapUser
;
264
265
uint16_t
m_rnti
;
266
267
uint8_t
m_transmissionMode
;
268
std::vector <double>
m_txModeGain
;
269
270
uint16_t
m_srsPeriodicity
;
271
uint16_t
m_srsSubframeOffset
;
272
uint16_t
m_srsConfigured
;
273
Time
m_srsStartTime
;
274
275
bool
m_dlConfigured
;
276
bool
m_ulConfigured
;
277
278
bool
m_rsReceivedPowerUpdated
;
279
SpectrumValue
m_rsReceivedPower
;
280
281
Ptr<LteHarqPhy>
m_harqPhyModule
;
282
283
uint32_t
m_raPreambleId
;
284
uint32_t
m_raRnti
;
285
290
TracedCallback<uint16_t, uint16_t, double, double>
m_reportCurrentCellRsrpSinrTrace
;
291
uint16_t
m_rsrpSinrSamplePeriod
;
292
uint16_t
m_rsrpSinrSampleCounter
;
293
294
EventId
m_sendSrsEvent
;
295
300
TracedCallback<PhyTransmissionStatParameters>
m_ulPhyTransmission
;
301
302
};
303
304
305
}
306
307
#endif
/* LTE_UE_PHY_H */
src
lte
model
lte-ue-phy.h
Generated on Tue May 14 2013 11:08:26 for ns-3 by
1.8.1.2