#include <lte-ue-phy.h>
Public Member Functions | |
LteUePhy () | |
LteUePhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy) | |
virtual | ~LteUePhy () |
Ptr< DlCqiIdealControlMessage > | CreateDlCqiFeedbackMessage (const SpectrumValue &sinr) |
Create the DL CQI feedback from SINR values perceived at the physical layer with the signal received from eNB. | |
virtual Ptr< SpectrumValue > | CreateTxPowerSpectralDensity () |
Create the PSD for the TX. | |
virtual void | DoDispose (void) |
virtual void | DoSendIdealControlMessage (Ptr< IdealControlMessage > msg) |
virtual void | DoSendMacPdu (Ptr< Packet > p) |
Queue the MAC PDU to be sent. | |
virtual void | DoSetTransmissionMode (uint8_t txMode) |
virtual void | DoSetUplinkSubChannels () |
Update available channel for TX. | |
virtual void | DoStart (void) |
virtual void | GenerateCqiReport (const SpectrumValue &sinr) |
LteUePhySapProvider * | GetLteUePhySapProvider () |
Get the PHY SAP provider. | |
uint8_t | GetMacChDelay (void) const |
double | GetNoiseFigure () const |
std::vector< int > | GetSubChannelsForReception (void) |
Get a list of sub channels to use in RX. | |
std::vector< int > | GetSubChannelsForTransmission (void) |
Get a list of sub channels to use in RX. | |
double | GetTxPower () const |
void | PhyPduReceived (Ptr< Packet > p) |
PhySpectrum received a new PHY-PDU. | |
virtual void | ReceiveIdealControlMessage (Ptr< IdealControlMessage > msg) |
Receive SendIdealControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel. | |
void | SetEnbCellId (uint16_t cellId) |
void | SetLteUePhySapUser (LteUePhySapUser *s) |
Set the PHY SAP User. | |
void | SetNoiseFigure (double pow) |
void | SetRnti (uint16_t rnti) |
void | SetSubChannelsForReception (std::vector< int > mask) |
Get a list of sub channels to use in RX. | |
void | SetSubChannelsForTransmission (std::vector< int > mask) |
Set a list of sub channels to use in TX. | |
void | SetTxPower (double pow) |
void | SubframeIndication (uint32_t frameNo, uint32_t subframeNo) |
trigger from eNB the start from a new frame | |
![]() | |
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 | DoSetDownlinkSubChannels () |
do some operation after the set of a list of DL sub channels | |
virtual void | DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn) |
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 | |
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::LteUePhy. |
Private Member Functions | |
void | QueueSubChannelsForTransmission (std::vector< int > rbMap) |
void | SetTxMode1Gain (double gain) |
void | SetTxMode2Gain (double gain) |
void | SetTxMode3Gain (double gain) |
void | SetTxMode4Gain (double gain) |
void | SetTxMode5Gain (double gain) |
void | SetTxMode6Gain (double gain) |
void | SetTxMode7Gain (double gain) |
void | SetTxModeGain (uint8_t txMode, double gain) |
Private Attributes | |
Time | m_a30CqiLast |
Time | m_a30CqiPeriocity |
Ptr< LteAmc > | m_amc |
uint16_t | m_enbCellId |
Time | m_p10CqiLast |
Time | m_p10CqiPeriocity |
uint16_t | m_rnti |
std::vector< int > | m_subChannelsForReception |
std::vector< int > | m_subChannelsForTransmission |
std::vector< std::vector< int > > | m_subChannelsForTransmissionQueue |
uint8_t | m_transmissionMode |
std::vector< double > | m_txModeGain |
LteUePhySapProvider * | m_uePhySapProvider |
LteUePhySapUser * | m_uePhySapUser |
Friends | |
class | UeMemberLteUePhySapProvider |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | NotifyNewAggregate (void) |
![]() | |
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 |
The LteSpectrumPhy models the physical layer of LTE
Definition at line 47 of file lte-ue-phy.h.
ns3::LteUePhy::LteUePhy | ( | ) |
Definition at line 105 of file lte-ue-phy.cc.
References NS_FATAL_ERROR, and NS_LOG_FUNCTION.
ns3::LteUePhy::LteUePhy | ( | Ptr< LteSpectrumPhy > | dlPhy, |
Ptr< LteSpectrumPhy > | ulPhy | ||
) |
dlPhy | the downlink LteSpectrumPhy instance |
ulPhy | the uplink LteSpectrumPhy instance |
Definition at line 111 of file lte-ue-phy.cc.
References m_amc, ns3::LtePhy::m_controlMessagesQueue, ns3::LtePhy::m_macChTtiDelay, ns3::LtePhy::m_packetBurstQueue, m_subChannelsForTransmissionQueue, m_uePhySapProvider, UeMemberLteUePhySapProvider, and UL_PUSCH_TTIS_DELAY.
|
virtual |
Definition at line 135 of file lte-ue-phy.cc.
References m_txModeGain.
Ptr< DlCqiIdealControlMessage > ns3::LteUePhy::CreateDlCqiFeedbackMessage | ( | const SpectrumValue & | sinr | ) |
Create the DL CQI feedback from SINR values perceived at the physical layer with the signal received from eNB.
sinr | SINR values vector |
Definition at line 370 of file lte-ue-phy.cc.
References CqiListElement_s::A30, ns3::LteAmc::CreateCqiFeedbacks(), ns3::LtePhy::GetRbgSize(), m_a30CqiLast, m_a30CqiPeriocity, m_amc, ns3::LtePhy::m_dlBandwidth, SbMeasResult_s::m_higherLayerSelected, m_p10CqiLast, m_p10CqiPeriocity, m_rnti, HigherLayerSelected_s::m_sbCqi, HigherLayerSelected_s::m_sbPmi, m_transmissionMode, m_txModeGain, ns3::Simulator::Now(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, CqiListElement_s::P10, and ns3::TransmissionModesLayers::TxMode2LayerNum().
Referenced by GenerateCqiReport().
|
virtual |
Create the PSD for the TX.
Implements ns3::LtePhy.
Definition at line 336 of file lte-ue-phy.cc.
References ns3::LteSpectrumValueHelper::CreateTxPowerSpectralDensity(), GetSubChannelsForTransmission(), ns3::LtePhy::m_txPower, ns3::LtePhy::m_ulBandwidth, ns3::LtePhy::m_ulEarfcn, and NS_LOG_FUNCTION.
Referenced by SetSubChannelsForTransmission().
|
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 141 of file lte-ue-phy.cc.
References m_uePhySapProvider, and NS_LOG_FUNCTION.
|
virtual |
Definition at line 473 of file lte-ue-phy.cc.
References ns3::LtePhy::GetDevice(), ns3::Object::GetObject(), NS_LOG_FUNCTION, ns3::LtePhy::SetControlMessages(), ns3::IdealControlMessage::SetDestinationDevice(), and ns3::IdealControlMessage::SetSourceDevice().
Referenced by GenerateCqiReport(), and ns3::UeMemberLteUePhySapProvider::SendIdealControlMessage().
Queue the MAC PDU to be sent.
p | the MAC PDU to sent |
Implements ns3::LtePhy.
Definition at line 272 of file lte-ue-phy.cc.
References NS_LOG_FUNCTION, and ns3::LtePhy::SetMacPdu().
Referenced by ns3::UeMemberLteUePhySapProvider::SendMacPdu().
|
virtual |
Definition at line 626 of file lte-ue-phy.cc.
References ns3::LtePhy::m_downlinkSpectrumPhy, m_transmissionMode, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetTransmissionMode().
Referenced by ns3::UeMemberLteUePhySapProvider::SetTransmissionMode().
|
virtual |
Update available channel for TX.
Reimplemented from ns3::LtePhy.
Definition at line 287 of file lte-ue-phy.cc.
References ns3::LtePhy::GetUplinkSubChannels(), NS_LOG_FUNCTION, and SetSubChannelsForTransmission().
|
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 214 of file lte-ue-phy.cc.
References ns3::LteSpectrumValueHelper::CreateNoisePowerSpectralDensity(), ns3::LtePhy::m_dlBandwidth, ns3::LtePhy::m_dlEarfcn, ns3::LtePhy::m_downlinkSpectrumPhy, ns3::LtePhy::m_noiseFigure, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetNoisePowerSpectralDensity().
|
virtual |
generate a CQI report based on the given SINR
sinr | the SINR vs frequency measured by the device |
Implements ns3::LtePhy.
Definition at line 346 of file lte-ue-phy.cc.
References CreateDlCqiFeedbackMessage(), DoSendIdealControlMessage(), ns3::LtePhy::GetDevice(), ns3::Object::GetObject(), m_a30CqiLast, m_a30CqiPeriocity, m_p10CqiLast, m_p10CqiPeriocity, ns3::Now(), ns3::Simulator::Now(), and NS_LOG_FUNCTION.
LteUePhySapProvider * ns3::LteUePhy::GetLteUePhySapProvider | ( | ) |
Get the PHY SAP provider.
Definition at line 230 of file lte-ue-phy.cc.
References m_uePhySapProvider, and NS_LOG_FUNCTION.
uint8_t ns3::LteUePhy::GetMacChDelay | ( | void | ) | const |
Definition at line 266 of file lte-ue-phy.cc.
References ns3::LtePhy::m_macChTtiDelay.
double ns3::LteUePhy::GetNoiseFigure | ( | ) | const |
Definition at line 244 of file lte-ue-phy.cc.
References ns3::LtePhy::m_noiseFigure, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
std::vector< int > ns3::LteUePhy::GetSubChannelsForReception | ( | void | ) |
Get a list of sub channels to use in RX.
Definition at line 328 of file lte-ue-phy.cc.
References m_subChannelsForReception, and NS_LOG_FUNCTION.
std::vector< int > ns3::LteUePhy::GetSubChannelsForTransmission | ( | void | ) |
Get a list of sub channels to use in RX.
Definition at line 320 of file lte-ue-phy.cc.
References m_subChannelsForTransmission, and NS_LOG_FUNCTION.
Referenced by CreateTxPowerSpectralDensity().
double ns3::LteUePhy::GetTxPower | ( | ) | const |
Definition at line 258 of file lte-ue-phy.cc.
References ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
static |
This method returns the TypeId associated to ns3::LteUePhy.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::LtePhy.
Definition at line 151 of file lte-ue-phy.cc.
References GetNoiseFigure(), GetTxPower(), SetNoiseFigure(), ns3::TypeId::SetParent(), SetTxMode1Gain(), SetTxMode2Gain(), SetTxMode3Gain(), SetTxMode4Gain(), SetTxMode5Gain(), SetTxMode6Gain(), SetTxMode7Gain(), and SetTxPower().
PhySpectrum received a new PHY-PDU.
Definition at line 281 of file lte-ue-phy.cc.
References m_uePhySapUser, and ns3::LteUePhySapUser::ReceivePhyPdu().
Referenced by ns3::LteHelper::InstallSingleUeDevice().
|
private |
Definition at line 555 of file lte-ue-phy.cc.
References ns3::LtePhy::m_macChTtiDelay, and m_subChannelsForTransmissionQueue.
Referenced by ReceiveIdealControlMessage().
|
virtual |
Receive SendIdealControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
msg | the Ideal Control Message to receive |
Implements ns3::LtePhy.
Definition at line 485 of file lte-ue-phy.cc.
References ns3::LteSpectrumPhy::AddExpectedTb(), ns3::IdealControlMessage::DL_DCI, ns3::IdealControlMessage::GetMessageType(), ns3::LtePhy::GetRbgSize(), ns3::LtePhy::m_downlinkSpectrumPhy, m_rnti, m_uePhySapUser, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, QueueSubChannelsForTransmission(), ns3::LteUePhySapUser::ReceiveIdealControlMessage(), SetSubChannelsForReception(), and ns3::IdealControlMessage::UL_DCI.
void ns3::LteUePhy::SetEnbCellId | ( | uint16_t | cellId | ) |
set the cellId of the eNb this PHY is synchronized with
cellId | the cell identifier of the eNB |
Definition at line 608 of file lte-ue-phy.cc.
References ns3::LtePhy::m_downlinkSpectrumPhy, m_enbCellId, ns3::LtePhy::m_uplinkSpectrumPhy, and ns3::LteSpectrumPhy::SetCellId().
void ns3::LteUePhy::SetLteUePhySapUser | ( | LteUePhySapUser * | s | ) |
Set the PHY SAP User.
s | a pointer to the PHY SAP user |
Definition at line 223 of file lte-ue-phy.cc.
References m_uePhySapUser, and NS_LOG_FUNCTION.
void ns3::LteUePhy::SetNoiseFigure | ( | double | pow | ) |
pw | the noise figure in dB |
Definition at line 237 of file lte-ue-phy.cc.
References ns3::LtePhy::m_noiseFigure, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteUePhy::SetRnti | ( | uint16_t | rnti | ) |
rnti | the rnti assigned to the UE |
Definition at line 618 of file lte-ue-phy.cc.
References m_rnti, and NS_LOG_FUNCTION.
Referenced by ns3::LteHelper::Attach().
void ns3::LteUePhy::SetSubChannelsForReception | ( | std::vector< int > | mask | ) |
Get a list of sub channels to use in RX.
mask | list of sub channels |
Definition at line 312 of file lte-ue-phy.cc.
References m_subChannelsForReception, and NS_LOG_FUNCTION.
Referenced by ReceiveIdealControlMessage().
void ns3::LteUePhy::SetSubChannelsForTransmission | ( | std::vector< int > | mask | ) |
Set a list of sub channels to use in TX.
mask | a list of sub channels |
Definition at line 300 of file lte-ue-phy.cc.
References CreateTxPowerSpectralDensity(), m_subChannelsForTransmission, ns3::LtePhy::m_uplinkSpectrumPhy, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetTxPowerSpectralDensity().
Referenced by DoSetUplinkSubChannels(), and SubframeIndication().
|
private |
Definition at line 635 of file lte-ue-phy.cc.
References SetTxModeGain().
Referenced by GetTypeId().
|
private |
Definition at line 641 of file lte-ue-phy.cc.
References SetTxModeGain().
Referenced by GetTypeId().
|
private |
Definition at line 647 of file lte-ue-phy.cc.
References SetTxModeGain().
Referenced by GetTypeId().
|
private |
Definition at line 653 of file lte-ue-phy.cc.
References SetTxModeGain().
Referenced by GetTypeId().
|
private |
Definition at line 659 of file lte-ue-phy.cc.
References SetTxModeGain().
Referenced by GetTypeId().
|
private |
Definition at line 665 of file lte-ue-phy.cc.
References SetTxModeGain().
Referenced by GetTypeId().
|
private |
Definition at line 671 of file lte-ue-phy.cc.
References SetTxModeGain().
Referenced by GetTypeId().
|
private |
Definition at line 678 of file lte-ue-phy.cc.
References ns3::LtePhy::m_downlinkSpectrumPhy, m_txModeGain, NS_LOG_FUNCTION, and ns3::LteSpectrumPhy::SetTxModeGain().
Referenced by SetTxMode1Gain(), SetTxMode2Gain(), SetTxMode3Gain(), SetTxMode4Gain(), SetTxMode5Gain(), SetTxMode6Gain(), and SetTxMode7Gain().
void ns3::LteUePhy::SetTxPower | ( | double | pow | ) |
pw | the transmission power in dBm |
Definition at line 251 of file lte-ue-phy.cc.
References ns3::LtePhy::m_txPower, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
void ns3::LteUePhy::SubframeIndication | ( | uint32_t | frameNo, |
uint32_t | subframeNo | ||
) |
trigger from eNB the start from a new frame
frameNo | frame number |
subframeNo | subframe number |
Definition at line 562 of file lte-ue-phy.cc.
References ns3::LtePhy::GetControlMessages(), ns3::LtePhy::GetDevice(), ns3::Object::GetObject(), ns3::LtePhy::GetPacketBurst(), ns3::LteUeNetDevice::GetPhy(), ns3::LtePhy::m_macChTtiDelay, m_subChannelsForTransmissionQueue, m_uePhySapUser, ns3::LtePhy::m_uplinkSpectrumPhy, NS_LOG_LOGIC, ns3::LtePhy::ReceiveIdealControlMessage(), SetSubChannelsForTransmission(), ns3::LteSpectrumPhy::StartTx(), and ns3::LteUePhySapUser::SubframeIndication().
|
friend |
Definition at line 50 of file lte-ue-phy.h.
Referenced by LteUePhy().
|
private |
Definition at line 227 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), and GenerateCqiReport().
|
private |
Definition at line 226 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), and GenerateCqiReport().
Definition at line 219 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), and LteUePhy().
|
private |
Definition at line 234 of file lte-ue-phy.h.
Referenced by SetEnbCellId().
|
private |
SubBand Aperiodic CQI: activated by DCI format 0 or Random Access Response Grant
Definition at line 224 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), and GenerateCqiReport().
|
private |
Wideband Periodic CQI: 2, 5, 10, 16, 20, 32, 40, 64, 80 or 160 ms
Definition at line 221 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), and GenerateCqiReport().
|
private |
Definition at line 232 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), ReceiveIdealControlMessage(), and SetRnti().
|
private |
Definition at line 214 of file lte-ue-phy.h.
Referenced by GetSubChannelsForReception(), and SetSubChannelsForReception().
|
private |
Definition at line 213 of file lte-ue-phy.h.
Referenced by GetSubChannelsForTransmission(), and SetSubChannelsForTransmission().
|
private |
Definition at line 216 of file lte-ue-phy.h.
Referenced by LteUePhy(), QueueSubChannelsForTransmission(), and SubframeIndication().
|
private |
Definition at line 236 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), and DoSetTransmissionMode().
|
private |
Definition at line 237 of file lte-ue-phy.h.
Referenced by CreateDlCqiFeedbackMessage(), SetTxModeGain(), and ~LteUePhy().
|
private |
Definition at line 229 of file lte-ue-phy.h.
Referenced by DoDispose(), GetLteUePhySapProvider(), and LteUePhy().
|
private |
Definition at line 230 of file lte-ue-phy.h.
Referenced by PhyPduReceived(), ReceiveIdealControlMessage(), SetLteUePhySapUser(), and SubframeIndication().