#include <lte-enb-phy.h>
Public Member Functions | |
LteEnbPhy () | |
LteEnbPhy (Ptr< LteSpectrumPhy > dlPhy, Ptr< LteSpectrumPhy > ulPhy) | |
void | CalcChannelQualityForUe (std::vector< double > sinr, Ptr< LteSpectrumPhy > ue) |
Calculate the channel quality for a given UE. More... | |
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters | CreatePuschCqiReport (const SpectrumValue &sinr) |
Create the UL CQI feedback from SINR values perceived at the physical layer with the PUSCH signal received from eNB. More... | |
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters | CreateSrsCqiReport (const SpectrumValue &sinr) |
Create the UL CQI feedback from SINR values perceived at the physical layer with the SRS signal received from eNB. More... | |
virtual Ptr< SpectrumValue > | CreateTxPowerSpectralDensity () |
Create the PSD for TX. | |
std::list< UlDciLteControlMessage > | DequeueUlDci (void) |
virtual void | DoDispose (void) |
virtual void | DoInitialize (void) |
void | EndFrame (void) |
End a LTE frame. | |
void | EndSubFrame (void) |
End a LTE sub frame. | |
virtual void | GenerateCtrlCqiReport (const SpectrumValue &sinr) |
virtual void | GenerateDataCqiReport (const SpectrumValue &sinr) |
Ptr< LteSpectrumPhy > | GetDlSpectrumPhy () const |
std::vector< int > | GetDownlinkSubChannels (void) |
LteEnbCphySapProvider * | GetLteEnbCphySapProvider () |
Get the CPHY SAP provider. More... | |
LteEnbPhySapProvider * | GetLteEnbPhySapProvider () |
Get the PHY SAP provider. More... | |
uint8_t | GetMacChDelay (void) const |
double | GetNoiseFigure () const |
double | GetTxPower () const |
Ptr< LteSpectrumPhy > | GetUlSpectrumPhy () const |
void | PhyPduReceived (Ptr< Packet > p) |
PhySpectrum received a new PHY-PDU. | |
void | QueueUlDci (UlDciLteControlMessage m) |
virtual void | ReceiveLteControlMessage (Ptr< LteControlMessage > msg) |
Receive the control message. More... | |
virtual void | ReceiveLteControlMessageList (std::list< Ptr< LteControlMessage > >) |
PhySpectrum received a new list of LteControlMessage. | |
virtual void | ReceiveLteUlHarqFeedback (UlInfoListElement_s mes) |
PhySpectrum generated a new UL HARQ feedback. | |
virtual void | ReportInterference (const SpectrumValue &interf) |
virtual void | ReportRsReceivedPower (const SpectrumValue &interf) |
void | SendControlChannels (std::list< Ptr< LteControlMessage > > ctrlMsgList) |
Send the PDCCH and PCFICH in the first 3 symbols. More... | |
void | SendDataChannels (Ptr< PacketBurst > pb) |
Send the PDSCH. More... | |
void | SetDownlinkSubChannels (std::vector< int > mask) |
set the resource blocks (a.k.a. sub channels) to be used in the downlink for transmission More... | |
void | SetHarqPhyModule (Ptr< LteHarqPhy > harq) |
void | SetLteEnbCphySapUser (LteEnbCphySapUser *s) |
Set the CPHY SAP User. More... | |
void | SetLteEnbPhySapUser (LteEnbPhySapUser *s) |
Set the PHY SAP User. More... | |
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) | |
void | DoDispose () |
void | DoSetCellId (uint16_t cellId) |
std::list< Ptr < LteControlMessage > > | GetControlMessages (void) |
Ptr< LteNetDevice > | GetDevice () |
Get the device where the phy layer is attached. More... | |
Ptr< LteSpectrumPhy > | GetDownlinkSpectrumPhy () |
Ptr< PacketBurst > | GetPacketBurst (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< LteSpectrumPhy > | GetUplinkSpectrumPhy () |
void | SetControlMessages (Ptr< LteControlMessage > m) |
void | SetDevice (Ptr< LteNetDevice > d) |
Set the device where the phy layer is attached. More... | |
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. More... | |
void | SetUplinkChannel (Ptr< SpectrumChannel > c) |
Public Member Functions inherited from ns3::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 | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::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) |
Static Public Member Functions inherited from ns3::LtePhy | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Private Member Functions | |
bool | AddUePhy (uint16_t rnti) |
void | CreateSrsReport (uint16_t rnti, double srs) |
bool | DeleteUePhy (uint16_t rnti) |
void | DoAddUe (uint16_t rnti) |
uint8_t | DoGetMacChTtiDelay () |
void | DoRemoveUe (uint16_t rnti) |
void | DoSendLteControlMessage (Ptr< LteControlMessage > msg) |
void | DoSendMacPdu (Ptr< Packet > p) |
Queue the MAC PDU to be sent (according to m_macChTtiDelay) More... | |
void | DoSetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth) |
void | DoSetEarfcn (uint16_t dlEarfcn, uint16_t ulEarfcn) |
void | DoSetMasterInformationBlock (LteRrcSap::MasterInformationBlock mib) |
void | DoSetSrsConfigurationIndex (uint16_t rnti, uint16_t srcCi) |
void | DoSetTransmissionMode (uint16_t rnti, uint8_t txMode) |
Private Attributes | |
uint16_t | m_currentSrsOffset |
std::vector< int > | m_dlDataRbMap |
TracedCallback < PhyTransmissionStatParameters > | m_dlPhyTransmission |
LteEnbCphySapProvider * | m_enbCphySapProvider |
LteEnbCphySapUser * | m_enbCphySapUser |
LteEnbPhySapProvider * | m_enbPhySapProvider |
LteEnbPhySapUser * | m_enbPhySapUser |
Ptr< LteHarqPhy > | m_harqPhyModule |
uint16_t | m_interferenceSampleCounter |
uint16_t | m_interferenceSamplePeriod |
std::vector< int > | m_listOfDownlinkSubchannel |
LteRrcSap::MasterInformationBlock | m_mib |
uint32_t | m_nrFrames |
uint32_t | m_nrSubFrames |
TracedCallback< uint16_t, Ptr < SpectrumValue > > | m_reportInterferenceTrace |
TracedCallback< uint16_t, uint16_t, double > | m_reportUeSinr |
std::map< uint16_t, uint16_t > | m_srsCounter |
uint16_t | m_srsPeriodicity |
std::map< uint16_t, uint16_t > | m_srsSampleCounterMap |
uint16_t | m_srsSamplePeriod |
Time | m_srsStartTime |
std::vector< uint16_t > | m_srsUeOffset |
std::set< uint16_t > | m_ueAttached |
std::vector< std::list < UlDciLteControlMessage > > | m_ulDciQueue |
Friends | |
class | EnbMemberLteEnbPhySapProvider |
class | MemberLteEnbCphySapProvider< LteEnbPhy > |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
Protected Attributes inherited from ns3::LtePhy | |
uint16_t | m_cellId |
std::vector< std::list< Ptr < LteControlMessage > > > | m_controlMessagesQueue |
uint8_t | m_dlBandwidth |
uint16_t | m_dlEarfcn |
Ptr< LteSpectrumPhy > | m_downlinkSpectrumPhy |
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 |
LteEnbPhy models the physical layer for the eNodeB
ns3::LteEnbPhy is accessible through the following paths with Config::Set and Config::Connect:
Definition at line 47 of file lte-enb-phy.h.
ns3::LteEnbPhy::LteEnbPhy | ( | ) |
Definition at line 125 of file lte-enb-phy.cc.
References NS_FATAL_ERROR, and NS_LOG_FUNCTION.
ns3::LteEnbPhy::LteEnbPhy | ( | Ptr< LteSpectrumPhy > | dlPhy, |
Ptr< LteSpectrumPhy > | ulPhy | ||
) |
dlPhy | the downlink LteSpectrumPhy instance |
ulPhy | the uplink LteSpectrumPhy instance |
Definition at line 131 of file lte-enb-phy.cc.
References ns3::Simulator::ScheduleNow(), and StartFrame().
void ns3::LteEnbPhy::CalcChannelQualityForUe | ( | std::vector< double > | sinr, |
Ptr< LteSpectrumPhy > | ue | ||
) |
Calculate the channel quality for a given UE.
sinr | a list of computed SINR |
ue | the UE |
Definition at line 421 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ns3::LteEnbPhy::CreatePuschCqiReport | ( | const SpectrumValue & | sinr | ) |
Create the UL CQI feedback from SINR values perceived at the physical layer with the PUSCH signal received from eNB.
sinr | SINR values vector |
Definition at line 735 of file lte-enb-phy.cc.
References ns3::SpectrumValue::ConstValuesBegin(), ns3::SpectrumValue::ConstValuesEnd(), and NS_LOG_FUNCTION.
Referenced by GenerateDataCqiReport().
FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ns3::LteEnbPhy::CreateSrsCqiReport | ( | const SpectrumValue & | sinr | ) |
Create the UL CQI feedback from SINR values perceived at the physical layer with the SRS signal received from eNB.
sinr | SINR values vector |
Definition at line 808 of file lte-enb-phy.cc.
References ns3::SpectrumValue::ConstValuesBegin(), ns3::SpectrumValue::ConstValuesEnd(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.
Referenced by GenerateCtrlCqiReport().
std::list< UlDciLteControlMessage > ns3::LteEnbPhy::DequeueUlDci | ( | void | ) |
Definition at line 875 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
Referenced by StartSubFrame().
|
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.
Definition at line 221 of file lte-enb-phy.cc.
References ns3::LtePhy::DoDispose(), and NS_LOG_FUNCTION.
|
virtual |
This method is called only once by Object::Initialize. If the user calls Object::Initialize multiple times, DoInitialize 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 232 of file lte-enb-phy.cc.
References ns3::LteSpectrumValueHelper::CreateNoisePowerSpectralDensity(), ns3::Object::DoInitialize(), and NS_LOG_FUNCTION.
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
p | the MAC PDU to sent |
Implements ns3::LtePhy.
Definition at line 373 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION, and ns3::LtePhy::SetMacPdu().
Referenced by ns3::EnbMemberLteEnbPhySapProvider::SendMacPdu().
|
virtual |
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 694 of file lte-enb-phy.cc.
References CreateSrsCqiReport(), ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::UlCqiReport().
|
virtual |
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 706 of file lte-enb-phy.cc.
References CreatePuschCqiReport(), NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::UlCqiReport().
Ptr< LteSpectrumPhy > ns3::LteEnbPhy::GetDlSpectrumPhy | ( | ) | const |
Definition at line 323 of file lte-enb-phy.cc.
std::vector< int > ns3::LteEnbPhy::GetDownlinkSubChannels | ( | void | ) |
Definition at line 403 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
Referenced by CreateTxPowerSpectralDensity().
LteEnbCphySapProvider * ns3::LteEnbPhy::GetLteEnbCphySapProvider | ( | ) |
Get the CPHY SAP provider.
Definition at line 261 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
LteEnbPhySapProvider * ns3::LteEnbPhy::GetLteEnbPhySapProvider | ( | ) |
Get the PHY SAP provider.
Definition at line 248 of file lte-enb-phy.cc.
uint8_t ns3::LteEnbPhy::GetMacChDelay | ( | void | ) | const |
Definition at line 317 of file lte-enb-phy.cc.
double ns3::LteEnbPhy::GetNoiseFigure | ( | ) | const |
Definition at line 289 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
double ns3::LteEnbPhy::GetTxPower | ( | ) | const |
Definition at line 275 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
Ptr< LteSpectrumPhy > ns3::LteEnbPhy::GetUlSpectrumPhy | ( | ) | const |
Definition at line 329 of file lte-enb-phy.cc.
void ns3::LteEnbPhy::QueueUlDci | ( | UlDciLteControlMessage | m | ) |
m | the UL-CQI to be queued |
Definition at line 868 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
Referenced by StartSubFrame().
|
virtual |
Receive the control message.
msg | the received message |
Definition at line 438 of file lte-enb-phy.cc.
References NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::LteEnbPhySapUser::ReceiveLteControlMessage().
|
virtual |
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: used only by eNB
sinr | the interference + noise power measured by the device |
Implements ns3::LtePhy.
Definition at line 714 of file lte-enb-phy.cc.
References m_reportInterferenceTrace, and NS_LOG_FUNCTION.
|
virtual |
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for evaluating RSRP
sinr | the RS power measured by the device |
Implements ns3::LtePhy.
Definition at line 727 of file lte-enb-phy.cc.
void ns3::LteEnbPhy::SendControlChannels | ( | std::list< Ptr< LteControlMessage > > | ctrlMsgList | ) |
Send the PDCCH and PCFICH in the first 3 symbols.
ctrlMsgList | the list of control messages of PDCCH |
Definition at line 642 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION, NS_LOG_LOGIC, and SetDownlinkSubChannels().
Referenced by StartSubFrame().
void ns3::LteEnbPhy::SendDataChannels | ( | Ptr< PacketBurst > | pb | ) |
Send the PDSCH.
pb | the PacketBurst to be sent |
Definition at line 658 of file lte-enb-phy.cc.
References NS_LOG_LOGIC, and SetDownlinkSubChannels().
Referenced by StartSubFrame().
void ns3::LteEnbPhy::SetDownlinkSubChannels | ( | std::vector< int > | mask | ) |
set the resource blocks (a.k.a. sub channels) to be used in the downlink for transmission
mask | a vector of integers, if the i-th value is j it means that the j-th resource block is used for transmission in the downlink. If there is no i such that the value of the i-th element is j, it means that RB j is not used. |
Definition at line 394 of file lte-enb-phy.cc.
References CreateTxPowerSpectralDensity(), and NS_LOG_FUNCTION.
Referenced by SendControlChannels(), and SendDataChannels().
void ns3::LteEnbPhy::SetLteEnbCphySapUser | ( | LteEnbCphySapUser * | s | ) |
Set the CPHY SAP User.
s | a pointer to the SAP user |
Definition at line 254 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteEnbPhy::SetLteEnbPhySapUser | ( | LteEnbPhySapUser * | s | ) |
Set the PHY SAP User.
s | a pointer to the PHY SAP user |
Definition at line 242 of file lte-enb-phy.cc.
void ns3::LteEnbPhy::SetMacChDelay | ( | uint8_t | delay | ) |
delay | the TTI delay between MAC and channel |
Definition at line 296 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteEnbPhy::SetNoiseFigure | ( | double | pow | ) |
pw | the noise figure in dB |
Definition at line 282 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
void ns3::LteEnbPhy::SetTxPower | ( | double | pow | ) |
pw | the transmission power in dBm |
Definition at line 268 of file lte-enb-phy.cc.
References NS_LOG_FUNCTION.
|
private |
Trace information regarding PHY stats from UL Tx perspective PhyTrasmissionStatParameters see lte-common.h
Definition at line 328 of file lte-enb-phy.h.
Referenced by StartSubFrame().
|
private |
Trace reporting the interference per PHY RB (TS 36.214 section 5.2.2, measured on DATA) uint16_t cellId, Ptr<SpectrumValue> interference linear power per RB basis
Definition at line 320 of file lte-enb-phy.h.
Referenced by ReportInterference().
|
private |
Trace reporting the linear average of SRS SINRs uint16_t cellId, uint16_t rnti, double sinrLinear
Definition at line 311 of file lte-enb-phy.h.