Defines a simplified LtePhy class that is used for testing purposes of downlink and uplink SINR generation. More...
#include "lte-test-ue-phy.h"
Public Member Functions | |
LteTestUePhy () | |
LteTestUePhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy) | |
~LteTestUePhy () override | |
Ptr< SpectrumValue > | CreateTxPowerSpectralDensity () 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< LteNetDevice > | GetDevice () const |
Get the device where the phy layer is attached. More... | |
Ptr< LteSpectrumPhy > | GetDownlinkSpectrumPhy () |
Ptr< PacketBurst > | GetPacketBurst () |
uint8_t | GetRbgSize () const |
uint16_t | GetSrsPeriodicity (uint16_t srcCi) const |
uint16_t | GetSrsSubframeOffset (uint16_t srcCi) const |
double | GetTti () const |
Ptr< LteSpectrumPhy > | GetUplinkSpectrumPhy () |
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< Object > | GetObject () 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< Object > | GetObject (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... | |
SimpleRefCount & | operator= (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< LteSpectrumPhy > | m_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< LteNetDevice > | m_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< LteSpectrumPhy > | m_uplinkSpectrumPhy |
The uplink LteSpectrumPhy associated to this LtePhy. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
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.
ns3::LteTestUePhy::LteTestUePhy | ( | ) |
Definition at line 31 of file lte-test-ue-phy.cc.
References NS_FATAL_ERROR, and NS_LOG_FUNCTION.
ns3::LteTestUePhy::LteTestUePhy | ( | Ptr< LteSpectrumPhy > | dlPhy, |
Ptr< LteSpectrumPhy > | ulPhy | ||
) |
dlPhy | the downlink LteSpectrumPhy instance |
ulPhy | the uplink LteSpectrumPhy instance |
Definition at line 37 of file lte-test-ue-phy.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 43 of file lte-test-ue-phy.cc.
|
overridevirtual |
Create the PSD for the TX.
Implements ns3::LtePhy.
Definition at line 70 of file lte-test-ue-phy.cc.
References NS_LOG_FUNCTION.
|
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.
Queue the MAC PDU to be sent.
p | the MAC PDU to sent |
Implements ns3::LtePhy.
Definition at line 64 of file lte-test-ue-phy.cc.
References NS_LOG_FUNCTION.
|
overridevirtual |
generate a CQI report based on the given SINR of Ctrl frame
sinr | the 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.
|
overridevirtual |
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
sinr | the 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.
SpectrumValue ns3::LteTestUePhy::GetSinr | ( | ) |
Get the SINR.
Definition at line 117 of file lte-test-ue-phy.cc.
References m_sinr, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 56 of file lte-test-ue-phy.cc.
References ns3::TypeId::SetParent().
|
virtual |
Reeive LTE Control Message.
msg | the control message |
Definition at line 111 of file lte-test-ue-phy.cc.
References NS_LOG_FUNCTION.
|
overridevirtual |
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: used only by eNB
interf | the 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.
|
overridevirtual |
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for evaluating RSRP
power | the RS power measured by the device |
Implements ns3::LtePhy.
Definition at line 97 of file lte-test-ue-phy.cc.
References NS_LOG_FUNCTION.
|
private |
the SINR
Definition at line 93 of file lte-test-ue-phy.h.
Referenced by GenerateCtrlCqiReport(), GenerateDataCqiReport(), and GetSinr().