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-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
* Marco Miozzo <mmiozzo@cttc.es>
20
* Nicola Baldo <nbaldo@cttc.es>
21
*/
22
23
#ifndef LTE_PHY_H
24
#define LTE_PHY_H
25
26
27
#include <ns3/spectrum-value.h>
28
#include <ns3/mobility-model.h>
29
#include <ns3/packet.h>
30
#include <ns3/nstime.h>
31
#include <ns3/spectrum-phy.h>
32
#include <ns3/spectrum-channel.h>
33
#include <ns3/spectrum-signal-parameters.h>
34
#include <ns3/spectrum-interference.h>
35
#include <ns3/generic-phy.h>
36
#include <ns3/lte-spectrum-phy.h>
37
38
namespace
ns3 {
39
40
class
PacketBurst;
41
class
LteNetDevice;
42
class
LteControlMessage;
43
44
45
52
class
LtePhy
:
public
Object
53
{
54
55
public
:
59
LtePhy
();
60
66
LtePhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy);
67
68
virtual
~LtePhy
();
69
70
static
TypeId
GetTypeId
(
void
);
71
76
void
SetDevice
(
Ptr<LteNetDevice>
d);
81
Ptr<LteNetDevice>
GetDevice
();
82
87
Ptr<LteSpectrumPhy>
GetDownlinkSpectrumPhy
();
88
89
94
Ptr<LteSpectrumPhy>
GetUplinkSpectrumPhy
();
95
100
virtual
void
DoSendMacPdu
(
Ptr<Packet>
p) = 0;
101
106
void
SetDownlinkChannel
(
Ptr<SpectrumChannel>
c);
107
112
void
SetUplinkChannel
(
Ptr<SpectrumChannel>
c);
113
114
119
virtual
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
() = 0;
120
121
void
DoDispose
();
122
127
// virtual void ReceiveLteControlMessage (Ptr<LteControlMessage> msg) = 0;
128
129
133
void
SetTti
(
double
tti);
137
double
GetTti
(
void
)
const
;
138
143
void
DoSetCellId
(uint16_t cellId);
144
145
149
uint8_t
GetRbgSize
(
void
)
const
;
150
151
156
uint16_t
GetSrsPeriodicity
(uint16_t srcCi)
const
;
157
162
uint16_t
GetSrsSubframeOffset
(uint16_t srcCi)
const
;
163
164
168
void
SetMacPdu
(
Ptr<Packet>
p);
169
173
Ptr<PacketBurst>
GetPacketBurst
(
void
);
174
178
void
SetControlMessages
(
Ptr<LteControlMessage>
m);
179
183
std::list<Ptr<LteControlMessage> >
GetControlMessages
(
void
);
184
185
191
virtual
void
GenerateCtrlCqiReport
(
const
SpectrumValue
& sinr) = 0;
192
199
virtual
void
GenerateDataCqiReport
(
const
SpectrumValue
& sinr) = 0;
200
208
virtual
void
ReportInterference
(
const
SpectrumValue
& power) = 0;
209
217
virtual
void
ReportRsReceivedPower
(
const
SpectrumValue
& interf) = 0;
218
219
220
221
protected
:
222
Ptr<LteNetDevice>
m_netDevice
;
223
224
Ptr<LteSpectrumPhy>
m_downlinkSpectrumPhy
;
225
Ptr<LteSpectrumPhy>
m_uplinkSpectrumPhy
;
226
227
double
m_txPower
;
228
double
m_noiseFigure
;
229
230
double
m_tti
;
231
uint8_t
m_ulBandwidth
;
232
uint8_t
m_dlBandwidth
;
233
uint8_t
m_rbgSize
;
234
235
uint16_t
m_dlEarfcn
;
236
uint16_t
m_ulEarfcn
;
237
238
std::vector< Ptr<PacketBurst> >
m_packetBurstQueue
;
239
std::vector< std::list<Ptr<LteControlMessage> > >
m_controlMessagesQueue
;
240
uint8_t
m_macChTtiDelay
;
// delay between MAC and channel layer in terms of TTIs
241
242
uint16_t
m_cellId
;
243
244
};
245
246
247
}
248
249
#endif
/* LTE_PHY_H */
src
lte
model
lte-phy.h
Generated on Tue May 14 2013 11:08:25 for ns-3 by
1.8.1.2