A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
void DoDispose () override
 Destructor implementation.
 
void DoSendMacPdu (Ptr< Packet > p) override
 Queue the MAC PDU to be sent.
 
void GenerateCtrlCqiReport (const SpectrumValue &sinr) override
 generate a CQI report based on the given SINR of Ctrl frame
 
void GenerateDataCqiReport (const SpectrumValue &sinr) override
 generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
 
SpectrumValue GetSinr ()
 Get the SINR.
 
virtual void ReceiveLteControlMessage (Ptr< LteControlMessage > msg)
 Reeive LTE Control Message.
 
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
 
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
 
- 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.
 
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 ()
 
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::LtePhy
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.
 

Private Attributes

SpectrumValue m_sinr
 the SINR
 

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.
 
- Protected Attributes inherited from ns3::LtePhy
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.
 

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

References NS_LOG_FUNCTION.

◆ ~LteTestUePhy()

ns3::LteTestUePhy::~LteTestUePhy ( )
override

Definition at line 32 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 59 of file lte-test-ue-phy.cc.

References NS_LOG_FUNCTION.

◆ DoDispose()

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

Definition at line 37 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 53 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 68 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 77 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 106 of file lte-test-ue-phy.cc.

References m_sinr, and NS_LOG_FUNCTION.

◆ GetTypeId()

TypeId ns3::LteTestUePhy::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 45 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 100 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 93 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 86 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 82 of file lte-test-ue-phy.h.

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


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