A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::LtePhy Class Referenceabstract

The LtePhy models the physical layer of LTE. More...

#include "lte-phy.h"

+ Inheritance diagram for ns3::LtePhy:
+ Collaboration diagram for ns3::LtePhy:

Public Member Functions

 LtePhy ()
 
 LtePhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy)
 
 ~LtePhy () override
 
virtual Ptr< SpectrumValueCreateTxPowerSpectralDensity ()=0
 Compute the TX Power Spectral Density.
 
void DoDispose () override
 Destructor implementation.
 
virtual void DoSendMacPdu (Ptr< Packet > p)=0
 Queue the MAC PDU to be sent (according to m_macChTtiDelay)
 
void DoSetCellId (uint16_t cellId)
 
virtual void GenerateCtrlCqiReport (const SpectrumValue &sinr)=0
 generate a CQI report based on the given SINR of Ctrl frame
 
virtual void GenerateDataCqiReport (const SpectrumValue &sinr)=0
 generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
 
uint8_t GetComponentCarrierId () const
 Get the component carrier ID.
 
std::list< Ptr< LteControlMessage > > GetControlMessages ()
 
Ptr< LteNetDeviceGetDevice () const
 Get the device where the phy layer is attached.
 
Ptr< LteSpectrumPhyGetDownlinkSpectrumPhy ()
 
Ptr< PacketBurstGetPacketBurst ()
 
uint8_t GetRbgSize () const
 
uint16_t GetSrsPeriodicity (uint16_t srcCi) const
 
uint16_t GetSrsSubframeOffset (uint16_t srcCi) const
 
double GetTti () const
 
Ptr< LteSpectrumPhyGetUplinkSpectrumPhy ()
 
virtual void ReportInterference (const SpectrumValue &interf)=0
 generate a report based on the linear interference and noise power perceived during DATA frame NOTE: used only by eNB
 
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 evaluating RSRP
 
void SetComponentCarrierId (uint8_t index)
 Set the component carrier ID.
 
void SetControlMessages (Ptr< LteControlMessage > m)
 
void SetDevice (Ptr< LteNetDevice > d)
 Set the device where the phy layer is attached.
 
void SetDownlinkChannel (Ptr< SpectrumChannel > c)
 Set the downlink channel.
 
void SetMacPdu (Ptr< Packet > p)
 
void SetTti (double tti)
 
void SetUplinkChannel (Ptr< SpectrumChannel > c)
 Set the uplink channel.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Attributes

uint16_t m_cellId
 Cell identifier.
 
uint8_t m_componentCarrierId
 component carrier Id used to address sap
 
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
 A queue of control messages to be sent.
 
uint16_t m_dlBandwidth
 The DL bandwidth in number of PRBs.
 
uint32_t m_dlEarfcn
 The downlink carrier frequency.
 
Ptr< LteSpectrumPhym_downlinkSpectrumPhy
 The downlink LteSpectrumPhy associated to this LtePhy.
 
uint8_t m_macChTtiDelay
 Delay between MAC and channel layer in terms of TTIs.
 
Ptr< LteNetDevicem_netDevice
 Pointer to the NetDevice where this PHY layer is attached.
 
double m_noiseFigure
 Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
 
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
 A queue of packet bursts to be sent.
 
uint8_t m_rbgSize
 The RB group size according to the bandwidth.
 
double m_tti
 Transmission time interval.
 
double m_txPower
 Transmission power in dBm.
 
uint16_t m_ulBandwidth
 The UL bandwidth in number of PRBs.
 
uint32_t m_ulEarfcn
 The uplink carrier frequency.
 
Ptr< LteSpectrumPhym_uplinkSpectrumPhy
 The uplink LteSpectrumPhy associated to this LtePhy.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Detailed Description

The LtePhy models the physical layer of LTE.

It is composed by two LteSpectrumPhy, one for the downlink and one for the uplink.

Definition at line 39 of file lte-phy.h.

Constructor & Destructor Documentation

◆ LtePhy() [1/2]

ns3::LtePhy::LtePhy ( )
Warning
the default constructor should not be used

Definition at line 30 of file lte-phy.cc.

References NS_FATAL_ERROR, and NS_LOG_FUNCTION.

◆ LtePhy() [2/2]

ns3::LtePhy::LtePhy ( Ptr< LteSpectrumPhy > dlPhy,
Ptr< LteSpectrumPhy > ulPhy )
Parameters
dlPhythe downlink LteSpectrumPhy instance
ulPhythe uplink LteSpectrumPhy instance

Definition at line 36 of file lte-phy.cc.

References NS_LOG_FUNCTION.

◆ ~LtePhy()

ns3::LtePhy::~LtePhy ( )
override

