#include <lte-phy.h>
Public Member Functions | |
LtePhy () | |
LtePhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy) | |
virtual | ~LtePhy () |
virtual Ptr< SpectrumValue > | CreateTxPowerSpectralDensity ()=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 | DoSetDownlinkSubChannels () |
do some operation after the set of a list of DL sub channels | |
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 | |
virtual void | GenerateCqiReport (const SpectrumValue &sinr)=0 |
std::list< Ptr < IdealControlMessage > > | GetControlMessages (void) |
Ptr< LteNetDevice > | GetDevice () |
Get the device where the phy layer is attached. | |
Ptr< LteSpectrumPhy > | GetDownlinkSpectrumPhy () |
std::vector< int > | GetDownlinkSubChannels (void) |
get a list of sub channel to use in the downlink | |
Ptr< PacketBurst > | GetPacketBurst (void) |
uint8_t | GetRbgSize (void) const |
double | GetTti (void) const |
Ptr< LteSpectrumPhy > | GetUplinkSpectrumPhy () |
std::vector< int > | GetUplinkSubChannels (void) |
get a list of sub channel to use in the downlink | |
virtual void | ReceiveIdealControlMessage (Ptr< IdealControlMessage > msg)=0 |
Receive SendIdealControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel. | |
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) | |
![]() | |
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) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
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::LtePhy. |
Protected Attributes | |
uint16_t | m_cellId |
std::vector< std::list< Ptr < IdealControlMessage > > > | m_controlMessagesQueue |
uint8_t | m_dlBandwidth |
uint16_t | m_dlEarfcn |
Ptr< LteSpectrumPhy > | m_downlinkSpectrumPhy |
std::vector< int > | m_listOfDownlinkSubchannel |
std::vector< int > | m_listOfUplinkSubchannel |
uint8_t | m_macChTtiDelay |
Ptr< LteNetDevice > | m_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< LteSpectrumPhy > | m_uplinkSpectrumPhy |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoStart (void) |
virtual void | NotifyNewAggregate (void) |
The LtePhy models the physical layer of LTE. It is composed by two LteSpectrumPhy, one for the downlink and one for the uplink.
ns3::LtePhy::LtePhy | ( | ) |
Definition at line 38 of file lte-phy.cc.
References NS_FATAL_ERROR, and NS_LOG_FUNCTION.
ns3::LtePhy::LtePhy | ( | Ptr< LteSpectrumPhy > | dlPhy, |
Ptr< LteSpectrumPhy > | ulPhy | ||
) |
dlPhy | the downlink LteSpectrumPhy instance |
ulPhy | the uplink LteSpectrumPhy instance |
Definition at line 44 of file lte-phy.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 67 of file lte-phy.cc.
References NS_LOG_FUNCTION.
|
pure virtual |
Compute the TX Power Spectral Density.
Implemented in ns3::LteEnbPhy, ns3::LteUePhy, and ns3::LteTestUePhy.
|
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 73 of file lte-phy.cc.
References ns3::Object::Dispose(), m_controlMessagesQueue, m_downlinkSpectrumPhy, m_netDevice, m_packetBurstQueue, m_uplinkSpectrumPhy, and NS_LOG_FUNCTION.
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
p | the MAC PDU to sent |
Implemented in ns3::LteEnbPhy, ns3::LteUePhy, and ns3::LteTestUePhy.
void ns3::LtePhy::DoSetBandwidth | ( | uint8_t | ulBandwidth, |
uint8_t | dlBandwidth | ||
) |
ulBandwidth | the UL bandwidth in RB |
dlBandwidth | the DL bandwidth in RB |
Definition at line 191 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().
void ns3::LtePhy::DoSetCellId | ( | uint16_t | cellId | ) |
cellId | the Cell Identifier |
Definition at line 281 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().
|
virtual |
do some operation after the set of a list of DL sub channels
Reimplemented in ns3::LteEnbPhy.
Definition at line 138 of file lte-phy.cc.
References NS_LOG_FUNCTION.
Referenced by SetDownlinkSubChannels().
|
virtual |
dlEarfcn | the carrier frequency (EARFCN) in downlink |
ulEarfcn | the carrier frequency (EARFCN) in downlink |
Definition at line 213 of file lte-phy.cc.
References m_dlEarfcn, and m_ulEarfcn.
Referenced by ns3::LteHelper::Attach(), and ns3::LteEnbNetDevice::UpdateConfig().
|
virtual |
do some operation after the set of a list of UL sub channels
Reimplemented in ns3::LteUePhy.
Definition at line 154 of file lte-phy.cc.
References NS_LOG_FUNCTION.
Referenced by SetUplinkSubChannels().
|
pure virtual |
generate a CQI report based on the given SINR
sinr | the SINR vs frequency measured by the device |
Implemented in ns3::LteEnbPhy, ns3::LteUePhy, and ns3::LteTestUePhy.
Referenced by ns3::LteCqiSinrChunkProcessor::End().
std::list< Ptr< IdealControlMessage > > ns3::LtePhy::GetControlMessages | ( | void | ) |
Definition at line 259 of file lte-phy.cc.
References m_controlMessagesQueue.
Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().
Ptr< LteNetDevice > ns3::LtePhy::GetDevice | ( | void | ) |
Get the device where the phy layer is attached.
Definition at line 95 of file lte-phy.cc.
References m_netDevice, and NS_LOG_FUNCTION.
Referenced by ns3::LteUePhy::DoSendIdealControlMessage(), ns3::LteUePhy::GenerateCqiReport(), and ns3::LteUePhy::SubframeIndication().
Ptr< LteSpectrumPhy > ns3::LtePhy::GetDownlinkSpectrumPhy | ( | ) |
Definition at line 102 of file lte-phy.cc.
References m_downlinkSpectrumPhy.
Referenced by ns3::LteHelper::AssignStreams(), ns3::LteHelper::Attach(), ns3::AnimationInterface::ConnectLteEnb(), ns3::AnimationInterface::ConnectLteUe(), ns3::LteLinkAdaptationTestCase::DoRun(), ns3::LteEnbAntennaTestCase::DoRun(), and ns3::LteInterferenceTestCase::DoRun().
std::vector< int > ns3::LtePhy::GetDownlinkSubChannels | ( | void | ) |
get a list of sub channel to use in the downlink
Definition at line 161 of file lte-phy.cc.
References m_listOfDownlinkSubchannel, and NS_LOG_FUNCTION.
Referenced by ns3::LteEnbPhy::CreateTxPowerSpectralDensity().
Ptr< PacketBurst > ns3::LtePhy::GetPacketBurst | ( | void | ) |
Definition at line 232 of file lte-phy.cc.
References m_packetBurstQueue.
Referenced by ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().
uint8_t ns3::LtePhy::GetRbgSize | ( | void | ) | const |
Definition at line 220 of file lte-phy.cc.
References m_rbgSize.
Referenced by ns3::LteUePhy::CreateDlCqiFeedbackMessage(), ns3::LteUePhy::ReceiveIdealControlMessage(), and ns3::LteEnbPhy::StartSubFrame().
double ns3::LtePhy::GetTti | ( | void | ) | const |
Definition at line 184 of file lte-phy.cc.
References m_tti, and NS_LOG_FUNCTION.
Referenced by ns3::LteEnbPhy::StartSubFrame().
|
static |
This method returns the TypeId associated to ns3::LtePhy.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Object.
Reimplemented in ns3::LteUePhy, ns3::LteEnbPhy, and ns3::LteTestUePhy.
Definition at line 58 of file lte-phy.cc.
References ns3::TypeId::SetParent().
Ptr< LteSpectrumPhy > ns3::LtePhy::GetUplinkSpectrumPhy | ( | ) |
Definition at line 108 of file lte-phy.cc.
References m_uplinkSpectrumPhy.
Referenced by ns3::LteHelper::AssignStreams(), ns3::AnimationInterface::ConnectLteEnb(), ns3::AnimationInterface::ConnectLteUe(), ns3::LteEnbAntennaTestCase::DoRun(), and ns3::LteInterferenceTestCase::DoRun().
std::vector< int > ns3::LtePhy::GetUplinkSubChannels | ( | void | ) |
get a list of sub channel to use in the downlink
Definition at line 169 of file lte-phy.cc.
References m_listOfUplinkSubchannel, and NS_LOG_FUNCTION.
Referenced by ns3::LteUePhy::DoSetUplinkSubChannels().
|
pure virtual |
Receive SendIdealControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
msg | the Ideal Control Message to receive |
Implemented in ns3::LteUePhy, ns3::LteEnbPhy, and ns3::LteTestUePhy.
Referenced by ns3::LteUePhy::SubframeIndication().
void ns3::LtePhy::SetControlMessages | ( | Ptr< IdealControlMessage > | m | ) |
m | the control message to be sent |
Definition at line 251 of file lte-phy.cc.
References m_controlMessagesQueue.
Referenced by ns3::LteEnbPhy::DoSendIdealControlMessage(), and ns3::LteUePhy::DoSendIdealControlMessage().
void ns3::LtePhy::SetDevice | ( | Ptr< LteNetDevice > | d | ) |
Set the device where the phy layer is attached.
d | the device |
Definition at line 87 of file lte-phy.cc.
References m_netDevice, and NS_LOG_FUNCTION.
void ns3::LtePhy::SetDownlinkChannel | ( | Ptr< SpectrumChannel > | c | ) |
Set the downlink channel
c | the downlink channel |
Definition at line 115 of file lte-phy.cc.
References m_downlinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetChannel().
void ns3::LtePhy::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)
mask | a vector of intefer values. Each elements of this vector carries information about the corresponding DL sub channel. If the i-th value of mask is equal to 1 (0) it means that the corresponding sub channel is used (not used) for the downlink. |
Definition at line 129 of file lte-phy.cc.
References DoSetDownlinkSubChannels(), m_listOfDownlinkSubchannel, and NS_LOG_FUNCTION.
Referenced by ns3::LteEnbPhy::StartSubFrame().
p | queue MAC PDU to be sent |
Definition at line 226 of file lte-phy.cc.
References m_packetBurstQueue.
Referenced by ns3::LteEnbPhy::DoSendMacPdu(), and ns3::LteUePhy::DoSendMacPdu().
void ns3::LtePhy::SetTti | ( | double | tti | ) |
tti | transmission time interval |
Definition at line 176 of file lte-phy.cc.
References m_tti, and NS_LOG_FUNCTION.
void ns3::LtePhy::SetUplinkChannel | ( | Ptr< SpectrumChannel > | c | ) |
Set the uplink channel
c | the uplink channel |
Definition at line 122 of file lte-phy.cc.
References m_uplinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetChannel().
void ns3::LtePhy::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)
mask | a vector of intefer values. Each elements of this vector carries information about the corresponding UL sub channel. If the i-th value of mask is equal to 1 (0) it means that the corresponding sub channel is used (not used) for the uplink. |
Definition at line 145 of file lte-phy.cc.
References DoSetUplinkSubChannels(), m_listOfUplinkSubchannel, and NS_LOG_FUNCTION.
|
protected |
Definition at line 252 of file lte-phy.h.
Referenced by DoSetCellId().
|
protected |
Definition at line 249 of file lte-phy.h.
Referenced by DoDispose(), GetControlMessages(), ns3::LteUePhy::LteUePhy(), SetControlMessages(), and ns3::LteEnbPhy::SetMacChDelay().
|
protected |
Definition at line 242 of file lte-phy.h.
Referenced by ns3::LteUePhy::CreateDlCqiFeedbackMessage(), ns3::LteEnbPhy::CreateTxPowerSpectralDensity(), DoSetBandwidth(), and ns3::LteUePhy::DoStart().
|
protected |
Definition at line 245 of file lte-phy.h.
Referenced by ns3::LteEnbPhy::CreateTxPowerSpectralDensity(), DoSetEarfcn(), and ns3::LteUePhy::DoStart().
|
protected |
Definition at line 231 of file lte-phy.h.
Referenced by DoDispose(), DoSetCellId(), ns3::LteEnbPhy::DoSetDownlinkSubChannels(), ns3::LteUePhy::DoSetTransmissionMode(), ns3::LteUePhy::DoStart(), GetDownlinkSpectrumPhy(), ns3::LteUePhy::ReceiveIdealControlMessage(), SetDownlinkChannel(), ns3::LteUePhy::SetEnbCellId(), ns3::LteUePhy::SetTxModeGain(), and ns3::LteEnbPhy::StartSubFrame().
|
protected |
Definition at line 234 of file lte-phy.h.
Referenced by GetDownlinkSubChannels(), and SetDownlinkSubChannels().
|
protected |
Definition at line 235 of file lte-phy.h.
Referenced by GetUplinkSubChannels(), and SetUplinkSubChannels().
|
protected |
Definition at line 250 of file lte-phy.h.
Referenced by ns3::LteEnbPhy::DoGetMacChTtiDelay(), ns3::LteUePhy::GetMacChDelay(), ns3::LteEnbPhy::GetMacChDelay(), ns3::LteUePhy::LteUePhy(), ns3::LteUePhy::QueueSubChannelsForTransmission(), ns3::LteEnbPhy::SetMacChDelay(), and ns3::LteUePhy::SubframeIndication().
|
protected |
Definition at line 229 of file lte-phy.h.
Referenced by DoDispose(), GetDevice(), and SetDevice().
|
protected |
Definition at line 238 of file lte-phy.h.
Referenced by ns3::LteEnbPhy::DoStart(), ns3::LteUePhy::DoStart(), ns3::LteEnbPhy::GetNoiseFigure(), ns3::LteUePhy::GetNoiseFigure(), ns3::LteEnbPhy::SetNoiseFigure(), and ns3::LteUePhy::SetNoiseFigure().
|
protected |
Definition at line 248 of file lte-phy.h.
Referenced by DoDispose(), GetPacketBurst(), ns3::LteUePhy::LteUePhy(), ns3::LteEnbPhy::SetMacChDelay(), and SetMacPdu().
|
protected |
Definition at line 243 of file lte-phy.h.
Referenced by DoSetBandwidth(), and GetRbgSize().
|
protected |
|
protected |
Definition at line 237 of file lte-phy.h.
Referenced by ns3::LteUePhy::CreateTxPowerSpectralDensity(), ns3::LteEnbPhy::CreateTxPowerSpectralDensity(), ns3::LteEnbPhy::GetTxPower(), ns3::LteUePhy::GetTxPower(), ns3::LteEnbPhy::SetTxPower(), and ns3::LteUePhy::SetTxPower().
|
protected |
Definition at line 241 of file lte-phy.h.
Referenced by ns3::LteUePhy::CreateTxPowerSpectralDensity(), DoSetBandwidth(), and ns3::LteEnbPhy::DoStart().
|
protected |
Definition at line 246 of file lte-phy.h.
Referenced by ns3::LteUePhy::CreateTxPowerSpectralDensity(), DoSetEarfcn(), and ns3::LteEnbPhy::DoStart().
|
protected |
Definition at line 232 of file lte-phy.h.
Referenced by DoDispose(), DoSetCellId(), ns3::LteEnbPhy::DoStart(), GetUplinkSpectrumPhy(), ns3::LteUePhy::SetEnbCellId(), ns3::LteUePhy::SetSubChannelsForTransmission(), SetUplinkChannel(), ns3::LteEnbPhy::StartSubFrame(), and ns3::LteUePhy::SubframeIndication().