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)
 
virtual ~LteTestUePhy ()
 
virtual Ptr< SpectrumValueCreateTxPowerSpectralDensity ()
 Create the PSD for the TX. More...
 
virtual void DoDispose ()
 Destructor implementation. More...
 
virtual void DoSendMacPdu (Ptr< Packet > p)
 Queue the MAC PDU to be sent. More...
 
virtual void GenerateCtrlCqiReport (const SpectrumValue &sinr)
 generate a CQI report based on the given SINR of Ctrl frame More...
 
virtual void GenerateDataCqiReport (const SpectrumValue &sinr)
 
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...
 
virtual void ReportInterference (const SpectrumValue &interf)
 generate a report based on the linear interference and noise power perceived during DATA frame NOTE: used only by eNB More...
 
virtual void ReportRsReceivedPower (const SpectrumValue &power)
 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)
 
virtual ~LtePhy ()
 
void DoSetCellId (uint16_t cellId)
 
uint8_t GetComponentCarrierId ()
 Get the component carrier ID. More...
 
std::list< Ptr< LteControlMessage > > GetControlMessages (void)
 
Ptr< LteNetDeviceGetDevice () const
 Get the device where the phy layer is attached. More...
 
Ptr< LteSpectrumPhyGetDownlinkSpectrumPhy ()
 
Ptr< PacketBurstGetPacketBurst (void)
 
uint8_t GetRbgSize (void) const
 
uint16_t GetSrsPeriodicity (uint16_t srcCi) const
 
uint16_t GetSrsSubframeOffset (uint16_t srcCi) const
 
double GetTti (void) 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...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated 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 () const
 Specialization of () for objects of type ns3::Object. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) 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)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) 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 erros. 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 (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::LtePhy
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 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 (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 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 (void)
 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 38 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 30 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 36 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ ~LteTestUePhy()

ns3::LteTestUePhy::~LteTestUePhy ( )
virtual

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

Member Function Documentation

◆ CreateTxPowerSpectralDensity()

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

Create the PSD for the TX.

Returns
the pointer to the PSD

Implements ns3::LtePhy.

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

References NS_LOG_FUNCTION.

◆ DoDispose()

void ns3::LteTestUePhy::DoDispose ( void  )
virtual

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 47 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)
virtual

Queue the MAC PDU to be sent.

Parameters
pthe MAC PDU to sent

Implements ns3::LtePhy.

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

References NS_LOG_FUNCTION.

◆ GenerateCtrlCqiReport()

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

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 80 of file lte-test-ue-phy.cc.

References m_sinr, and NS_LOG_FUNCTION.

◆ GenerateDataCqiReport()

void ns3::LteTestUePhy::GenerateDataCqiReport ( const SpectrumValue sinr)
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

Implements ns3::LtePhy.

Definition at line 89 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 118 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 55 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 112 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ ReportInterference()

void ns3::LteTestUePhy::ReportInterference ( const SpectrumValue interf)
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

Implements ns3::LtePhy.

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

References NS_LOG_FUNCTION.

◆ ReportRsReceivedPower()

void ns3::LteTestUePhy::ReportRsReceivedPower ( const SpectrumValue power)
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

Implements ns3::LtePhy.

Definition at line 98 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 94 of file lte-test-ue-phy.h.

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


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