A Discrete-Event Network Simulator
API
ns3::LteTestUePhy Class Reference

Defines a simplified LtePhy class that is used for testing purposes of downlink and uplink SINR generation. More...

#include "lte-test-ue-phy.h"

+ Inheritance diagram for ns3::LteTestUePhy:
+ Collaboration diagram for ns3::LteTestUePhy:

Public Member Functions

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

Static Public Member Functions

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

Private Attributes

SpectrumValue m_sinr
 the SINR More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize ()
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed. More...
 
- Protected Attributes inherited from ns3::LtePhy
uint16_t m_cellId
 Cell identifier. More...
 
uint8_t m_componentCarrierId
 component carrier Id used to address sap More...
 
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
 A queue of control messages to be sent. More...
 
uint16_t m_dlBandwidth
 The DL bandwidth in number of PRBs. More...
 
uint32_t m_dlEarfcn
 The downlink carrier frequency. More...
 
Ptr< LteSpectrumPhym_downlinkSpectrumPhy
 The downlink LteSpectrumPhy associated to this LtePhy. More...
 
uint8_t m_macChTtiDelay
 Delay between MAC and channel layer in terms of TTIs. More...
 
Ptr< LteNetDevicem_netDevice
 Pointer to the NetDevice where this PHY layer is attached. More...
 
double m_noiseFigure
 Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. More...
 
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
 A queue of packet bursts to be sent. More...
 
uint8_t m_rbgSize
 The RB group size according to the bandwidth. More...
 
double m_tti
 Transmission time interval. More...
 
double m_txPower
 Transmission power in dBm. More...
 
uint16_t m_ulBandwidth
 The UL bandwidth in number of PRBs. More...
 
uint32_t m_ulEarfcn
 The uplink carrier frequency. More...
 
Ptr< LteSpectrumPhym_uplinkSpectrumPhy
 The uplink LteSpectrumPhy associated to this LtePhy. More...
 

Detailed Description

Defines a simplified LtePhy class that is used for testing purposes of downlink and uplink SINR generation.

Used in LteDownlinkDataSinrTestCase and LteUplinkDataSinrTestCase as simplified LTE PHY.

Definition at line 37 of file lte-test-ue-phy.h.

Constructor & Destructor Documentation

◆ LteTestUePhy() [1/2]

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

Definition at line 31 of file lte-test-ue-phy.cc.

References NS_FATAL_ERROR, and NS_LOG_FUNCTION.

◆ LteTestUePhy() [2/2]

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

Definition at line 37 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ ~LteTestUePhy()

ns3::LteTestUePhy::~LteTestUePhy ( )
override

Definition at line 43 of file lte-test-ue-phy.cc.

Member Function Documentation

◆ CreateTxPowerSpectralDensity()

Ptr< SpectrumValue > ns3::LteTestUePhy::CreateTxPowerSpectralDensity ( )
overridevirtual

Create the PSD for the TX.

Returns
the pointer to the PSD

Implements ns3::LtePhy.

Definition at line 70 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ DoDispose()

void ns3::LteTestUePhy::DoDispose ( void  )
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::LtePhy.

Definition at line 48 of file lte-test-ue-phy.cc.

References ns3::LtePhy::DoDispose(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ DoSendMacPdu()

void ns3::LteTestUePhy::DoSendMacPdu ( Ptr< Packet p)
overridevirtual

Queue the MAC PDU to be sent.

Parameters
pthe MAC PDU to sent

Implements ns3::LtePhy.

Definition at line 64 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ GenerateCtrlCqiReport()

void ns3::LteTestUePhy::GenerateCtrlCqiReport ( const SpectrumValue sinr)
overridevirtual

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

Parameters
sinrthe SINR vs frequency measured by the device

Implements ns3::LtePhy.

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

References m_sinr, and NS_LOG_FUNCTION.

◆ GenerateDataCqiReport()

void ns3::LteTestUePhy::GenerateDataCqiReport ( const SpectrumValue sinr)
overridevirtual

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

Implements ns3::LtePhy.

Definition at line 88 of file lte-test-ue-phy.cc.

References m_sinr, and NS_LOG_FUNCTION.

◆ GetSinr()

SpectrumValue ns3::LteTestUePhy::GetSinr ( )

Get the SINR.

Returns
the SINR

Definition at line 117 of file lte-test-ue-phy.cc.

References m_sinr, and NS_LOG_FUNCTION.

◆ GetTypeId()

TypeId ns3::LteTestUePhy::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 56 of file lte-test-ue-phy.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ ReceiveLteControlMessage()

void ns3::LteTestUePhy::ReceiveLteControlMessage ( Ptr< LteControlMessage msg)
virtual

Reeive LTE Control Message.

Parameters
msgthe control message

Definition at line 111 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ ReportInterference()

void ns3::LteTestUePhy::ReportInterference ( const SpectrumValue interf)
overridevirtual

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

Implements ns3::LtePhy.

Definition at line 104 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ ReportRsReceivedPower()

void ns3::LteTestUePhy::ReportRsReceivedPower ( const SpectrumValue power)
overridevirtual

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

Implements ns3::LtePhy.

Definition at line 97 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

Member Data Documentation

◆ m_sinr

SpectrumValue ns3::LteTestUePhy::m_sinr
private

the SINR

Definition at line 93 of file lte-test-ue-phy.h.

Referenced by GenerateCtrlCqiReport(), GenerateDataCqiReport(), and GetSinr().


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