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
IdealControlMessage;
43
50
class
LtePhy
:
public
Object
51
{
52
53
public
:
57
LtePhy
();
58
64
LtePhy
(
Ptr<LteSpectrumPhy>
dlPhy,
Ptr<LteSpectrumPhy>
ulPhy);
65
66
virtual
~LtePhy
();
67
68
static
TypeId
GetTypeId
(
void
);
69
74
void
SetDevice
(
Ptr<LteNetDevice>
d);
79
Ptr<LteNetDevice>
GetDevice
();
80
85
Ptr<LteSpectrumPhy>
GetDownlinkSpectrumPhy
();
86
87
92
Ptr<LteSpectrumPhy>
GetUplinkSpectrumPhy
();
93
98
virtual
void
DoSendMacPdu
(
Ptr<Packet>
p) = 0;
99
104
void
SetDownlinkChannel
(
Ptr<SpectrumChannel>
c);
105
110
void
SetUplinkChannel
(
Ptr<SpectrumChannel>
c);
111
118
void
SetDownlinkSubChannels
(std::vector<int> mask );
122
virtual
void
DoSetDownlinkSubChannels
();
123
130
void
SetUplinkSubChannels
(std::vector<int> mask);
134
virtual
void
DoSetUplinkSubChannels
();
135
140
std::vector<int>
GetDownlinkSubChannels
(
void
);
145
std::vector<int>
GetUplinkSubChannels
(
void
);
146
147
152
virtual
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
() = 0;
153
154
void
DoDispose
();
155
160
virtual
void
ReceiveIdealControlMessage
(
Ptr<IdealControlMessage>
msg) = 0;
161
162
166
void
SetTti
(
double
tti);
170
double
GetTti
(
void
)
const
;
171
176
void
DoSetBandwidth
(uint8_t ulBandwidth, uint8_t dlBandwidth);
177
183
virtual
void
DoSetEarfcn
(uint16_t dlEarfcn, uint16_t ulEarfcn);
184
189
void
DoSetCellId
(uint16_t cellId);
190
191
195
uint8_t
GetRbgSize
(
void
)
const
;
196
197
201
void
SetMacPdu
(
Ptr<Packet>
p);
202
206
Ptr<PacketBurst>
GetPacketBurst
(
void
);
207
211
void
SetControlMessages
(
Ptr<IdealControlMessage>
m);
212
216
std::list<Ptr<IdealControlMessage> >
GetControlMessages
(
void
);
217
218
224
virtual
void
GenerateCqiReport
(
const
SpectrumValue
& sinr) = 0;
225
226
227
228
protected
:
229
Ptr<LteNetDevice>
m_netDevice
;
230
231
Ptr<LteSpectrumPhy>
m_downlinkSpectrumPhy
;
232
Ptr<LteSpectrumPhy>
m_uplinkSpectrumPhy
;
233
234
std::vector <int>
m_listOfDownlinkSubchannel
;
235
std::vector <int>
m_listOfUplinkSubchannel
;
236
237
double
m_txPower
;
238
double
m_noiseFigure
;
239
240
double
m_tti
;
241
uint8_t
m_ulBandwidth
;
242
uint8_t
m_dlBandwidth
;
243
uint8_t
m_rbgSize
;
244
245
uint16_t
m_dlEarfcn
;
246
uint16_t
m_ulEarfcn
;
247
248
std::vector< Ptr<PacketBurst> >
m_packetBurstQueue
;
249
std::vector< std::list<Ptr<IdealControlMessage> > >
m_controlMessagesQueue
;
250
uint8_t
m_macChTtiDelay
;
// delay between MAC and channel layer in terms of TTIs
251
252
uint16_t
m_cellId
;
253
254
};
255
256
257
}
258
259
#endif
/* LTE_PHY_H */
src
lte
model
lte-phy.h
Generated on Tue Nov 13 2012 10:32:17 for ns-3 by
1.8.1.2