Definition at line 59 of file lte-phy.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ CreateTxPowerSpectralDensity()

virtual Ptr< SpectrumValue > ns3::LtePhy::CreateTxPowerSpectralDensity ( )
pure virtual

Compute the TX Power Spectral Density.

Returns
a pointer to a newly allocated SpectrumValue representing the TX Power Spectral Density in W/Hz for each Resource Block

Implemented in ns3::LteEnbPhy, ns3::LteTestUePhy, and ns3::LteUePhy.

◆ DoDispose()

void ns3::LtePhy::DoDispose ( )
overridevirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Reimplemented in ns3::LteTestUePhy, and ns3::LteUePhy.

Definition at line 65 of file lte-phy.cc.

References ns3::Object::DoDispose(), m_controlMessagesQueue, m_downlinkSpectrumPhy, m_netDevice, m_packetBurstQueue, m_uplinkSpectrumPhy, and NS_LOG_FUNCTION.

Referenced by ns3::LteEnbPhy::DoDispose(), ns3::LteTestUePhy::DoDispose(), and ns3::LteUePhy::DoDispose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoSendMacPdu()

virtual void ns3::LtePhy::DoSendMacPdu ( Ptr< Packet > p)
pure virtual

Queue the MAC PDU to be sent (according to m_macChTtiDelay)

Parameters
pthe MAC PDU to sent

Implemented in ns3::LteEnbPhy, ns3::LteTestUePhy, and ns3::LteUePhy.

◆ DoSetCellId()

void ns3::LtePhy::DoSetCellId ( uint16_t cellId)
Parameters
cellIdthe Cell Identifier

Definition at line 229 of file lte-phy.cc.

References m_cellId, m_downlinkSpectrumPhy, and m_uplinkSpectrumPhy.

Referenced by ns3::EnbMemberLteEnbPhySapProvider::SetCellId().

+ Here is the caller graph for this function:

◆ GenerateCtrlCqiReport()

virtual void ns3::LtePhy::GenerateCtrlCqiReport ( const SpectrumValue & sinr)
pure virtual

generate a CQI report based on the given SINR of Ctrl frame

Parameters
sinrthe SINR vs frequency measured by the device

Implemented in ns3::LteEnbPhy, ns3::LteTestUePhy, and ns3::LteUePhy.

◆ GenerateDataCqiReport()

virtual void ns3::LtePhy::GenerateDataCqiReport ( const SpectrumValue & sinr)
pure virtual

generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)

Parameters
sinrthe SINR vs frequency measured by the device

Implemented in ns3::LteEnbPhy, ns3::LteTestUePhy, and ns3::LteUePhy.

◆ GetComponentCarrierId()

uint8_t ns3::LtePhy::GetComponentCarrierId ( ) const

Get the component carrier ID.

Returns
the component carrier ID index

Definition at line 245 of file lte-phy.cc.

References m_componentCarrierId.

◆ GetControlMessages()

std::list< Ptr< LteControlMessage > > ns3::LtePhy::GetControlMessages ( )
Returns
the list of control messages to be sent

Definition at line 207 of file lte-phy.cc.

References m_controlMessagesQueue, and NS_LOG_FUNCTION.

Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().

+ Here is the caller graph for this function:

◆ GetDevice()

Ptr< LteNetDevice > ns3::LtePhy::GetDevice ( ) const

Get the device where the phy layer is attached.

Returns
the pointer to the device

Definition at line 86 of file lte-phy.cc.

References m_netDevice, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::GenerateCqiRsrpRsrq().

+ Here is the caller graph for this function:

◆ GetDownlinkSpectrumPhy()

Ptr< LteSpectrumPhy > ns3::LtePhy::GetDownlinkSpectrumPhy ( )
Returns
a pointer to the LteSpectrumPhy instance that manages the downlink

Definition at line 93 of file lte-phy.cc.

References m_downlinkSpectrumPhy.

◆ GetPacketBurst()

Ptr< PacketBurst > ns3::LtePhy::GetPacketBurst ( )
Returns
the packet burst to be sent

Definition at line 181 of file lte-phy.cc.

References ns3::CreateObject(), and m_packetBurstQueue.

Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetRbgSize()

uint8_t ns3::LtePhy::GetRbgSize ( ) const
Returns
the RB group size according to the bandwidth

Definition at line 169 of file lte-phy.cc.

References m_rbgSize.

Referenced by ns3::LteUePhy::CreateDlCqiFeedbackMessage(), ns3::LteUePhy::GenerateMixedCqiReport(), ns3::LteUePhy::ReceiveLteControlMessageList(), and ns3::LteEnbPhy::StartSubFrame().

+ Here is the caller graph for this function:

