26 #include <ns3/lte-phy.h>
27 #include <ns3/ff-mac-common.h>
29 #include <ns3/lte-control-messages.h>
30 #include <ns3/lte-amc.h>
31 #include <ns3/lte-ue-phy-sap.h>
32 #include <ns3/lte-ue-cphy-sap.h>
34 #include <ns3/lte-amc.h>
36 #include <ns3/lte-ue-power-control.h>
247 (
const uint16_t cellId,
const uint16_t rnti,
259 (
const uint16_t cellId,
const uint16_t rnti,
260 const double rsrp,
const double sinr);
272 (
const uint16_t rnti,
const uint16_t cellId,
273 const double rsrp,
const double rsrq,
const bool isServingCell);
double GetNoiseFigure() const
Ptr< LteSpectrumPhy > GetUlSpectrumPhy() const
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
virtual void GenerateMixedCqiReport(const SpectrumValue &sinr)
LteUePhySapUser * m_uePhySapUser
void SetTxMode5Gain(double gain)
virtual void GenerateDataCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs) ...
std::list< PssElement > m_pssList
void SetTxMode2Gain(double gain)
uint8_t GetMacChDelay(void) const
void DoConfigureUplink(uint16_t ulEarfcn, uint8_t ulBandwidth)
void(* RsrpRsrqTracedCallback)(const uint16_t rnti, const uint16_t cellId, const double rsrp, const double rsrq, const bool isServingCell)
TracedCallback signature for cell RSRP and RSRQ.
std::vector< int > GetSubChannelsForTransmission(void)
Get a list of sub channels to use in RX.
virtual void GenerateCtrlCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Ctrl frame
TracedCallback< uint16_t, uint16_t, double, double > m_reportCurrentCellRsrpSinrTrace
The ReportCurrentCellRsrpSinr trace source.
void SetSubChannelsForTransmission(std::vector< int > mask)
Set a list of sub channels to use in TX.
LteUePhySapProvider * m_uePhySapProvider
uint8_t rsrqNum
Number of RSRQ samples.
void SetTxMode6Gain(double gain)
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
std::vector< double > m_txModeGain
Summary results of measuring a specific cell. Used for layer-1 filtering.
SpectrumValue m_dataInterferencePower
void QueueSubChannelsForTransmission(std::vector< int > rbMap)
void(* RsrpSinrTracedCallback)(const uint16_t cellId, const uint16_t rnti, const double rsrp, const double sinr)
TracedCallback signature for cell RSRP and SINR report.
Service Access Point (SAP) offered by the PHY to the MAC.
void SetTxModeGain(uint8_t txMode, double gain)
State
The states of the UE PHY entity.
Ptr< LteUePowerControl > m_powerControl
Pointer to UE Uplink Power Control entity.
virtual void DoSendMacPdu(Ptr< Packet > p)
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
std::vector< int > GetSubChannelsForReception(void)
Get a list of sub channels to use in RX.
uint8_t m_transmissionMode
void SetHarqPhyModule(Ptr< LteHarqPhy > harq)
Set the HARQ PHY module.
void DoSetSrsConfigurationIndex(uint16_t srcCi)
void DoSetTransmissionMode(uint8_t txMode)
Template for the implementation of the LteUeCphySapProvider as a member of an owner class of type C t...
double m_pssReceptionThreshold
The RsrqUeMeasThreshold attribute.
TracedCallback< uint16_t, uint16_t, double, double, bool > m_reportUeMeasurements
The ReportUeMeasurements trace source.
void DoSynchronizeWithEnb(uint16_t cellId)
Time m_ueMeasurementsFilterLast
uint8_t rsrpNum
Number of RSRP samples.
LteUeCphySapUser * m_ueCphySapUser
void DoSetDlBandwidth(uint8_t ulBandwidth)
uint16_t m_rsrpSinrSamplePeriod
The RsrpSinrSamplePeriod attribute.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
void SetLteUePhySapUser(LteUePhySapUser *s)
Set the PHY SAP User.
void DoConfigureReferenceSignalPower(int8_t referenceSignalPower)
void SetTxMode3Gain(double gain)
Ptr< DlCqiLteControlMessage > CreateDlCqiFeedbackMessage(const SpectrumValue &sinr)
Create the DL CQI feedback from SINR values perceived at the physical layer with the signal received ...
void SetTxMode4Gain(double gain)
void SwitchToState(State s)
Switch the UE PHY to the given state.
TracedCallback< uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
void SendSrs()
Send the SRS signal in the last symbols of the frame.
bool m_rsInterferencePowerUpdated
void SetTxMode7Gain(double gain)
Ptr< LteUePowerControl > GetUplinkPowerControl() const
See section 4.3.23 dlInfoListElement.
double rsrpSum
Sum of RSRP sample values in linear unit.
virtual void DoSendRachPreamble(uint32_t prachId, uint32_t raRnti)
virtual void ReportDataInterference(const SpectrumValue &interf)
virtual void ReceiveLteDlHarqFeedback(DlInfoListElement_s mes)
PhySpectrum generated a new DL HARQ feedback.
bool m_enableUplinkPowerControl
The EnableUplinkPowerControl attribute.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< LteHarqPhy > m_harqPhyModule
void DoStartCellSearch(uint16_t dlEarfcn)
uint16_t m_rsrpSinrSampleCounter
void(* StateTracedCallback)(const uint16_t cellId, const uint16_t rnti, const State oldState, const State newState)
TracedCallback signature for state transition events.
SpectrumValue m_rsReceivedPower
double GetTxPower() const
double rsrqSum
Sum of RSRQ sample values in linear unit.
uint16_t m_srsSubframeOffset
void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)
trigger from eNB the start from a new frame
virtual void DoInitialize(void)
Initialize() implementation.
void SetTxMode1Gain(double gain)
std::vector< int > m_subChannelsForTransmission
A list of sub channels to use in TX.
Time m_p10CqiPeriocity
Wideband Periodic CQI. 2, 5, 10, 16, 20, 32, 40, 64, 80 or 160 ms.
std::vector< std::vector< int > > m_subChannelsForTransmissionQueue
Time m_a30CqiPeriocity
SubBand Aperiodic CQI.
LteUeCphySapProvider * m_ueCphySapProvider
std::map< uint16_t, UeMeasurementsElement > m_ueMeasurementsMap
Store measurement results during the last layer-1 filtering period.
An identifier for simulation events.
std::vector< int > m_subChannelsForReception
A list of sub channels to use in RX.
Service Access Point (SAP) offered by the UE-PHY to the UE-MAC.
virtual void ReceiveLteControlMessageList(std::list< Ptr< LteControlMessage > >)
void SetTxPower(double pow)
virtual void ReceivePss(uint16_t cellId, Ptr< SpectrumValue > p)
uint16_t m_srsPeriodicity
LteUePhySapProvider * GetLteUePhySapProvider()
Get the PHY SAP provider.
void SetLteUeCphySapUser(LteUeCphySapUser *s)
Set the CPHY SAP User.
SpectrumValue m_rsInterferencePower
void PhyPduReceived(Ptr< Packet > p)
PhySpectrum received a new PHY-PDU.
virtual void DoSendLteControlMessage(Ptr< LteControlMessage > msg)
bool m_rsReceivedPowerUpdated
void GenerateCqiRsrpRsrq(const SpectrumValue &sinr)
internal method that takes care of generating CQI reports, calculating the RSRP and RSRQ metrics...
The LteSpectrumPhy models the physical layer of LTE.
Ptr< LteSpectrumPhy > GetDlSpectrumPhy() const
virtual void ReportRsReceivedPower(const SpectrumValue &power)
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for ...
LteUeCphySapProvider * GetLteUeCphySapProvider()
Get the CPHY SAP provider.
State m_state
The current UE PHY state.
Set of values corresponding to a given SpectrumModel.
a unique identifier for an interface.
bool m_dataInterferencePowerUpdated
void SetNoiseFigure(double nf)
TracedCallback< PhyTransmissionStatParameters > m_ulPhyTransmission
The UlPhyTransmission trace source.
static TypeId GetTypeId(void)
The LtePhy models the physical layer of LTE.
void ReportUeMeasurements()
Layer-1 filtering of RSRP and RSRQ measurements and reporting to the RRC entity.
virtual void ReportInterference(const SpectrumValue &interf)
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()
Create the PSD for the TX.
Ptr< SpectrumValue > m_noisePsd
Noise power spectral density for the configured bandwidth.
void DoSetRnti(uint16_t rnti)
void SetSubChannelsForReception(std::vector< int > mask)
Get a list of sub channels to use in RX.
virtual void DoDispose(void)
Destructor implementation.
Time m_ueMeasurementsFilterPeriod
The UeMeasurementsFilterPeriod attribute.