A Discrete-Event Network Simulator
API
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
38namespace ns3 {
39
40class PacketBurst;
41class LteNetDevice;
42class LteControlMessage;
43
44
45
52class LtePhy : public Object
53{
54
55public:
59 LtePhy ();
60
67
68 virtual ~LtePhy ();
69
74 static TypeId GetTypeId (void);
75
86
92
93
99
104 virtual void DoSendMacPdu (Ptr<Packet> p) = 0;
105
111
117
118
124
125 void DoDispose ();
126
130 void SetTti (double tti);
134 double GetTti (void) const;
135
140 void DoSetCellId (uint16_t cellId);
141
142
146 uint8_t GetRbgSize (void) const;
147
148
153 uint16_t GetSrsPeriodicity (uint16_t srcCi) const;
154
159 uint16_t GetSrsSubframeOffset (uint16_t srcCi) const;
160
161
165 void SetMacPdu (Ptr<Packet> p);
166
171
176
180 std::list<Ptr<LteControlMessage> > GetControlMessages (void);
181
182
188 virtual void GenerateCtrlCqiReport (const SpectrumValue& sinr) = 0;
189
196 virtual void GenerateDataCqiReport (const SpectrumValue& sinr) = 0;
197
205 virtual void ReportInterference (const SpectrumValue& interf) = 0;
206
214 virtual void ReportRsReceivedPower (const SpectrumValue& power) = 0;
215
221 void SetComponentCarrierId (uint8_t index);
222
228 uint8_t GetComponentCarrierId ();
229
230protected:
233
244
249 double m_txPower;
262
264 double m_tti;
276 uint8_t m_rbgSize;
287
289 std::vector< Ptr<PacketBurst> > m_packetBurstQueue;
291 std::vector< std::list<Ptr<LteControlMessage> > > m_controlMessagesQueue;
302
308 uint16_t m_cellId;
309
312
313}; // end of `class LtePhy`
314
315
316}
317
318#endif /* LTE_PHY_H */
The LtePhy models the physical layer of LTE.
Definition: lte-phy.h:53
static TypeId GetTypeId(void)
Get the type ID.
Definition: lte-phy.cc:62
virtual void ReportInterference(const SpectrumValue &interf)=0
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
void DoSetCellId(uint16_t cellId)
Definition: lte-phy.cc:248
double m_txPower
Transmission power in dBm.
Definition: lte-phy.h:249
uint8_t GetComponentCarrierId()
Get the component carrier ID.
Definition: lte-phy.cc:264
void DoDispose()
Destructor implementation.
Definition: lte-phy.cc:78
uint8_t GetRbgSize(void) const
Definition: lte-phy.cc:186
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()=0
Compute the TX Power Spectral Density.
uint16_t GetSrsPeriodicity(uint16_t srcCi) const
Definition: lte-phy.cc:150
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
A queue of packet bursts to be sent.
Definition: lte-phy.h:289
uint16_t m_ulBandwidth
The UL bandwidth in number of PRBs.
Definition: lte-phy.h:269
Ptr< LteNetDevice > GetDevice() const
Get the device where the phy layer is attached.
Definition: lte-phy.cc:100
void SetDownlinkChannel(Ptr< SpectrumChannel > c)
Set the downlink channel.
Definition: lte-phy.cc:120
void SetUplinkChannel(Ptr< SpectrumChannel > c)
Set the uplink channel.
Definition: lte-phy.cc:127
Ptr< PacketBurst > GetPacketBurst(void)
Definition: lte-phy.cc:198
virtual void ReportRsReceivedPower(const SpectrumValue &power)=0
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for ...
uint8_t m_componentCarrierId
component carrier Id used to address sap
Definition: lte-phy.h:311
double m_noiseFigure
Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
Definition: lte-phy.h:261
void SetComponentCarrierId(uint8_t index)
Set the component carrier ID.
Definition: lte-phy.cc:256
Ptr< LteSpectrumPhy > GetDownlinkSpectrumPhy()
Definition: lte-phy.cc:107
uint32_t m_ulEarfcn
The uplink carrier frequency.
Definition: lte-phy.h:286
uint16_t m_dlBandwidth
The DL bandwidth in number of PRBs.
Definition: lte-phy.h:274
Ptr< LteSpectrumPhy > m_downlinkSpectrumPhy
The downlink LteSpectrumPhy associated to this LtePhy.
Definition: lte-phy.h:238
Ptr< LteSpectrumPhy > GetUplinkSpectrumPhy()
Definition: lte-phy.cc:113
void SetMacPdu(Ptr< Packet > p)
Definition: lte-phy.cc:192
uint16_t GetSrsSubframeOffset(uint16_t srcCi) const
Definition: lte-phy.cc:168
void SetDevice(Ptr< LteNetDevice > d)
Set the device where the phy layer is attached.
Definition: lte-phy.cc:92
virtual void GenerateDataCqiReport(const SpectrumValue &sinr)=0
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
Ptr< LteNetDevice > m_netDevice
Pointer to the NetDevice where this PHY layer is attached.
Definition: lte-phy.h:232
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
A queue of control messages to be sent.
Definition: lte-phy.h:291
uint16_t m_cellId
Cell identifier.
Definition: lte-phy.h:308
void SetControlMessages(Ptr< LteControlMessage > m)
Definition: lte-phy.cc:217
std::list< Ptr< LteControlMessage > > GetControlMessages(void)
Definition: lte-phy.cc:225
virtual ~LtePhy()
Definition: lte-phy.cc:72
double m_tti
Transmission time interval.
Definition: lte-phy.h:264
virtual void GenerateCtrlCqiReport(const SpectrumValue &sinr)=0
generate a CQI report based on the given SINR of Ctrl frame
uint32_t m_dlEarfcn
The downlink carrier frequency.
Definition: lte-phy.h:281
virtual void DoSendMacPdu(Ptr< Packet > p)=0
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
Ptr< LteSpectrumPhy > m_uplinkSpectrumPhy
The uplink LteSpectrumPhy associated to this LtePhy.
Definition: lte-phy.h:243
double GetTti(void) const
Definition: lte-phy.cc:142
uint8_t m_rbgSize
The RB group size according to the bandwidth.
Definition: lte-phy.h:276
void SetTti(double tti)
Definition: lte-phy.cc:134
uint8_t m_macChTtiDelay
Delay between MAC and channel layer in terms of TTIs.
Definition: lte-phy.h:301
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
Set of values corresponding to a given SpectrumModel.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.