◆ GetSrsPeriodicity()

uint16_t ns3::LtePhy::GetSrsPeriodicity ( uint16_t srcCi) const
Returns
the SRS periodicity (see Table 8.2-1 of 36.213)
Parameters
srcCithe SRS Configuration Index

Definition at line 133 of file lte-phy.cc.

Referenced by ns3::LteEnbPhy::DoSetSrsConfigurationIndex(), and ns3::LteUePhy::DoSetSrsConfigurationIndex().

+ Here is the caller graph for this function:

◆ GetSrsSubframeOffset()

uint16_t ns3::LtePhy::GetSrsSubframeOffset ( uint16_t srcCi) const
Returns
the SRS Subframe offset (see Table 8.2-1 of 36.213)
Parameters
srcCithe SRS Configuration Index

Definition at line 151 of file lte-phy.cc.

Referenced by ns3::LteEnbPhy::DoSetSrsConfigurationIndex(), and ns3::LteUePhy::DoSetSrsConfigurationIndex().

+ Here is the caller graph for this function:

◆ GetTti()

double ns3::LtePhy::GetTti ( ) const
Returns
transmission time interval

Definition at line 126 of file lte-phy.cc.

References m_tti, and NS_LOG_FUNCTION.

Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::LtePhy::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 53 of file lte-phy.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetUplinkSpectrumPhy()

Ptr< LteSpectrumPhy > ns3::LtePhy::GetUplinkSpectrumPhy ( )
Returns
a pointer to the LteSpectrumPhy instance that manages the uplink

Definition at line 99 of file lte-phy.cc.

References m_uplinkSpectrumPhy.

◆ ReportInterference()

virtual void ns3::LtePhy::ReportInterference ( const SpectrumValue & interf)
pure virtual

generate a report based on the linear interference and noise power perceived during DATA frame NOTE: used only by eNB

Parameters
interfthe interference + noise power measured by the device

Implemented in ns3::LteEnbPhy, ns3::LteTestUePhy, and ns3::LteUePhy.

◆ ReportRsReceivedPower()

virtual void ns3::LtePhy::ReportRsReceivedPower ( const SpectrumValue & power)
pure virtual

generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for evaluating RSRP

Parameters
powerthe RS power measured by the device

Implemented in ns3::LteEnbPhy, ns3::LteTestUePhy, and ns3::LteUePhy.

◆ SetComponentCarrierId()

void ns3::LtePhy::SetComponentCarrierId ( uint8_t index)

Set the component carrier ID.

Parameters
indexthe component carrier ID index

Definition at line 237 of file lte-phy.cc.

References m_componentCarrierId, m_downlinkSpectrumPhy, and m_uplinkSpectrumPhy.

◆ SetControlMessages()

void ns3::LtePhy::SetControlMessages ( Ptr< LteControlMessage > m)
Parameters
mthe control message to be sent

Definition at line 199 of file lte-phy.cc.

References m_controlMessagesQueue.

Referenced by ns3::LteEnbPhy::DoSendLteControlMessage(), ns3::LteUePhy::DoSendLteControlMessage(), and ns3::LteUePhy::EnqueueDlHarqFeedback().

+ Here is the caller graph for this function:

◆ SetDevice()

void ns3::LtePhy::SetDevice ( Ptr< LteNetDevice > d)

Set the device where the phy layer is attached.

Parameters
dthe device

Definition at line 79 of file lte-phy.cc.

References m_netDevice, and NS_LOG_FUNCTION.

◆ SetDownlinkChannel()

void ns3::LtePhy::SetDownlinkChannel ( Ptr< SpectrumChannel > c)

Set the downlink channel.

Parameters
cthe downlink channel

Definition at line 105 of file lte-phy.cc.

References m_downlinkSpectrumPhy, and NS_LOG_FUNCTION.

◆ SetMacPdu()

void ns3::LtePhy::SetMacPdu ( Ptr< Packet > p)
Parameters
pqueue MAC PDU to be sent

Definition at line 175 of file lte-phy.cc.

References m_packetBurstQueue.

Referenced by ns3::LteEnbPhy::DoSendMacPdu(), and ns3::LteUePhy::DoSendMacPdu().

+ Here is the caller graph for this function:

◆ SetTti()

void ns3::LtePhy::SetTti ( double tti)
Parameters
ttitransmission time interval

Definition at line 119 of file lte-phy.cc.

References m_tti, and NS_LOG_FUNCTION.

◆ SetUplinkChannel()

void ns3::LtePhy::SetUplinkChannel ( Ptr< SpectrumChannel > c)

Set the uplink channel.

Parameters
cthe uplink channel

Definition at line 112 of file lte-phy.cc.

