|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
29 #include <ns3/lte-phy.h>
30 #include <ns3/ff-mac-common.h>
32 #include <ns3/lte-control-messages.h>
33 #include <ns3/lte-amc.h>
34 #include <ns3/lte-ue-phy-sap.h>
35 #include <ns3/lte-ue-cphy-sap.h>
37 #include <ns3/lte-amc.h>
39 #include <ns3/lte-ue-power-control.h>
311 (uint16_t cellId, uint16_t rnti,
State oldState,
State newState);
323 (uint16_t cellId, uint16_t rnti,
324 double rsrp,
double sinr, uint8_t componentCarrierId);
337 (uint16_t rnti, uint16_t cellId,
double rsrp,
double rsrq,
338 bool isServingCell, uint8_t componentCarrierId);
347 (uint16_t rnti,
const std::vector<int>& rbs);
a unique identifier for an interface.
The LteSpectrumPhy models the physical layer of LTE.
void SetTxMode3Gain(double gain)
Set transmit mode 3 gain function.
double GetNoiseFigure() const
Get noise figure.
static TypeId GetTypeId(void)
Get the type ID.
TracedCallback< uint16_t, Ptr< SpectrumValue > > m_reportPowerSpectralDensity
The ReportsPowerSpectralDensity trace source.
LteUeCphySapUser * m_ueCphySapUser
UE CPhy SAP user.
SpectrumValue m_rsReceivedPower
RS receive power.
SpectrumValue m_ctrlSinrForRlf
the CTRL SINR used for RLF detection
bool m_isConnected
set when UE RRC is in CONNECTED_NORMALLY state
State GetState() const
Get state of the UE physical layer.
An identifier for simulation events.
virtual void DoSendLteControlMessage(Ptr< LteControlMessage > msg)
Send LTE control message function.
void SendSrs()
Send the SRS signal in the last symbols of the frame.
uint16_t GetNumQinEvalSf() const
Get number of Qin evaluation subframes.
Time m_srsStartTime
SRS start time.
void DoResetPhyAfterRlf()
Reset Phy after radio link failure function.
void DoConfigureReferenceSignalPower(int8_t referenceSignalPower)
Configure reference signal power function.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void DoStartCellSearch(uint32_t dlEarfcn)
Start the cell search function.
LteUeCphySapProvider * GetLteUeCphySapProvider()
Get the CPHY SAP provider.
Ptr< LteUePowerControl > m_powerControl
Pointer to UE Uplink Power Control entity.
uint16_t GetNumQoutEvalSf() const
Get number of Qout evaluation subframes.
void ReportUeMeasurements()
Layer-1 filtering of RSRP and RSRQ measurements and reporting to the RRC entity.
Ptr< SpectrumValue > m_noisePsd
Noise power spectral density for the configured bandwidth.
bool m_downlinkInSync
when set, DL SINR evaluation for out-of-sync indications is conducted.
void SetDownlinkCqiPeriodicity(Time cqiPeriodicity)
Set the periodicty for the downlink periodic wideband and aperiodic subband CQI reporting.
void SetTxPower(double pow)
Set transmit power.
virtual void ReportDataInterference(const SpectrumValue &interf)
Create the mixed CQI report.
void(* PowerSpectralDensityTracedCallback)(uint16_t rnti, Ptr< SpectrumValue > psd)
TracedCallback signature for spectral value.
void DoSetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)
Do set RSRP filter coefficient.
std::vector< std::vector< int > > m_subChannelsForTransmissionQueue
subchannels for transmission queue
void GenerateCqiRsrpRsrq(const SpectrumValue &sinr)
Get CQI, RSRP, and RSRQ.
virtual void ReportInterference(const SpectrumValue &interf)
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)
trigger from eNB the start from a new frame
bool m_ulConfigured
UL configured?
double m_sinrDbFrame
the average SINR per radio frame
void SetTxMode7Gain(double gain)
Set transmit mode 7 gain function.
uint8_t rsrpNum
Number of RSRP samples.
void DoSetTransmissionMode(uint8_t txMode)
Set transmission mode function.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
uint32_t m_raPreambleId
RA preamble ID.
void DoReset()
Do Reset function.
uint16_t m_srsSubframeOffset
SRS subframe offset.
Time m_ueMeasurementsFilterLast
SpectrumValue m_rsInterferencePower
RS interference power.
uint8_t rsrqNum
Number of RSRQ samples.
uint16_t m_numOfQinEvalSf
the downlink radio link quality is estimated over this period for detecting in-syncs
uint16_t m_rsrpSinrSamplePeriod
The RsrpSinrSamplePeriod attribute.
void DoSetSrsConfigurationIndex(uint16_t srcCi)
Set SRS configuration index function.
uint8_t GetMacChDelay(void) const
Get MAC to Channel delay.
virtual void GenerateDataCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
Time m_a30CqiPeriodicity
SubBand Aperiodic CQI.
virtual void GenerateCtrlCqiReport(const SpectrumValue &sinr)
generate a CQI report based on the given SINR of Ctrl frame
void(* UlPhyResourceBlocksTracedCallback)(uint16_t rnti, const std::vector< int > &rbs)
TracedCallback signature for UL Phy resource blocks.
void(* StateTracedCallback)(uint16_t cellId, uint16_t rnti, State oldState, State newState)
TracedCallback signature for state transition events.
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity()
Create the PSD for the TX.
TracedCallback< PhyTransmissionStatParameters > m_ulPhyTransmission
The UlPhyTransmission trace source.
Smart pointer class similar to boost::intrusive_ptr.
State m_state
The current UE PHY state.
void SetSubChannelsForTransmission(std::vector< int > mask)
Set a list of sub channels to use in TX.
Time m_p10CqiPeriodicity
Wideband Periodic CQI. 2, 5, 10, 16, 20, 32, 40, 64, 80 or 160 ms.
EventId m_sendSrsEvent
send SRS event
virtual void EnqueueDlHarqFeedback(DlInfoListElement_s mes)
Enqueue the downlink HARQ feedback generated by LteSpectrumPhy.
uint16_t m_rsrpSinrSampleCounter
The RsrpSinrSampleCounter attribute.
void SetTxMode5Gain(double gain)
Set transmit mode 5 gain function.
void SetTxMode6Gain(double gain)
Set transmit mode 6 gain function.
TracedCallback< uint16_t, const std::vector< int > & > m_reportUlPhyResourceBlocks
The ReportUlPhyResourceBlocks trace source.
The LtePhy models the physical layer of LTE.
virtual void ReceivePss(uint16_t cellId, Ptr< SpectrumValue > p)
Receive PSS function.
void SetLteUePhySapUser(LteUePhySapUser *s)
Set the PHY SAP User.
LteUePhySapUser * m_uePhySapUser
UE Phy SAP user.
LteUePhySapProvider * m_uePhySapProvider
UE Phy SAP provider.
virtual void DoInitialize(void)
Initialize() implementation.
void SetHarqPhyModule(Ptr< LteHarqPhy > harq)
Set the HARQ PHY module.
SpectrumValue m_dataInterferencePower
data interference power
virtual void DoDispose(void)
Destructor implementation.
void DoSetRnti(uint16_t rnti)
Set RNTI function.
void DoConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth)
Configure UL uplink function.
virtual void GenerateMixedCqiReport(const SpectrumValue &sinr)
Create the mixed CQI report.
void RlfDetection(double sinrdB)
Radio link failure detection function.
double GetTxPower() const
Get transmit power.
Set of values corresponding to a given SpectrumModel.
std::vector< int > GetSubChannelsForReception(void)
Get a list of sub channels to use in RX.
Simulation virtual time values and global simulation resolution.
uint64_t m_imsi
the IMSI of the UE
void DoSetPa(double pa)
Set PA function.
uint32_t m_raRnti
RA RNTI.
void InitializeRlfParams()
Initialize radio link failure parameters.
virtual void ReceiveLteControlMessageList(std::list< Ptr< LteControlMessage > > msgList)
Receive LTE control message list function.
bool m_enableRlfDetection
Flag to enable/disable RLF detection.
void SwitchToState(State s)
Switch the UE PHY to the given state.
Template for the implementation of the LteUeCphySapProvider as a member of an owner class of type C t...
Time m_a30CqiLast
last aperiodic CQI
bool m_pssReceived
PSS received?
Service Access Point (SAP) offered by the UE-PHY to the UE-MAC.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
void QueueSubChannelsForTransmission(std::vector< int > rbMap)
Queue subchannels for transmission function.
void(* RsrpSinrTracedCallback)(uint16_t cellId, uint16_t rnti, double rsrp, double sinr, uint8_t componentCarrierId)
TracedCallback signature for cell RSRP and SINR report.
uint16_t m_srsConfigured
SRS configured.
void SetTxMode1Gain(double gain)
Set transmit mode 1 gain function.
double rsrpSum
Sum of RSRP sample values in linear unit.
TracedCallback< uint16_t, uint16_t, double, double, uint8_t > m_reportCurrentCellRsrpSinrTrace
The ReportCurrentCellRsrpSinr trace source.
TracedCallback< uint16_t, uint16_t, double, double, bool, uint8_t > m_reportUeMeasurements
The ReportUeMeasurements trace source.
uint8_t m_transmissionMode
the transmission mode
void DoSetDlBandwidth(uint16_t dlBandwidth)
Set DL bandwidth function.
bool m_rsInterferencePowerUpdated
RS interference power updated?
std::map< uint16_t, UeMeasurementsElement > m_ueMeasurementsMap
Store measurement results during the last layer-1 filtering period.
void DoResetRlfParams()
Reset radio link failure parameters.
Ptr< LteSpectrumPhy > GetDlSpectrumPhy() const
Get Downlink spectrum phy.
std::vector< int > GetSubChannelsForTransmission(void)
Get a list of sub channels to use in RX.
Summary results of measuring a specific cell. Used for layer-1 filtering.
std::vector< int > m_subChannelsForReception
A list of sub channels to use in RX.
void SetNumQoutEvalSf(uint16_t numSubframes)
Set number of Qout evaluation subframes.
void DoStartInSnycDetection()
Start in Snyc detection function.
std::vector< double > m_txModeGain
the transmit mode gain
void DoSynchronizeWithEnb(uint16_t cellId)
Synchronize with ENB function.
State
The states of the UE PHY entity.
void(* RsrpRsrqTracedCallback)(uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool isServingCell, uint8_t componentCarrierId)
TracedCallback signature for cell RSRP and RSRQ.
Time m_p10CqiLast
last periodic CQI
uint16_t m_numOfQoutEvalSf
the downlink radio link quality is estimated over this period for detecting out-of-syncs
bool m_dlConfigured
DL configured?
void SetNumQinEvalSf(uint16_t numSubframes)
Set number of Qin evaluation subframes.
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 ...
bool m_rsReceivedPowerUpdated
RS receive power updated?
Ptr< DlCqiLteControlMessage > CreateDlCqiFeedbackMessage(const SpectrumValue &sinr)
Create the DL CQI feedback from SINR values perceived at the physical layer with the signal received ...
Ptr< LteUePowerControl > GetUplinkPowerControl() const
Get Uplink power control.
double ComputeAvgSinr(const SpectrumValue &sinr)
Compute average SINR among the RBs.
void SetLteUeCphySapUser(LteUeCphySapUser *s)
Set the CPHY SAP User.
TracedCallback< uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
double rsrqSum
Sum of RSRQ sample values in linear unit.
void PhyPduReceived(Ptr< Packet > p)
PhySpectrum received a new PHY-PDU.
LteUeCphySapProvider * m_ueCphySapProvider
UE CPhy SAP provider.
double m_qOut
The 'Qout' attribute.
void SetTxModeGain(uint8_t txMode, double gain)
Set transmit mode gain function.
See section 4.3.23 dlInfoListElement.
void SetNoiseFigure(double nf)
Set noise figure.
double pssPsdSum
PSS PSD sum.
LteUePhySapProvider * GetLteUePhySapProvider()
Get the PHY SAP provider.
Service Access Point (SAP) offered by the PHY to the MAC.
uint16_t m_numOfSubframes
count the number of subframes for which the downlink radio link quality is estimated
virtual void DoNotifyConnectionSuccessful()
Notify PHY about the successful RRC connection establishment.
double m_paLinear
PA linear.
double m_pssReceptionThreshold
The RsrqUeMeasThreshold attribute.
virtual void DoSendMacPdu(Ptr< Packet > p)
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
std::vector< int > m_subChannelsForTransmission
A list of sub channels to use in TX.
UeMemberLteUePhySapProvider class.
void SetSubChannelsForReception(std::vector< int > mask)
Get a list of sub channels to use in RX.
Ptr< LteSpectrumPhy > GetUlSpectrumPhy() const
Get Uplink spectrum phy.
std::list< PssElement > m_pssList
PSS list.
void SetTxMode4Gain(double gain)
Set transmit mode 4 gain function.
void SetTxMode2Gain(double gain)
Set transmit mode 2 gain function.
Ptr< LteHarqPhy > m_harqPhyModule
HARQ phy module.
uint16_t m_numOfFrames
count the number of frames for which the downlink radio link quality is estimated
double m_qIn
The 'Qin' attribute.
uint16_t m_srsPeriodicity
SRS periodicity.
Time m_ueMeasurementsFilterPeriod
The UeMeasurementsFilterPeriod attribute.
bool m_enableUplinkPowerControl
The EnableUplinkPowerControl attribute.
bool m_dataInterferencePowerUpdated
data interference power updated?
void DoSetImsi(uint64_t imsi)
Set IMSI.
virtual void DoSendRachPreamble(uint32_t prachId, uint32_t raRnti)
Send RACH preamble function.