A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-phy.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Giuseppe Piro <g.piro@poliba.it>
18 * Marco Miozzo <mmiozzo@cttc.es>
19 * Nicola Baldo <nbaldo@cttc.es>
20 */
21
22#ifndef LTE_PHY_H
23#define LTE_PHY_H
24
25#include "lte-spectrum-phy.h"
26
27#include <ns3/generic-phy.h>
28#include <ns3/mobility-model.h>
29#include <ns3/nstime.h>
30#include <ns3/packet.h>
31#include <ns3/spectrum-channel.h>
32#include <ns3/spectrum-interference.h>
33#include <ns3/spectrum-phy.h>
34#include <ns3/spectrum-signal-parameters.h>
35#include <ns3/spectrum-value.h>
36
37namespace ns3
38{
39
40class PacketBurst;
41class LteNetDevice;
42class LteControlMessage;
43
50class LtePhy : public Object
51{
52 public:
56 LtePhy();
57
64
65 ~LtePhy() override;
66
71 static TypeId GetTypeId();
72
83
89
95
100 virtual void DoSendMacPdu(Ptr<Packet> p) = 0;
101
107
113
120
121 void DoDispose() override;
122
126 void SetTti(double tti);
130 double GetTti() const;
131
136 void DoSetCellId(uint16_t cellId);
137
141 uint8_t GetRbgSize() const;
142
147 uint16_t GetSrsPeriodicity(uint16_t srcCi) const;
148
153 uint16_t GetSrsSubframeOffset(uint16_t srcCi) const;
154
158 void SetMacPdu(Ptr<Packet> p);
159
164
169
173 std::list<Ptr<LteControlMessage>> GetControlMessages();
174
180 virtual void GenerateCtrlCqiReport(const SpectrumValue& sinr) = 0;
181
188 virtual void GenerateDataCqiReport(const SpectrumValue& sinr) = 0;
189
197 virtual void ReportInterference(const SpectrumValue& interf) = 0;
198
206 virtual void ReportRsReceivedPower(const SpectrumValue& power) = 0;
207
213 void SetComponentCarrierId(uint8_t index);
214
220 uint8_t GetComponentCarrierId() const;
221
222 protected:
225
236
241 double m_txPower;
254
256 double m_tti;
268 uint8_t m_rbgSize;
279
281 std::vector<Ptr<PacketBurst>> m_packetBurstQueue;
283 std::vector<std::list<Ptr<LteControlMessage>>> m_controlMessagesQueue;
294
300 uint16_t m_cellId;
301
304
305}; // end of `class LtePhy`
306
307} // namespace ns3
308
309#endif /* LTE_PHY_H */
The LtePhy models the physical layer of LTE.
Definition: lte-phy.h:51
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:240
double m_txPower
Transmission power in dBm.
Definition: lte-phy.h:241
static TypeId GetTypeId()
Get the type ID.
Definition: lte-phy.cc:64
uint8_t GetRbgSize() const
Definition: lte-phy.cc:180
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()=0
Compute the TX Power Spectral Density.
uint8_t GetComponentCarrierId() const
Get the component carrier ID.
Definition: lte-phy.cc:256
void DoDispose() override
Destructor implementation.
Definition: lte-phy.cc:76
uint16_t GetSrsPeriodicity(uint16_t srcCi) const
Definition: lte-phy.cc:144
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
A queue of packet bursts to be sent.
Definition: lte-phy.h:281
uint16_t m_ulBandwidth
The UL bandwidth in number of PRBs.
Definition: lte-phy.h:261
Ptr< PacketBurst > GetPacketBurst()
Definition: lte-phy.cc:192
Ptr< LteNetDevice > GetDevice() const
Get the device where the phy layer is attached.
Definition: lte-phy.cc:97
void SetDownlinkChannel(Ptr< SpectrumChannel > c)
Set the downlink channel.
Definition: lte-phy.cc:116
void SetUplinkChannel(Ptr< SpectrumChannel > c)
Set the uplink channel.
Definition: lte-phy.cc:123
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:303
double m_noiseFigure
Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
Definition: lte-phy.h:253
void SetComponentCarrierId(uint8_t index)
Set the component carrier ID.
Definition: lte-phy.cc:248
Ptr< LteSpectrumPhy > GetDownlinkSpectrumPhy()
Definition: lte-phy.cc:104
uint32_t m_ulEarfcn
The uplink carrier frequency.
Definition: lte-phy.h:278
uint16_t m_dlBandwidth
The DL bandwidth in number of PRBs.
Definition: lte-phy.h:266
Ptr< LteSpectrumPhy > m_downlinkSpectrumPhy
The downlink LteSpectrumPhy associated to this LtePhy.
Definition: lte-phy.h:230
Ptr< LteSpectrumPhy > GetUplinkSpectrumPhy()
Definition: lte-phy.cc:110
void SetMacPdu(Ptr< Packet > p)
Definition: lte-phy.cc:186
std::list< Ptr< LteControlMessage > > GetControlMessages()
Definition: lte-phy.cc:218
uint16_t GetSrsSubframeOffset(uint16_t srcCi) const
Definition: lte-phy.cc:162
void SetDevice(Ptr< LteNetDevice > d)
Set the device where the phy layer is attached.
Definition: lte-phy.cc:90
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:224
uint16_t m_cellId
Cell identifier.
Definition: lte-phy.h:300
void SetControlMessages(Ptr< LteControlMessage > m)
Definition: lte-phy.cc:210
double m_tti
Transmission time interval.
Definition: lte-phy.h:256
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:273
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:235
double GetTti() const
Definition: lte-phy.cc:137
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
A queue of control messages to be sent.
Definition: lte-phy.h:283
uint8_t m_rbgSize
The RB group size according to the bandwidth.
Definition: lte-phy.h:268
~LtePhy() override
Definition: lte-phy.cc:70
void SetTti(double tti)
Definition: lte-phy.cc:130
uint8_t m_macChTtiDelay
Delay between MAC and channel layer in terms of TTIs.
Definition: lte-phy.h:293
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
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.