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-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 <marco.miozzo@cttc.es>
20
*/
21
22
#ifndef ENB_LTE_PHY_H
23
#define ENB_LTE_PHY_H
24
25
26
#include <ns3/lte-control-messages.h>
27
#include <ns3/lte-enb-phy-sap.h>
28
#include <ns3/lte-enb-cphy-sap.h>
29
#include <ns3/lte-phy.h>
30
#include <ns3/lte-harq-phy.h>
31
32
#include <map>
33
#include <set>
34
35
36
37
namespace
ns3 {
38
39
class
PacketBurst;
40
class
LteNetDevice;
41
class
LteUePhy;
42
47
class
LteEnbPhy
:
public
LtePhy
48
{
49
friend
class
EnbMemberLteEnbPhySapProvider
;
50
friend
class
MemberLteEnbCphySapProvider
<
LteEnbPhy
>;
51
52
public
:
56
LteEnbPhy
();
57
63
LteEnbPhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy);
64
65
virtual
~LteEnbPhy
();
66
67
// inherited from Object
68
static
TypeId
GetTypeId
(
void
);
69
virtual
void
DoInitialize
(
void
);
70
virtual
void
DoDispose
(
void
);
71
72
77
LteEnbPhySapProvider
*
GetLteEnbPhySapProvider
();
78
83
void
SetLteEnbPhySapUser
(
LteEnbPhySapUser
* s);
84
89
LteEnbCphySapProvider
*
GetLteEnbCphySapProvider
();
90
95
void
SetLteEnbCphySapUser
(
LteEnbCphySapUser
* s);
96
100
void
SetTxPower
(
double
pow);
101
105
double
GetTxPower
()
const
;
106
107
111
void
SetNoiseFigure
(
double
pow);
112
116
double
GetNoiseFigure
()
const
;
117
121
void
SetMacChDelay
(uint8_t delay);
122
126
uint8_t
GetMacChDelay
(
void
)
const
;
127
131
Ptr<LteSpectrumPhy>
GetDlSpectrumPhy
()
const
;
132
136
Ptr<LteSpectrumPhy>
GetUlSpectrumPhy
()
const
;
137
138
147
void
SetDownlinkSubChannels
(std::vector<int> mask );
148
149
157
std::vector<int>
GetDownlinkSubChannels
(
void
);
158
162
virtual
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
();
163
169
void
CalcChannelQualityForUe
(std::vector <double> sinr,
Ptr<LteSpectrumPhy>
ue);
170
175
virtual
void
ReceiveLteControlMessage
(
Ptr<LteControlMessage>
msg);
176
182
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters
CreatePuschCqiReport
(
const
SpectrumValue
& sinr);
183
189
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters
CreateSrsCqiReport
(
const
SpectrumValue
& sinr);
190
195
void
SendControlChannels
(
std::list
<
Ptr<LteControlMessage>
> ctrlMsgList);
196
201
void
SendDataChannels
(
Ptr<PacketBurst>
pb);
202
206
void
QueueUlDci
(
UlDciLteControlMessage
m);
207
211
std::list<UlDciLteControlMessage>
DequeueUlDci
(
void
);
212
213
217
void
StartFrame
(
void
);
221
void
StartSubFrame
(
void
);
225
void
EndSubFrame
(
void
);
229
void
EndFrame
(
void
);
230
234
void
PhyPduReceived
(
Ptr<Packet>
p);
235
239
virtual
void
ReceiveLteControlMessageList
(
std::list
<
Ptr<LteControlMessage>
>);
240
241
// inherited from LtePhy
242
virtual
void
GenerateCtrlCqiReport
(
const
SpectrumValue
& sinr);
243
virtual
void
GenerateDataCqiReport
(
const
SpectrumValue
& sinr);
244
virtual
void
ReportInterference
(
const
SpectrumValue
& interf);
245
virtual
void
ReportRsReceivedPower
(
const
SpectrumValue
& interf);
246
247
248
252
virtual
void
ReceiveLteUlHarqFeedback
(
UlInfoListElement_s
mes);
253
254
void
SetHarqPhyModule
(
Ptr<LteHarqPhy>
harq);
255
256
257
private
:
258
259
// LteEnbCphySapProvider forwarded methods
260
void
DoSetBandwidth
(uint8_t ulBandwidth, uint8_t dlBandwidth);
261
void
DoSetEarfcn
(uint16_t dlEarfcn, uint16_t ulEarfcn);
262
void
DoAddUe
(uint16_t rnti);
263
void
DoRemoveUe
(uint16_t rnti);
264
void
DoSetTransmissionMode
(uint16_t rnti, uint8_t txMode);
265
void
DoSetSrsConfigurationIndex
(uint16_t rnti, uint16_t srcCi);
266
void
DoSetMasterInformationBlock
(
LteRrcSap::MasterInformationBlock
mib);
267
268
// LteEnbPhySapProvider forwarded methods
269
void
DoSendMacPdu
(
Ptr<Packet>
p);
270
void
DoSendLteControlMessage
(
Ptr<LteControlMessage>
msg);
271
uint8_t
DoGetMacChTtiDelay
();
272
273
bool
AddUePhy
(uint16_t rnti);
274
275
bool
DeleteUePhy
(uint16_t rnti);
276
277
void
CreateSrsReport
(uint16_t rnti,
double
srs);
278
279
280
std::set <uint16_t>
m_ueAttached
;
281
282
std::vector <int>
m_listOfDownlinkSubchannel
;
283
284
std::vector <int>
m_dlDataRbMap
;
285
286
std::vector< std::list<UlDciLteControlMessage> >
m_ulDciQueue
;
// for storing info on future receptions
287
288
LteEnbPhySapProvider
*
m_enbPhySapProvider
;
289
LteEnbPhySapUser
*
m_enbPhySapUser
;
290
291
LteEnbCphySapProvider
*
m_enbCphySapProvider
;
292
LteEnbCphySapUser
*
m_enbCphySapUser
;
293
294
uint32_t
m_nrFrames
;
295
uint32_t
m_nrSubFrames
;
296
297
uint16_t
m_srsPeriodicity
;
298
Time
m_srsStartTime
;
299
std::map <uint16_t,uint16_t>
m_srsCounter
;
300
std::vector <uint16_t>
m_srsUeOffset
;
301
uint16_t
m_currentSrsOffset
;
302
303
LteRrcSap::MasterInformationBlock
m_mib
;
304
305
Ptr<LteHarqPhy>
m_harqPhyModule
;
306
311
TracedCallback<uint16_t, uint16_t, double>
m_reportUeSinr
;
312
uint16_t
m_srsSamplePeriod
;
313
std::map <uint16_t,uint16_t>
m_srsSampleCounterMap
;
314
320
TracedCallback<uint16_t, Ptr<SpectrumValue>
>
m_reportInterferenceTrace
;
321
uint16_t
m_interferenceSamplePeriod
;
322
uint16_t
m_interferenceSampleCounter
;
323
328
TracedCallback<PhyTransmissionStatParameters>
m_dlPhyTransmission
;
329
330
};
331
332
333
}
334
335
#endif
/* LTE_ENB_PHY_H */
src
lte
model
lte-enb-phy.h
Generated on Tue May 14 2013 11:08:25 for ns-3 by
1.8.1.2