A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::LteEnbPhy Class Reference

#include <lte-enb-phy.h>

+ Inheritance diagram for ns3::LteEnbPhy:
+ Collaboration diagram for ns3::LteEnbPhy:

Public Member Functions

 LteEnbPhy ()
 LteEnbPhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy)
virtual ~LteEnbPhy ()
bool AddUePhy (uint16_t rnti, Ptr< LteUePhy > phy)
void CalcChannelQualityForUe (std::vector< double > sinr, Ptr< LteSpectrumPhy > ue)
 Calculate the channel quality for a given UE.
virtual Ptr< SpectrumValueCreateTxPowerSpectralDensity ()
 Create the PSD for TX.
UlCqi_s CreateUlCqiReport (const SpectrumValue &sinr)
 Create the UL CQI feedback from SINR values perceived at the physical layer with the signal received from eNB.
bool DeleteUePhy (uint16_t rnti)
std::list
< UlDciIdealControlMessage
DequeueUlDci (void)
virtual void DoDispose (void)
virtual uint8_t DoGetMacChTtiDelay ()
void DoSendIdealControlMessage (Ptr< IdealControlMessage > msg)
virtual void DoSendMacPdu (Ptr< Packet > p)
 Queue the MAC PDU to be sent.
void DoSetDownlinkSubChannels ()
 do some operation after the set of a list of DL sub channels
virtual void DoSetTransmissionMode (uint16_t rnti, uint8_t txMode)
virtual void DoStart (void)
void EndFrame (void)
 End a LTE frame.
void EndSubFrame (void)
 End a LTE sub frame.
virtual void GenerateCqiReport (const SpectrumValue &sinr)
LteEnbPhySapProviderGetLteEnbPhySapProvider ()
 Get the PHY SAP provider.
uint8_t GetMacChDelay (void) const
double GetNoiseFigure () const
double GetTxPower () const
void PhyPduReceived (Ptr< Packet > p)
 PhySpectrum received a new PHY-PDU.
void QueueUlDci (UlDciIdealControlMessage m)
virtual void ReceiveIdealControlMessage (Ptr< IdealControlMessage > msg)
 Send the control message.
void SetLteEnbPhySapUser (LteEnbPhySapUser *s)
 Set the PHY SAP User.
void SetMacChDelay (uint8_t delay)
void SetNoiseFigure (double pow)
void SetTxPower (double pow)
void StartFrame (void)
 Start a LTE frame.
void StartSubFrame (void)
 Start a LTE sub frame.
- Public Member Functions inherited from ns3::LtePhy
 LtePhy ()
 LtePhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy)
virtual ~LtePhy ()
void DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth)
void DoSetCellId (uint16_t cellId)
virtual void DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn)
virtual void DoSetUplinkSubChannels ()
 do some operation after the set of a list of UL sub channels
std::list< Ptr
< IdealControlMessage > > 
GetControlMessages (void)
Ptr< LteNetDeviceGetDevice ()
 Get the device where the phy layer is attached.
Ptr< LteSpectrumPhyGetDownlinkSpectrumPhy ()
std::vector< int > GetDownlinkSubChannels (void)
 get a list of sub channel to use in the downlink
Ptr< PacketBurstGetPacketBurst (void)
uint8_t GetRbgSize (void) const
double GetTti (void) const
Ptr< LteSpectrumPhyGetUplinkSpectrumPhy ()
std::vector< int > GetUplinkSubChannels (void)
 get a list of sub channel to use in the downlink
void SetControlMessages (Ptr< IdealControlMessage > m)
void SetDevice (Ptr< LteNetDevice > d)
 Set the device where the phy layer is attached.
void SetDownlinkChannel (Ptr< SpectrumChannel > c)
void SetDownlinkSubChannels (std::vector< int > mask)
 set a list of sub channel to use in the downlink. A sub channel is composed by a couple of resource bloks (180KHz x 1 ms)
void SetMacPdu (Ptr< Packet > p)
void SetTti (double tti)
void SetUplinkChannel (Ptr< SpectrumChannel > c)
void SetUplinkSubChannels (std::vector< int > mask)
 set a list of sub channel to use in the uplink. A sub channel is composed by a couple of resource bloks (180KHz x 1 ms)
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~Object ()
void AggregateObject (Ptr< Object > other)
void Dispose (void)
AggregateIterator GetAggregateIterator (void) const
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::LteEnbPhy.

Private Attributes