References m_uplinkSpectrumPhy, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_cellId

◆ m_componentCarrierId

◆ m_controlMessagesQueue

std::vector<std::list<Ptr<LteControlMessage> > > ns3::LtePhy::m_controlMessagesQueue
protected

◆ m_dlBandwidth

◆ m_dlEarfcn

◆ m_downlinkSpectrumPhy

◆ m_macChTtiDelay

uint8_t ns3::LtePhy::m_macChTtiDelay
protected

Delay between MAC and channel layer in terms of TTIs.

It is the delay that occurs between a scheduling decision in the MAC and the actual start of the transmission by the PHY. This is intended to be used to model the latency of real PHY and MAC implementations.

In LteEnbPhy, it is 2 TTIs by default and can be configured through the MacToChannelDelay attribute. In LteUePhy, it is 4 TTIs.

Definition at line 282 of file lte-phy.h.

Referenced by ns3::LteUePhy::LteUePhy(), ns3::LteEnbPhy::DoGetMacChTtiDelay(), ns3::LteUePhy::DoReset(), ns3::LteEnbPhy::DoSetSrsConfigurationIndex(), ns3::LteEnbPhy::GetMacChDelay(), ns3::LteUePhy::GetMacChDelay(), ns3::LteUePhy::QueueSubChannelsForTransmission(), ns3::LteEnbPhy::SetMacChDelay(), and ns3::LteUePhy::SubframeIndication().

◆ m_netDevice

Ptr<LteNetDevice> ns3::LtePhy::m_netDevice
protected

Pointer to the NetDevice where this PHY layer is attached.

Definition at line 213 of file lte-phy.h.

Referenced by DoDispose(), ns3::LteEnbPhy::DoInitialize(), ns3::LteUePhy::DoInitialize(), GetDevice(), and SetDevice().

◆ m_noiseFigure

double ns3::LtePhy::m_noiseFigure
protected

Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.

Also available as attribute NoiseFigure in the child classes LteEnbPhy and LteUePhy.

According to Wikipedia, this is "the difference in decibels (dB) between the noise output of the actual receiver to the noise output of an ideal receiver with the same overall gain and bandwidth when the receivers are connected to sources at the standard noise temperature T0." In this model, we consider T0 = 290K.

Definition at line 242 of file lte-phy.h.

Referenced by ns3::LteEnbPhy::DoInitialize(), ns3::LteUePhy::DoSetDlBandwidth(), ns3::LteEnbPhy::GetNoiseFigure(), ns3::LteUePhy::GetNoiseFigure(), ns3::LteEnbPhy::SetNoiseFigure(), and ns3::LteUePhy::SetNoiseFigure().

◆ m_packetBurstQueue

std::vector<Ptr<PacketBurst> > ns3::LtePhy::m_packetBurstQueue
protected

A queue of packet bursts to be sent.

Definition at line 270 of file lte-phy.h.

Referenced by DoDispose(), ns3::LteUePhy::DoReset(), GetPacketBurst(), ns3::LteEnbPhy::SetMacChDelay(), and SetMacPdu().

◆ m_rbgSize

uint8_t ns3::LtePhy::m_rbgSize
protected

The RB group size according to the bandwidth.

Definition at line 257 of file lte-phy.h.

Referenced by ns3::LteEnbPhy::DoSetBandwidth(), ns3::LteUePhy::DoSetDlBandwidth(), and GetRbgSize().

◆ m_tti

double ns3::LtePhy::m_tti
protected

Transmission time interval.

Definition at line 245 of file lte-phy.h.

Referenced by GetTti(), and SetTti().

◆ m_txPower

◆ m_ulBandwidth

uint16_t ns3::LtePhy::m_ulBandwidth
protected

The UL bandwidth in number of PRBs.

Specified by the upper layer through CPHY SAP.

Definition at line 250 of file lte-phy.h.

Referenced by ns3::LteUePhy::CreateTxPowerSpectralDensity(), ns3::LteUePhy::DoConfigureUplink(), ns3::LteEnbPhy::DoInitialize(), ns3::LteEnbPhy::DoSetBandwidth(), and ns3::LteUePhy::SendSrs().

◆ m_ulEarfcn

uint32_t ns3::LtePhy::m_ulEarfcn
protected

The uplink carrier frequency.

Specified by the upper layer through CPHY SAP.

Definition at line 267 of file lte-phy.h.

Referenced by ns3::LteUePhy::CreateTxPowerSpectralDensity(), ns3::LteUePhy::DoConfigureUplink(), ns3::LteEnbPhy::DoInitialize(), and ns3::LteEnbPhy::DoSetEarfcn().

◆ m_uplinkSpectrumPhy


The documentation for this class was generated from the following files: