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

#include <lte-phy.h>

+ Inheritance diagram for ns3::LtePhy:
+ Collaboration diagram for ns3::LtePhy:

Public Member Functions

 LtePhy ()
 LtePhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy)
virtual ~LtePhy ()
virtual Ptr< SpectrumValueCreateTxPowerSpectralDensity ()=0
 Compute the TX Power Spectral Density.
void DoDispose ()
virtual void DoSendMacPdu (Ptr< Packet > p)=0
 Queue the MAC PDU to be sent (according to m_macChTtiDelay)
void DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth)
void DoSetCellId (uint16_t cellId)
virtual void DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn)
virtual void GenerateCtrlCqiReport (const SpectrumValue &sinr)=0
virtual void GenerateDataCqiReport (const SpectrumValue &sinr)=0
std::list< Ptr
< LteControlMessage > > 
GetControlMessages (void)
Ptr< LteNetDeviceGetDevice ()
 Get the device where the phy layer is attached.
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 SetControlMessages (Ptr< LteControlMessage > m)
void SetDevice (Ptr< LteNetDevice > d)
 Set the device where the phy layer is attached.
void SetDownlinkChannel (Ptr< SpectrumChannel > c)
void SetMacPdu (Ptr< Packet > p)
void SetTti (double tti)
 Receive SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
void SetUplinkChannel (Ptr< SpectrumChannel > c)
- 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)

Protected Attributes

uint16_t m_cellId
std::vector< std::list< Ptr
< LteControlMessage > > > 
m_controlMessagesQueue
uint8_t m_dlBandwidth
uint16_t m_dlEarfcn
Ptr< LteSpectrumPhym_downlinkSpectrumPhy
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

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void DoStart (void)
virtual void NotifyNewAggregate (void)

Detailed Description

The LtePhy models the physical layer of LTE. It is composed by two LteSpectrumPhy, one for the downlink and one for the uplink.

This type is not accessible from the Config system.
No Attributes are defined for this type.
No TraceSources are defined for this type.

Definition at line 52 of file lte-phy.h.

Constructor & Destructor Documentation

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

Definition at line 39 of file lte-phy.cc.

References NS_FATAL_ERROR, and NS_LOG_FUNCTION.

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

Definition at line 45 of file lte-phy.cc.

References NS_LOG_FUNCTION.

ns3::LtePhy::~LtePhy ( )
virtual

Definition at line 69 of file lte-phy.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

virtual Ptr<SpectrumValue> ns3::LtePhy::CreateTxPowerSpectralDensity ( )
pure virtual

Compute the TX Power Spectral Density.

Returns
a pointer to a newly allocated SpectrumValue representing the TX Power Spectral Density in W/Hz for each Resource Block

Implemented in ns3::LteEnbPhy, ns3::LteUePhy, and ns3::LteTestUePhy.

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

Reimplemented in ns3::LteUePhy, ns3::LteEnbPhy, and ns3::LteTestUePhy.

Definition at line 75 of file lte-phy.cc.

References ns3::Object::Dispose(), m_controlMessagesQueue, m_downlinkSpectrumPhy, m_netDevice, m_packetBurstQueue, m_uplinkSpectrumPhy, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

virtual void ns3::LtePhy::DoSendMacPdu ( Ptr< Packet p)
pure virtual

Queue the MAC PDU to be sent (according to m_macChTtiDelay)

Parameters
pthe MAC PDU to sent

Implemented in ns3::LteEnbPhy, ns3::LteUePhy, and ns3::LteTestUePhy.

void ns3::LtePhy::DoSetBandwidth ( uint8_t  ulBandwidth,
uint8_t  dlBandwidth 
)
Parameters
ulBandwidththe UL bandwidth in RB
dlBandwidththe DL bandwidth in RB

Definition at line 146 of file lte-phy.cc.

References m_dlBandwidth, m_rbgSize, m_ulBandwidth, and ns3::Type0AllocationRbg.

Referenced by ns3::LteHelper::Attach(), ns3::EnbMemberLteEnbPhySapProvider::SetBandwidth(), ns3::UeMemberLteUePhySapProvider::SetBandwidth(), and ns3::LteEnbNetDevice::UpdateConfig().

+ Here is the caller graph for this function:

void ns3::LtePhy::DoSetCellId ( uint16_t  cellId)
Parameters
cellIdthe Cell Identifier

Definition at line 273 of file lte-phy.cc.

References m_cellId, m_downlinkSpectrumPhy, m_uplinkSpectrumPhy, and ns3::LteSpectrumPhy::SetCellId().

Referenced by ns3::EnbMemberLteEnbPhySapProvider::SetCellId(), ns3::LteUeNetDevice::SetTargetEnb(), and ns3::LteEnbNetDevice::UpdateConfig().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::LtePhy::DoSetEarfcn ( uint16_t  dlEarfcn,
uint16_t  ulEarfcn 
)
virtual
Parameters
dlEarfcnthe carrier frequency (EARFCN) in downlink
ulEarfcnthe carrier frequency (EARFCN) in downlink

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

References m_dlEarfcn, and m_ulEarfcn.

Referenced by ns3::LteHelper::Attach(), and ns3::LteEnbNetDevice::UpdateConfig().

+ Here is the caller graph for this function:

virtual void ns3::LtePhy::GenerateCtrlCqiReport ( const SpectrumValue sinr)
pure virtual

generate a CQI report based on the given SINR of Ctrl frame

Parameters
sinrthe SINR vs frequency measured by the device

Implemented in ns3::LteEnbPhy, ns3::LteUePhy, and ns3::LteTestUePhy.

Referenced by ns3::LteCtrlSinrChunkProcessor::End().

+ Here is the caller graph for this function:

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

Implemented in ns3::LteEnbPhy, ns3::LteUePhy, and ns3::LteTestUePhy.

Referenced by ns3::LteDataSinrChunkProcessor::End().

+ Here is the caller graph for this function:

std::list< Ptr< LteControlMessage > > ns3::LtePhy::GetControlMessages ( void  )
Returns
the list of control messages to be sent

Definition at line 251 of file lte-phy.cc.

References m_controlMessagesQueue.

Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().

+ Here is the caller graph for this function:

Ptr< LteNetDevice > ns3::LtePhy::GetDevice ( void  )

Get the device where the phy layer is attached.

Returns
the pointer to the device

Definition at line 97 of file lte-phy.cc.

References m_netDevice, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::DoSendLteControlMessage(), and ns3::LteUePhy::GenerateCtrlCqiReport().

+ Here is the caller graph for this function:

Ptr< LteSpectrumPhy > ns3::LtePhy::GetDownlinkSpectrumPhy ( )
Ptr< PacketBurst > ns3::LtePhy::GetPacketBurst ( void  )
Returns
the packet burst to be sent

Definition at line 224 of file lte-phy.cc.

References m_packetBurstQueue.

Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().

+ Here is the caller graph for this function:

uint8_t ns3::LtePhy::GetRbgSize ( void  ) const
Returns
the RB gruop size according to the bandwidth

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

References m_rbgSize.

Referenced by ns3::LteUePhy::CreateDlCqiFeedbackMessage(), ns3::LteUePhy::ReceiveLteControlMessageList(), and ns3::LteEnbPhy::StartSubFrame().

+ Here is the caller graph for this function:

uint16_t ns3::LtePhy::GetSrsPeriodicity ( uint16_t  srcCi) const
Returns
the SRS periodicity (see Table 8.2-1 of 36.213)
Parameters
srcCithe SRS Configuration Index

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

Referenced by ns3::LteEnbPhy::DoSetSrsConfigurationIndex(), and ns3::LteUePhy::DoSetSrsConfigurationIndex().

+ Here is the caller graph for this function:

uint16_t ns3::LtePhy::GetSrsSubframeOffset ( uint16_t  srcCi) const
Returns
the SRS Subframe offset (see Table 8.2-1 of 36.213)
Parameters
srcCithe SRS Configuration Index

Definition at line 187 of file lte-phy.cc.

Referenced by ns3::LteEnbPhy::DoSetSrsConfigurationIndex(), and ns3::LteUePhy::DoSetSrsConfigurationIndex().

+ Here is the caller graph for this function:

double ns3::LtePhy::GetTti ( void  ) const
Returns
transmission time interval

Definition at line 139 of file lte-phy.cc.

References m_tti, and NS_LOG_FUNCTION.

Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().

+ Here is the caller graph for this function:

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

Reimplemented from ns3::Object.

Reimplemented in ns3::LteUePhy, ns3::LteEnbPhy, and ns3::LteTestUePhy.

Definition at line 60 of file lte-phy.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

Ptr< LteSpectrumPhy > ns3::LtePhy::GetUplinkSpectrumPhy ( )
Returns
a pointer to the LteSpectrumPhy instance that manages the uplink

Definition at line 110 of file lte-phy.cc.

References m_uplinkSpectrumPhy.

Referenced by ns3::LteHelper::AssignStreams(), ns3::AnimationInterface::ConnectLteEnb(), ns3::AnimationInterface::ConnectLteUe(), ns3::LteInterferenceTestCase::DoRun(), and ns3::LteEnbAntennaTestCase::DoRun().

+ Here is the caller graph for this function:

void ns3::LtePhy::SetControlMessages ( Ptr< LteControlMessage m)
Parameters
mthe control message to be sent

Definition at line 243 of file lte-phy.cc.

References m_controlMessagesQueue.

Referenced by ns3::LteUePhy::DoSendLteControlMessage(), and ns3::LteEnbPhy::DoSendLteControlMessage().

+ Here is the caller graph for this function:

void ns3::LtePhy::SetDevice ( Ptr< LteNetDevice d)

Set the device where the phy layer is attached.

Parameters
dthe device

Definition at line 89 of file lte-phy.cc.

References m_netDevice, and NS_LOG_FUNCTION.

void ns3::LtePhy::SetDownlinkChannel ( Ptr< SpectrumChannel c)

Set the downlink channel

Parameters
cthe downlink channel

Definition at line 117 of file lte-phy.cc.

References m_downlinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetChannel().

+ Here is the call graph for this function:

void ns3::LtePhy::SetMacPdu ( Ptr< Packet p)
Parameters
pqueue MAC PDU to be sent

Definition at line 218 of file lte-phy.cc.

References m_packetBurstQueue.

Referenced by ns3::LteUePhy::DoSendMacPdu(), and ns3::LteEnbPhy::DoSendMacPdu().

+ Here is the caller graph for this function:

void ns3::LtePhy::SetTti ( double  tti)

Receive SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.

Parameters
msgthe Ideal Control Message to receive
ttitransmission time interval

Definition at line 131 of file lte-phy.cc.

References m_tti, and NS_LOG_FUNCTION.

void ns3::LtePhy::SetUplinkChannel ( Ptr< SpectrumChannel c)

Set the uplink channel

Parameters
cthe uplink channel

Definition at line 124 of file lte-phy.cc.

References m_uplinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetChannel().

+ Here is the call graph for this function:

Member Data Documentation

uint16_t ns3::LtePhy::m_cellId
protected
std::vector< std::list<Ptr<LteControlMessage> > > ns3::LtePhy::m_controlMessagesQueue
protected
uint16_t ns3::LtePhy::m_dlEarfcn
protected
Ptr<LteNetDevice> ns3::LtePhy::m_netDevice
protected

Definition at line 217 of file lte-phy.h.

Referenced by DoDispose(), GetDevice(), and SetDevice().

std::vector< Ptr<PacketBurst> > ns3::LtePhy::m_packetBurstQueue
protected
uint8_t ns3::LtePhy::m_rbgSize
protected

Definition at line 228 of file lte-phy.h.

Referenced by DoSetBandwidth(), and GetRbgSize().

double ns3::LtePhy::m_tti
protected

Definition at line 225 of file lte-phy.h.

Referenced by GetTti(), and SetTti().

uint16_t ns3::LtePhy::m_ulEarfcn
protected

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