LteEnbPhySapProviderm_enbPhySapProvider
LteEnbPhySapUserm_enbPhySapUser
uint32_t m_nrFrames
uint32_t m_nrSubFrames
std::map< uint16_t, Ptr
< LteUePhy > > 
m_ueAttached
std::vector< std::list
< UlDciIdealControlMessage > > 
m_ulDciQueue

Friends

class EnbMemberLteEnbPhySapProvider

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void NotifyNewAggregate (void)
- Protected Attributes inherited from ns3::LtePhy
uint16_t m_cellId
std::vector< std::list< Ptr
< IdealControlMessage > > > 
m_controlMessagesQueue
uint8_t m_dlBandwidth
uint16_t m_dlEarfcn
Ptr< LteSpectrumPhym_downlinkSpectrumPhy
std::vector< int > m_listOfDownlinkSubchannel
std::vector< int > m_listOfUplinkSubchannel
uint8_t m_macChTtiDelay
Ptr< LteNetDevicem_netDevice
double m_noiseFigure
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
uint8_t m_rbgSize
double m_tti
double m_txPower
uint8_t m_ulBandwidth
uint16_t m_ulEarfcn
Ptr< LteSpectrumPhym_uplinkSpectrumPhy

Detailed Description

LteEnbPhy models the physical layer for the eNodeB

Definition at line 40 of file lte-enb-phy.h.

Constructor & Destructor Documentation

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

Definition at line 119 of file lte-enb-phy.cc.

References NS_FATAL_ERROR, and NS_LOG_FUNCTION.

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

Definition at line 125 of file lte-enb-phy.cc.

References EnbMemberLteEnbPhySapProvider, m_enbPhySapProvider, ns3::Simulator::ScheduleNow(), and StartFrame().

+ Here is the call graph for this function:

ns3::LteEnbPhy::~LteEnbPhy ( )
virtual

Definition at line 169 of file lte-enb-phy.cc.

Member Function Documentation

bool ns3::LteEnbPhy::AddUePhy ( uint16_t  rnti,
Ptr< LteUePhy phy 
)

Definition at line 259 of file lte-enb-phy.cc.

References m_ueAttached, and NS_LOG_ERROR.

void ns3::LteEnbPhy::CalcChannelQualityForUe ( std::vector< double >  sinr,
Ptr< LteSpectrumPhy ue 
)

Calculate the channel quality for a given UE.

Parameters
sinra list of computed SINR
uethe UE

Definition at line 336 of file lte-enb-phy.cc.

References NS_LOG_FUNCTION.

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

Create the PSD for TX.

Implements ns3::LtePhy.

Definition at line 325 of file lte-enb-phy.cc.

References ns3::LtePhy::GetDownlinkSubChannels(), ns3::LtePhy::m_dlBandwidth, ns3::LtePhy::m_dlEarfcn, ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.

Referenced by DoSetDownlinkSubChannels().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UlCqi_s ns3::LteEnbPhy::CreateUlCqiReport ( const SpectrumValue sinr)

Create the UL CQI feedback from SINR values perceived at the physical layer with the signal received from eNB.

Parameters
sinrSINR values vector

Definition at line 527 of file lte-enb-phy.cc.

References ns3::SpectrumValue::ConstValuesBegin(), ns3::SpectrumValue::ConstValuesEnd(), ns3::LteFfConverter::double2fpS11dot3(), UlCqi_s::m_sinr, UlCqi_s::m_type, NS_LOG_FUNCTION, and UlCqi_s::PUSCH.

Referenced by GenerateCqiReport().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::LteEnbPhy::DeleteUePhy ( uint16_t  rnti)

Definition at line 276 of file lte-enb-phy.cc.

References m_ueAttached, and NS_LOG_ERROR.

std::list< UlDciIdealControlMessage > ns3::LteEnbPhy::DequeueUlDci ( void  )
Returns
the list of UL-CQI to be processed

Definition at line 562 of file lte-enb-phy.cc.

References m_ulDciQueue, and NS_LOG_FUNCTION.

Referenced by StartSubFrame().

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::DoDispose ( void  )
virtual

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden 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 174 of file lte-enb-phy.cc.

References m_enbPhySapProvider, m_ueAttached, and NS_LOG_FUNCTION.

uint8_t ns3::LteEnbPhy::DoGetMacChTtiDelay ( )
virtual

Definition at line 302 of file lte-enb-phy.cc.

