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-enb-phy-sap.h>
27
#include <ns3/lte-phy.h>
28
#include <ns3/lte-ue-phy.h>
29
30
#include <map>
31
#include <set>
32
33
34
35
namespace
ns3 {
36
37
class
PacketBurst;
38
class
LteNetDevice;
39
44
class
LteEnbPhy
:
public
LtePhy
45
{
46
47
friend
class
EnbMemberLteEnbPhySapProvider
;
48
49
public
:
53
LteEnbPhy
();
54
60
LteEnbPhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy);
61
62
virtual
~LteEnbPhy
();
63
64
// inherited from Object
65
static
TypeId
GetTypeId
(
void
);
66
virtual
void
DoStart
(
void
);
67
virtual
void
DoDispose
(
void
);
68
69
74
LteEnbPhySapProvider
*
GetLteEnbPhySapProvider
();
75
80
void
SetLteEnbPhySapUser
(
LteEnbPhySapUser
* s);
81
85
void
SetTxPower
(
double
pow);
86
90
double
GetTxPower
()
const
;
91
92
96
void
SetNoiseFigure
(
double
pow);
97
101
double
GetNoiseFigure
()
const
;
102
106
void
SetMacChDelay
(uint8_t delay);
107
111
uint8_t
GetMacChDelay
(
void
)
const
;
112
117
virtual
void
DoSendMacPdu
(
Ptr<Packet>
p);
118
119
virtual
void
DoSetTransmissionMode
(uint16_t rnti, uint8_t txMode);
120
121
virtual
void
DoSetSrsConfigurationIndex
(uint16_t rnti, uint16_t srcCi);
122
123
virtual
uint8_t
DoGetMacChTtiDelay
();
124
133
void
SetDownlinkSubChannels
(std::vector<int> mask );
134
135
143
std::vector<int>
GetDownlinkSubChannels
(
void
);
144
148
virtual
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
();
149
155
void
CalcChannelQualityForUe
(std::vector <double> sinr,
Ptr<LteSpectrumPhy>
ue);
156
161
virtual
void
ReceiveLteControlMessage
(
Ptr<LteControlMessage>
msg);
162
168
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters
CreatePuschCqiReport
(
const
SpectrumValue
& sinr);
169
175
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters
CreateSrsCqiReport
(
const
SpectrumValue
& sinr);
176
177
178
void
DoSendLteControlMessage
(
Ptr<LteControlMessage>
msg);
179
180
bool
AddUePhy
(uint16_t rnti);
181
182
bool
DeleteUePhy
(uint16_t rnti);
183
188
void
SendControlChannels
(
std::list
<
Ptr<LteControlMessage>
> ctrlMsgList);
189
194
void
SendDataChannels
(
Ptr<PacketBurst>
pb);
195
199
void
QueueUlDci
(
UlDciLteControlMessage
m);
200
204
std::list<UlDciLteControlMessage>
DequeueUlDci
(
void
);
205
206
210
void
StartFrame
(
void
);
214
void
StartSubFrame
(
void
);
218
void
EndSubFrame
(
void
);
222
void
EndFrame
(
void
);
223
227
void
PhyPduReceived
(
Ptr<Packet>
p);
228
232
virtual
void
ReceiveLteControlMessageList
(
std::list
<
Ptr<LteControlMessage>
>);
233
234
// inherited from LtePhy
235
virtual
void
GenerateCtrlCqiReport
(
const
SpectrumValue
& sinr);
236
virtual
void
GenerateDataCqiReport
(
const
SpectrumValue
& sinr);
237
238
239
private
:
240
std::set <uint16_t>
m_ueAttached
;
241
242
std::vector <int>
m_listOfDownlinkSubchannel
;
243
244
std::vector <int>
m_dlDataRbMap
;
245
246
std::vector< std::list<UlDciLteControlMessage> >
m_ulDciQueue
;
// for storing info on future receptions
247
248
LteEnbPhySapProvider
*
m_enbPhySapProvider
;
249
LteEnbPhySapUser
*
m_enbPhySapUser
;
250
251
std::vector <uint16_t>
m_ulRntiRxed
;
252
253
uint32_t
m_nrFrames
;
254
uint32_t
m_nrSubFrames
;
255
256
uint16_t
m_srsPeriodicity
;
257
std::map <uint16_t,uint16_t>
m_srsCounter
;
258
std::vector <uint16_t>
m_srsUeOffset
;
259
uint16_t
m_currentSrsOffset
;
260
261
};
262
263
264
}
265
266
#endif
/* LTE_ENB_PHY_H */
src
lte
model
lte-enb-phy.h
Generated on Fri Dec 21 2012 19:00:39 for ns-3 by
1.8.1.2