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. | |
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< LteNetDevice > | GetDevice () const |
Get the device where the phy layer is attached. | |
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. | |
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< Object > | GetObject () 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< Object > | GetObject (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. | |
SimpleRefCount & | operator= (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< LteSpectrumPhy > | m_downlinkSpectrumPhy |
The downlink LteSpectrumPhy associated to this LtePhy. | |
uint8_t | m_macChTtiDelay |
Delay between MAC and channel layer in terms of TTIs. | |
Ptr< LteNetDevice > | m_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< LteSpectrumPhy > | m_uplinkSpectrumPhy |
The uplink LteSpectrumPhy associated to this LtePhy. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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.
ns3::LteTestUePhy::LteTestUePhy | ( | ) |
Definition at line 20 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 26 of file lte-test-ue-phy.cc.
References NS_LOG_FUNCTION.
|
override |
Definition at line 32 of file lte-test-ue-phy.cc.
|
overridevirtual |
Create the PSD for the TX.
Implements ns3::LtePhy.
Definition at line 59 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 37 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 53 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 68 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 77 of file lte-test-ue-phy.cc.
References m_sinr, and NS_LOG_FUNCTION.
SpectrumValue ns3::LteTestUePhy::GetSinr | ( | ) |
Get the SINR.
Definition at line 106 of file lte-test-ue-phy.cc.
References m_sinr, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 45 of file lte-test-ue-phy.cc.
References ns3::TypeId::SetParent().
|
virtual |
Reeive LTE Control Message.
msg | the control message |
Definition at line 100 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 93 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 86 of file lte-test-ue-phy.cc.
References NS_LOG_FUNCTION.
|
private |
the SINR
Definition at line 82 of file lte-test-ue-phy.h.
Referenced by GenerateCtrlCqiReport(), GenerateDataCqiReport(), and GetSinr().