References ns3::LtePhy::m_macChTtiDelay.

Referenced by ns3::EnbMemberLteEnbPhySapProvider::GetMacChTtiDelay().

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::DoSendIdealControlMessage ( Ptr< IdealControlMessage msg)

Definition at line 343 of file lte-enb-phy.cc.

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

Referenced by ns3::EnbMemberLteEnbPhySapProvider::SendIdealControlMessage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::DoSendMacPdu ( Ptr< Packet p)
virtual

Queue the MAC PDU to be sent.

Parameters
pthe MAC PDU to sent

Implements ns3::LtePhy.

Definition at line 295 of file lte-enb-phy.cc.

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

Referenced by ns3::EnbMemberLteEnbPhySapProvider::SendMacPdu().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::DoSetDownlinkSubChannels ( )
virtual

do some operation after the set of a list of DL sub channels

Reimplemented from ns3::LtePhy.

Definition at line 316 of file lte-enb-phy.cc.

References CreateTxPowerSpectralDensity(), ns3::LtePhy::m_downlinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetTxPowerSpectralDensity().

+ Here is the call graph for this function:

void ns3::LteEnbPhy::DoSetTransmissionMode ( uint16_t  rnti,
uint8_t  txMode 
)
virtual

Definition at line 548 of file lte-enb-phy.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::EnbMemberLteEnbPhySapProvider::SetTransmissionMode().

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::DoStart ( void  )
virtual

This method is called only once by Object::Start. If the user calls Object::Start multiple times, DoStart is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.

Reimplemented from ns3::Object.

Definition at line 183 of file lte-enb-phy.cc.

References ns3::LteSpectrumValueHelper::CreateNoisePowerSpectralDensity(), ns3::LtePhy::m_noiseFigure, ns3::LtePhy::m_ulBandwidth, ns3::LtePhy::m_ulEarfcn, ns3::LtePhy::m_uplinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetNoisePowerSpectralDensity().

+ Here is the call graph for this function:

void ns3::LteEnbPhy::EndFrame ( void  )

End a LTE frame.

Definition at line 511 of file lte-enb-phy.cc.

References ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and StartFrame().

Referenced by EndSubFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::EndSubFrame ( void  )

End a LTE sub frame.

Definition at line 496 of file lte-enb-phy.cc.

References EndFrame(), m_nrSubFrames, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), and StartSubFrame().

Referenced by StartSubFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::GenerateCqiReport ( const SpectrumValue sinr)
virtual

generate a CQI report based on the given SINR

Parameters
sinrthe SINR vs frequency measured by the device

Implements ns3::LtePhy.

Definition at line 519 of file lte-enb-phy.cc.

References CreateUlCqiReport(), m_enbPhySapUser, NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::UlCqiReport().

+ Here is the call graph for this function:

LteEnbPhySapProvider * ns3::LteEnbPhy::GetLteEnbPhySapProvider ( )

Get the PHY SAP provider.

Returns
a pointer to the SAP Provider of the PHY

Definition at line 199 of file lte-enb-phy.cc.

References m_enbPhySapProvider.

uint8_t ns3::LteEnbPhy::GetMacChDelay ( void  ) const
Returns
the TTI delay between MAC and channel

Definition at line 253 of file lte-enb-phy.cc.

References ns3::LtePhy::m_macChTtiDelay.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

double ns3::LteEnbPhy::GetNoiseFigure ( ) const
Returns
the noise figure in dB

Definition at line 226 of file lte-enb-phy.cc.

References ns3::LtePhy::m_noiseFigure, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

double ns3::LteEnbPhy::GetTxPower ( ) const
Returns
the transmission power in dBm

Definition at line 212 of file lte-enb-phy.cc.

References ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

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

This method returns the TypeId associated to ns3::LteEnbPhy.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::LteEnbNetDevice/LteEnbPhy
  • /NodeList/[i]/DeviceList/[i]/$ns3::LteNetDevice/$ns3::LteEnbNetDevice/LteEnbPhy

Attributes defined for this type:

  • TxPower: Transmission power in dBm
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 30
    • Flags: construct write read
  • NoiseFigure: Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver. According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "the difference in decibels (dB) between the noise output of the actual receiver to the noise output of an ideal receiver with the same overall gain and bandwidth when the receivers are connected to sources at the standard noise temperature T0." In this model, we consider T0 = 290K.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 5
    • Flags: construct write read
  • MacToChannelDelay: The delay in TTI units that occurs between a scheduling decision in the MAC and the actual start of the transmission by the PHY. This is intended to be used to model the latency of real PHY and MAC implementations.

No TraceSources defined for this type.

Reimplemented from ns3::LtePhy.

Definition at line 135 of file lte-enb-phy.cc.

References GetMacChDelay(), GetNoiseFigure(), GetTxPower(), SetMacChDelay(), SetNoiseFigure(), ns3::TypeId::SetParent(), and SetTxPower().

+ Here is the call graph for this function:

void ns3::LteEnbPhy::PhyPduReceived ( Ptr< Packet p)

PhySpectrum received a new PHY-PDU.

Definition at line 309 of file lte-enb-phy.cc.

References m_enbPhySapUser, NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::ReceivePhyPdu().

Referenced by ns3::LteHelper::InstallSingleEnbDevice().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::QueueUlDci ( UlDciIdealControlMessage  m)
Parameters
mthe UL-CQI to be queued

Definition at line 555 of file lte-enb-phy.cc.

References m_ulDciQueue, NS_LOG_FUNCTION, and UL_PUSCH_TTIS_DELAY.

Referenced by StartSubFrame().

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::ReceiveIdealControlMessage ( Ptr< IdealControlMessage msg)
virtual

Send the control message.

Parameters
msgthe message to send Receive the control message
msgthe received message

Implements ns3::LtePhy.

Definition at line 353 of file lte-enb-phy.cc.

References m_enbPhySapUser, NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::ReceiveIdealControlMessage().

+ Here is the call graph for this function:

void ns3::LteEnbPhy::SetLteEnbPhySapUser ( LteEnbPhySapUser s)

Set the PHY SAP User.

Parameters
sa pointer to the PHY SAP user

Definition at line 193 of file lte-enb-phy.cc.

References m_enbPhySapUser.

void ns3::LteEnbPhy::SetMacChDelay ( uint8_t  delay)
Parameters
delaythe TTI delay between MAC and channel

Definition at line 233 of file lte-enb-phy.cc.

References ns3::LtePhy::m_controlMessagesQueue, ns3::LtePhy::m_macChTtiDelay, ns3::LtePhy::m_packetBurstQueue, m_ulDciQueue, and UL_PUSCH_TTIS_DELAY.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::SetNoiseFigure ( double  pow)
Parameters
pwthe noise figure in dB

Definition at line 219 of file lte-enb-phy.cc.

References ns3::LtePhy::m_noiseFigure, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::SetTxPower ( double  pow)
Parameters
pwthe transmission power in dBm

Definition at line 205 of file lte-enb-phy.cc.

References ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::LteEnbPhy::StartFrame ( void  )

Start a LTE frame.

Definition at line 362 of file lte-enb-phy.cc.

References m_nrFrames, m_nrSubFrames, NS_LOG_FUNCTION, NS_LOG_INFO, and StartSubFrame().

Referenced by EndFrame(), and LteEnbPhy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class EnbMemberLteEnbPhySapProvider
friend

Definition at line 43 of file lte-enb-phy.h.

Referenced by LteEnbPhy().

Member Data Documentation

LteEnbPhySapProvider* ns3::LteEnbPhy::m_enbPhySapProvider
private

Definition at line 201 of file lte-enb-phy.h.

Referenced by DoDispose(), GetLteEnbPhySapProvider(), and LteEnbPhy().

LteEnbPhySapUser* ns3::LteEnbPhy::m_enbPhySapUser
private
uint32_t ns3::LteEnbPhy::m_nrFrames
private

Definition at line 204 of file lte-enb-phy.h.

Referenced by StartFrame(), and StartSubFrame().

uint32_t ns3::LteEnbPhy::m_nrSubFrames
private

Definition at line 205 of file lte-enb-phy.h.

Referenced by EndSubFrame(), StartFrame(), and StartSubFrame().

std::map<uint16_t, Ptr<LteUePhy> > ns3::LteEnbPhy::m_ueAttached
private

Definition at line 197 of file lte-enb-phy.h.

Referenced by AddUePhy(), DeleteUePhy(), DoDispose(), and StartSubFrame().

std::vector< std::list<UlDciIdealControlMessage> > ns3::LteEnbPhy::m_ulDciQueue
private

Definition at line 199 of file lte-enb-phy.h.

Referenced by DequeueUlDci(), QueueUlDci(), and SetMacChDelay().


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