35 #include <ns3/boolean.h>
36 #include <ns3/double.h>
39 #include <ns3/object-factory.h>
40 #include <ns3/pointer.h>
41 #include <ns3/simulator.h>
134 static inline const std::string&
150 m_uePhySapUser(nullptr),
151 m_ueCphySapUser(nullptr),
152 m_state(CELL_SEARCH),
154 m_rsReceivedPowerUpdated(false),
155 m_rsInterferencePowerUpdated(false),
156 m_dataInterferencePowerUpdated(false),
157 m_pssReceived(false),
160 m_rsrpSinrSampleCounter(0),
163 m_amc = CreateObject<LteAmc>();
170 "Cannot create UE devices after simulation started");
198 .AddAttribute(
"TxPower",
199 "Transmission power in dBm",
202 MakeDoubleChecker<double>())
205 "Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver."
206 " According to Wikipedia (http://en.wikipedia.org/wiki/Noise_figure), this is "
207 "\"the difference in decibels (dB) between"
208 " the noise output of the actual receiver to the noise output of an "
209 " ideal receiver with the same overall gain and bandwidth when the receivers "
210 " are connected to sources at the standard noise temperature T0.\" "
211 "In this model, we consider T0 = 290K.",
214 MakeDoubleChecker<double>())
215 .AddAttribute(
"TxMode1Gain",
216 "Transmission mode 1 gain in dB",
219 MakeDoubleChecker<double>())
220 .AddAttribute(
"TxMode2Gain",
221 "Transmission mode 2 gain in dB",
224 MakeDoubleChecker<double>())
225 .AddAttribute(
"TxMode3Gain",
226 "Transmission mode 3 gain in dB",
229 MakeDoubleChecker<double>())
230 .AddAttribute(
"TxMode4Gain",
231 "Transmission mode 4 gain in dB",
234 MakeDoubleChecker<double>())
235 .AddAttribute(
"TxMode5Gain",
236 "Transmission mode 5 gain in dB",
239 MakeDoubleChecker<double>())
240 .AddAttribute(
"TxMode6Gain",
241 "Transmission mode 6 gain in dB",
244 MakeDoubleChecker<double>())
245 .AddAttribute(
"TxMode7Gain",
246 "Transmission mode 7 gain in dB",
249 MakeDoubleChecker<double>())
250 .AddTraceSource(
"ReportCurrentCellRsrpSinr",
251 "RSRP and SINR statistics.",
253 "ns3::LteUePhy::RsrpSinrTracedCallback")
254 .AddAttribute(
"RsrpSinrSamplePeriod",
255 "The sampling period for reporting RSRP-SINR stats (default value 1)",
258 MakeUintegerChecker<uint16_t>())
259 .AddTraceSource(
"ReportUlPhyResourceBlocks",
260 "UL transmission PHY layer resource blocks.",
262 "ns3::LteUePhy::UlPhyResourceBlocksTracedCallback")
263 .AddTraceSource(
"ReportPowerSpectralDensity",
264 "Power Spectral Density data.",
266 "ns3::LteUePhy::PowerSpectralDensityTracedCallback")
267 .AddTraceSource(
"UlPhyTransmission",
268 "DL transmission PHY layer statistics.",
270 "ns3::PhyTransmissionStatParameters::TracedCallback")
271 .AddAttribute(
"DlSpectrumPhy",
272 "The downlink LteSpectrumPhy associated to this LtePhy",
276 MakePointerChecker<LteSpectrumPhy>())
277 .AddAttribute(
"UlSpectrumPhy",
278 "The uplink LteSpectrumPhy associated to this LtePhy",
282 MakePointerChecker<LteSpectrumPhy>())
283 .AddAttribute(
"RsrqUeMeasThreshold",
284 "Receive threshold for PSS on RSRQ [dB]",
287 MakeDoubleChecker<double>())
288 .AddAttribute(
"UeMeasurementsFilterPeriod",
289 "Time period for reporting UE measurements, i.e., the"
290 "length of layer-1 filtering.",
294 .AddAttribute(
"DownlinkCqiPeriodicity",
295 "Periodicity in milliseconds for reporting the"
296 "wideband and subband downlink CQIs to the eNB",
300 .AddTraceSource(
"ReportUeMeasurements",
301 "Report UE measurements RSRP (dBm) and RSRQ (dB).",
303 "ns3::LteUePhy::RsrpRsrqTracedCallback")
304 .AddTraceSource(
"StateTransition",
305 "Trace fired upon every UE PHY state transition",
307 "ns3::LteUePhy::StateTracedCallback")
308 .AddAttribute(
"EnableUplinkPowerControl",
309 "If true, Uplink Power Control will be enabled.",
313 .AddAttribute(
"Qout",
314 "corresponds to 10% block error rate of a hypothetical PDCCH transmission"
315 "taking into account the PCFICH errors with transmission parameters."
316 "see 3GPP TS 36.213 4.2.1 and TS 36.133 7.6",
319 MakeDoubleChecker<double>())
321 "corresponds to 2% block error rate of a hypothetical PDCCH transmission"
322 "taking into account the PCFICH errors with transmission parameters."
323 "see 3GPP TS 36.213 4.2.1 and TS 36.133 7.6",
326 MakeDoubleChecker<double>())
329 "This specifies the total number of consecutive subframes"
330 "which corresponds to the Qout evaluation period",
333 MakeUintegerChecker<uint16_t>())
336 "This specifies the total number of consecutive subframes"
337 "which corresponds to the Qin evaluation period",
340 MakeUintegerChecker<uint16_t>())
341 .AddAttribute(
"EnableRlfDetection",
342 "If true, RLF detection will be enabled.",
356 NS_ABORT_MSG_IF(!node,
"Node is not available in the LteNetDevice of LteUePhy");
357 uint32_t nodeId = node->
GetId();
454 "Number of subframes used for Qout "
455 "evaluation must be multiple of 10");
464 "Number of subframes used for Qin "
465 "evaluation must be multiple of 10");
578 <<
". Last reported at : "
592 <<
". Last reported at : "
619 double powerTxW = ((*it) * 180000.0) / 12.0;
623 double rsrp = (rbNum > 0) ? (sum / rbNum) : DBL_MAX;
628 <<
" SINR " << avSinr <<
" ComponentCarrierId "
655 double rssiSum = 0.0;
665 double interfPlusNoisePowerTxW = ((*itIntN) * 180000.0) / 12.0;
666 double signalPowerTxW = ((*itPj) * 180000.0) / 12.0;
667 rssiSum += (2 * (interfPlusNoisePowerTxW + signalPowerTxW));
671 double rsrq_dB = 10 * log10((*itPss).pssPsdSum / rssiSum);
676 << rsrq_dB <<
" and RBnum " << rbNum);
681 (*itMeasMap).second.rsrqSum += rsrq_dB;
682 (*itMeasMap).second.rsrqNum++;
686 NS_LOG_WARN(
"race condition of bug 2091 occurred");
715 double avrgSinr = (rbNum > 0) ? (sum / rbNum) : DBL_MAX;
759 NS_LOG_LOGIC(
"data interf measurement available, SINR = " << mixedSinr);
765 mixedSinr /= (*m_noisePsd);
766 NS_LOG_LOGIC(
"no data interf measurement available, SINR = " << mixedSinr);
776 double avgMixedSinr = 0;
777 uint32_t usedRbgNum = 0;
781 avgMixedSinr += mixedSinr[i];
783 avgMixedSinr = avgMixedSinr / usedRbgNum;
784 for (uint32_t i = 0; i < modulo; i++)
823 double powerTxW = ((*it) * 180000);
826 double rsrp = 10 * log10(sum) + 30;
846 std::vector<int> cqi;
852 auto nbSubChannels = cqi.size();
854 int activeSubChannels = 0;
856 for (std::size_t i = 0; i < nbSubChannels; i++)
863 NS_LOG_DEBUG(
this <<
" subch " << i <<
" cqi " << cqi.at(i));
870 for (uint8_t i = 0; i < nLayer; i++)
872 if (activeSubChannels > 0)
874 dlcqi.
m_wbCqi.push_back((uint16_t)cqiSum / activeSubChannels);
891 auto nbSubChannels = cqi.size();
898 for (std::size_t i = 0; i < nbSubChannels; i++)
906 if (cqiNum == rbgSize)
912 for (uint8_t i = 0; i < nLayer; i++)
914 hlCqi.
m_sbCqi.push_back((uint16_t)cqiSum / rbgSize);
929 msg->SetDlCqi(dlcqi);
943 double avg_rsrp = (*it).second.rsrpSum / (double)(*it).second.rsrpNum;
944 double avg_rsrq = (*it).second.rsrqSum / (
double)(*it).second.rsrqNum;
950 NS_LOG_DEBUG(
this <<
" CellId " << (*it).first <<
" RSRP " << avg_rsrp <<
" (nSamples "
951 << (uint16_t)(*it).second.rsrpNum <<
")"
952 <<
" RSRQ " << avg_rsrq <<
" (nSamples " << (uint16_t)(*it).second.rsrqNum
960 ret.m_ueMeasurementsList.push_back(newEl);
1002 msg->SetRapId(raPreambleId);
1030 << (uint16_t)msgList.size());
1031 for (
auto it = msgList.begin(); it != msgList.end(); it++)
1051 std::vector<int> dlRb;
1054 uint32_t mask = 0x1;
1055 for (
int i = 0; i < 32; i++)
1076 for (std::size_t i = 0; i < dci.
m_tbsSize.size(); i++)
1102 std::vector<int> ulRb;
1104 for (
int i = 0; i < dci.
m_rbLen; i++)
1122 params.m_rv = harqInfoList.size();
1132 if (rarMsg->GetRaRnti() ==
m_raRnti)
1134 for (
auto it = rarMsg->RarListBegin(); it != rarMsg->RarListEnd(); ++it)
1145 std::vector<int> ulRb;
1146 ulRb.reserve(it->rarPayload.m_grant.m_rbLen);
1147 for (
int i = 0; i < it->rarPayload.m_grant.m_rbLen; i++)
1149 ulRb.push_back(i + it->rarPayload.m_grant.m_rbStart);
1194 double powerTxW = ((*itPi) * 180000.0) / 12.0;
1200 double rsrp_dBm = 10 * log10(1000 * (sum / (
double)nRB));
1202 <<
" and RBnum " << nRB);
1219 (*itMeasMap).second.rsrpSum += rsrp_dBm;
1220 (*itMeasMap).second.rsrpNum++;
1247 NS_ASSERT_MSG(frameNo > 0,
"the SRS index check code assumes that frameNo starts at 1");
1270 "the SRS index check code assumes that subframeNo starts at 1");
1273 NS_LOG_INFO(
"frame " << frameNo <<
" subframe " << subframeNo
1283 NS_LOG_LOGIC(
this <<
" UE - start slot for PUSCH + PUCCH - RNTI " <<
m_rnti <<
" CELLID "
1299 if (!ctrlMsg.empty())
1301 NS_LOG_LOGIC(
this <<
" UE - start TX PUCCH (NO PUSCH)");
1302 std::vector<int> dlRb;
1324 if (subframeNo > 10)
1344 std::vector<int> dlRb;
1390 std::list<Ptr<LteControlMessage>> l;
1393 std::vector<int> ulRb;
1475 for (
int i = 0; i < 4; i++)
1643 <<
" ms UE PHY sending out of sync indication to UE RRC layer");
1682 <<
" ms UE PHY sending in sync indication to UE RRC layer");
1737 double gainLin = std::pow(10.0, (gain / 10.0));
1754 msg->SetDlHarqFeedback(
m);
This class can be used to hold variables of floating point type such as 'double' or 'float'.
void Cancel()
This method is syntactic sugar for the ns3::Simulator::Cancel method.
The LtePhy models the physical layer of LTE.
double m_txPower
Transmission power in dBm.
uint8_t GetRbgSize() const
void DoDispose() override
Destructor implementation.
uint16_t GetSrsPeriodicity(uint16_t srcCi) const
std::vector< Ptr< PacketBurst > > m_packetBurstQueue
A queue of packet bursts to be sent.
uint16_t m_ulBandwidth
The UL bandwidth in number of PRBs.
Ptr< PacketBurst > GetPacketBurst()
Ptr< LteNetDevice > GetDevice() const
Get the device where the phy layer is attached.
uint8_t m_componentCarrierId
component carrier Id used to address sap
double m_noiseFigure
Loss (dB) in the Signal-to-Noise-Ratio due to non-idealities in the receiver.
uint32_t m_ulEarfcn
The uplink carrier frequency.
uint16_t m_dlBandwidth
The DL bandwidth in number of PRBs.
Ptr< LteSpectrumPhy > m_downlinkSpectrumPhy
The downlink LteSpectrumPhy associated to this LtePhy.
void SetMacPdu(Ptr< Packet > p)
std::list< Ptr< LteControlMessage > > GetControlMessages()
uint16_t GetSrsSubframeOffset(uint16_t srcCi) const
Ptr< LteNetDevice > m_netDevice
Pointer to the NetDevice where this PHY layer is attached.
uint16_t m_cellId
Cell identifier.
void SetControlMessages(Ptr< LteControlMessage > m)
uint32_t m_dlEarfcn
The downlink carrier frequency.
Ptr< LteSpectrumPhy > m_uplinkSpectrumPhy
The uplink LteSpectrumPhy associated to this LtePhy.
std::vector< std::list< Ptr< LteControlMessage > > > m_controlMessagesQueue
A queue of control messages to be sent.
uint8_t m_rbgSize
The RB group size according to the bandwidth.
uint8_t m_macChTtiDelay
Delay between MAC and channel layer in terms of TTIs.
static Ptr< SpectrumValue > CreateUlTxPowerSpectralDensity(uint16_t earfcn, uint16_t bandwidth, double powerTx, std::vector< int > activeRbs)
create a spectrum value representing the uplink power spectral density of a signal to be transmitted.
static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t earfcn, uint16_t bandwidth, double noiseFigure)
create a SpectrumValue that models the power spectral density of AWGN
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
Service Access Point (SAP) offered by the UE PHY to the UE RRC for control purposes.
virtual void NotifyInSync()=0
Send an in sync indication to UE RRC.
virtual void ReportUeMeasurements(UeMeasurementsParameters params)=0
Send a report of RSRP and RSRQ values perceived from PSS by the PHY entity (after applying layer-1 fi...
virtual void RecvMasterInformationBlock(uint16_t cellId, LteRrcSap::MasterInformationBlock mib)=0
Relay an MIB message from the PHY entity to the RRC layer.
virtual void RecvSystemInformationBlockType1(uint16_t cellId, LteRrcSap::SystemInformationBlockType1 sib1)=0
Relay an SIB1 message from the PHY entity to the RRC layer.
virtual void NotifyOutOfSync()=0
Send an out of sync indication to UE RRC.
virtual void ResetSyncIndicationCounter()=0
Reset the sync indication counter.
The LteUeNetDevice class implements the UE net device.
The LteSpectrumPhy models the physical layer of LTE.
void SetTxMode1Gain(double gain)
Set transmit mode 1 gain function.
SpectrumValue m_dataInterferencePower
data interference power
void SetSubChannelsForTransmission(std::vector< int > mask)
Set a list of sub channels to use in TX.
void DoInitialize() override
Initialize() implementation.
friend class MemberLteUeCphySapProvider< LteUePhy >
allow MemberLteUeCphySapProvider<LteUePhy> class friend access
void SetHarqPhyModule(Ptr< LteHarqPhy > harq)
Set the HARQ PHY module.
void DoSetDlBandwidth(uint16_t dlBandwidth)
Set DL bandwidth function.
uint16_t GetNumQinEvalSf() const
Get number of Qin evaluation subframes.
void SetTxMode3Gain(double gain)
Set transmit mode 3 gain function.
uint16_t m_numOfQinEvalSf
the downlink radio link quality is estimated over this period for detecting in-syncs
LteUePhySapUser * m_uePhySapUser
UE Phy SAP user.
uint16_t DoGetCellId()
Get cell ID.
uint16_t m_rsrpSinrSampleCounter
The RsrpSinrSampleCounter attribute.
virtual void ReportDataInterference(const SpectrumValue &interf)
Create the mixed CQI report.
void QueueSubChannelsForTransmission(std::vector< int > rbMap)
Queue subchannels for transmission function.
void DoConfigureUplink(uint32_t ulEarfcn, uint16_t ulBandwidth)
Configure UL uplink function.
virtual void ReceivePss(uint16_t cellId, Ptr< SpectrumValue > p)
Receive PSS function.
uint16_t m_srsPeriodicity
SRS periodicity.
void DoResetPhyAfterRlf()
Reset Phy after radio link failure function.
virtual void DoNotifyConnectionSuccessful()
Notify PHY about the successful RRC connection establishment.
bool m_dlConfigured
DL configured?
LteUePhySapProvider * GetLteUePhySapProvider()
Get the PHY SAP provider.
Time m_srsStartTime
SRS start time.
double GetNoiseFigure() const
Get noise figure.
Time m_p10CqiLast
last periodic CQI
std::map< uint16_t, UeMeasurementsElement > m_ueMeasurementsMap
Store measurement results during the last layer-1 filtering period.
TracedCallback< uint16_t, Ptr< SpectrumValue > > m_reportPowerSpectralDensity
The ReportsPowerSpectralDensity trace source.
LteUePhySapProvider * m_uePhySapProvider
UE Phy SAP provider.
void ReportRsReceivedPower(const SpectrumValue &power) override
generate a report based on the linear RS power perceived during CTRL frame NOTE: used only by UE for ...
uint16_t GetNumQoutEvalSf() const
Get number of Qout evaluation subframes.
bool m_rsInterferencePowerUpdated
RS interference power updated?
void DoSendMacPdu(Ptr< Packet > p) override
Queue the MAC PDU to be sent (according to m_macChTtiDelay)
Ptr< SpectrumValue > m_noisePsd
Noise power spectral density for the configured bandwidth.
void GenerateCtrlCqiReport(const SpectrumValue &sinr) override
generate a CQI report based on the given SINR of Ctrl frame
uint32_t DoGetDlEarfcn()
Get DL EARFCN.
double ComputeAvgSinr(const SpectrumValue &sinr)
Compute average SINR among the RBs.
void SetLteUePhySapUser(LteUePhySapUser *s)
Set the PHY SAP User.
virtual void DoSendRachPreamble(uint32_t prachId, uint32_t raRnti)
Send RACH preamble function.
void DoStartCellSearch(uint32_t dlEarfcn)
Start the cell search function.
void SetTxMode6Gain(double gain)
Set transmit mode 6 gain function.
LteUeCphySapProvider * m_ueCphySapProvider
UE CPhy SAP provider.
Ptr< SpectrumValue > CreateTxPowerSpectralDensity() override
Create the PSD for the TX.
std::vector< std::vector< int > > m_subChannelsForTransmissionQueue
subchannels for transmission queue
void DoReset()
Do Reset function.
void SetNumQoutEvalSf(uint16_t numSubframes)
Set number of Qout evaluation subframes.
State m_state
The current UE PHY state.
bool m_pssReceived
PSS received?
TracedCallback< uint16_t, uint16_t, double, double, uint8_t > m_reportCurrentCellRsrpSinrTrace
The ReportCurrentCellRsrpSinr trace source.
void DoSetImsi(uint64_t imsi)
Set IMSI.
void SetTxMode2Gain(double gain)
Set transmit mode 2 gain function.
void DoSetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)
Do set RSRP filter coefficient.
uint8_t GetMacChDelay() const
Get MAC to Channel delay.
Ptr< LteUePowerControl > m_powerControl
Pointer to UE Uplink Power Control entity.
void DoConfigureReferenceSignalPower(int8_t referenceSignalPower)
Configure reference signal power function.
std::list< PssElement > m_pssList
PSS list.
void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)
trigger from eNB the start from a new frame
Ptr< LteUePowerControl > GetUplinkPowerControl() const
Get Uplink power control.
void RlfDetection(double sinrdB)
Radio link failure detection function.
std::vector< double > m_txModeGain
the transmit mode gain
State GetState() const
Get state of the UE physical layer.
SpectrumValue m_rsReceivedPower
RS receive power.
void DoSynchronizeWithEnb(uint16_t cellId)
Synchronize with ENB function.
void DoSetSrsConfigurationIndex(uint16_t srcCi)
Set SRS configuration index function.
uint16_t m_srsSubframeOffset
SRS subframe offset.
uint16_t m_rsrpSinrSamplePeriod
The RsrpSinrSamplePeriod attribute.
uint64_t m_imsi
the IMSI of the UE
bool m_enableUplinkPowerControl
The EnableUplinkPowerControl attribute.
Ptr< LteSpectrumPhy > GetDlSpectrumPhy() const
Get Downlink spectrum phy.
void SetTxMode5Gain(double gain)
Set transmit mode 5 gain function.
void DoSetTransmissionMode(uint8_t txMode)
Set transmission mode function.
bool m_enableRlfDetection
Flag to enable/disable RLF detection.
Time m_a30CqiLast
last aperiodic CQI
void GenerateCqiRsrpRsrq(const SpectrumValue &sinr)
Get CQI, RSRP, and RSRQ.
SpectrumValue m_rsInterferencePower
RS interference power.
void DoResetRlfParams()
Reset radio link failure parameters.
void SetDownlinkCqiPeriodicity(Time cqiPeriodicity)
Set the periodicty for the downlink periodic wideband and aperiodic subband CQI reporting.
Ptr< LteHarqPhy > m_harqPhyModule
HARQ phy module.
EventId m_sendSrsEvent
send SRS event
double m_qIn
The 'Qin' attribute.
virtual void ReceiveLteControlMessageList(std::list< Ptr< LteControlMessage >> msgList)
Receive LTE control message list function.
void SetNoiseFigure(double nf)
Set noise figure.
friend class UeMemberLteUePhySapProvider
allow UeMemberLteUePhySapProvider class friend access
void DoSetPa(double pa)
Set PA function.
Ptr< DlCqiLteControlMessage > CreateDlCqiFeedbackMessage(const SpectrumValue &sinr)
Create the DL CQI feedback from SINR values perceived at the physical layer with the signal received ...
LteUeCphySapUser * m_ueCphySapUser
UE CPhy SAP user.
void SetNumQinEvalSf(uint16_t numSubframes)
Set number of Qin evaluation subframes.
void SetLteUeCphySapUser(LteUeCphySapUser *s)
Set the CPHY SAP User.
double m_sinrDbFrame
the average SINR per radio frame
TracedCallback< uint16_t, uint16_t, State, State > m_stateTransitionTrace
The StateTransition trace source.
void DoDispose() override
Destructor implementation.
void SetSubChannelsForReception(std::vector< int > mask)
Get a list of sub channels to use in RX.
bool m_rsReceivedPowerUpdated
RS receive power updated?
void SwitchToState(State s)
Switch the UE PHY to the given state.
TracedCallback< uint16_t, uint16_t, double, double, bool, uint8_t > m_reportUeMeasurements
The ReportUeMeasurements trace source.
double m_paLinear
PA linear.
TracedCallback< PhyTransmissionStatParameters > m_ulPhyTransmission
The UlPhyTransmission trace source.
bool m_isConnected
set when UE RRC is in CONNECTED_NORMALLY state
std::vector< int > m_subChannelsForReception
A list of sub channels to use in RX.
void InitializeRlfParams()
Initialize radio link failure parameters.
std::vector< int > GetSubChannelsForTransmission()
Get a list of sub channels to use in RX.
void PhyPduReceived(Ptr< Packet > p)
PhySpectrum received a new PHY-PDU.
LteUeCphySapProvider * GetLteUeCphySapProvider()
Get the CPHY SAP provider.
bool m_ulConfigured
UL configured?
SpectrumValue m_ctrlSinrForRlf
the CTRL SINR used for RLF detection
Time m_ueMeasurementsFilterPeriod
The UeMeasurementsFilterPeriod attribute.
bool m_srsConfigured
SRS configured.
void GenerateDataCqiReport(const SpectrumValue &sinr) override
generate a CQI report based on the given SINR of Data frame (used for PUSCH CQIs)
uint16_t m_numOfFrames
count the number of frames for which the downlink radio link quality is estimated
bool m_downlinkInSync
when set, DL SINR evaluation for out-of-sync indications is conducted.
uint16_t m_numOfQoutEvalSf
the downlink radio link quality is estimated over this period for detecting out-of-syncs
void SetTxMode7Gain(double gain)
Set transmit mode 7 gain function.
void DoSetRnti(uint16_t rnti)
Set RNTI function.
static TypeId GetTypeId()
Get the type ID.
double GetTxPower() const
Get transmit power.
virtual void EnqueueDlHarqFeedback(DlInfoListElement_s mes)
Enqueue the downlink HARQ feedback generated by LteSpectrumPhy.
std::vector< int > m_subChannelsForTransmission
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.
bool m_dataInterferencePowerUpdated
data interference power updated?
void SetTxPower(double pow)
Set transmit power.
State
The states of the UE PHY entity.
uint16_t m_numOfSubframes
count the number of subframes for which the downlink radio link quality is estimated
void SetTxMode4Gain(double gain)
Set transmit mode 4 gain function.
virtual void DoSendLteControlMessage(Ptr< LteControlMessage > msg)
Send LTE control message function.
Time m_a30CqiPeriodicity
SubBand Aperiodic CQI.
TracedCallback< uint16_t, const std::vector< int > & > m_reportUlPhyResourceBlocks
The ReportUlPhyResourceBlocks trace source.
void ReportInterference(const SpectrumValue &interf) override
generate a report based on the linear interference and noise power perceived during DATA frame NOTE: ...
std::vector< int > GetSubChannelsForReception()
Get a list of sub channels to use in RX.
Ptr< LteSpectrumPhy > GetUlSpectrumPhy() const
Get Uplink spectrum phy.
void ReportUeMeasurements()
Layer-1 filtering of RSRP and RSRQ measurements and reporting to the RRC entity.
double m_pssReceptionThreshold
The RsrqUeMeasThreshold attribute.
uint32_t m_raPreambleId
RA preamble ID.
double m_qOut
The 'Qout' attribute.
void DoStartInSyncDetection()
Start in Sync detection function.
void SendSrs()
Send the SRS signal in the last symbols of the frame.
virtual void GenerateMixedCqiReport(const SpectrumValue &sinr)
Create the mixed CQI report.
uint8_t m_transmissionMode
the transmission mode
void SetTxModeGain(uint8_t txMode, double gain)
Set transmit mode gain function.
uint32_t m_raRnti
RA RNTI.
Service Access Point (SAP) offered by the UE-PHY to the UE-MAC.
Service Access Point (SAP) offered by the PHY to the MAC.
virtual void ReceivePhyPdu(Ptr< Packet > p)=0
Receive Phy Pdu function.
virtual void SubframeIndication(uint32_t frameNo, uint32_t subframeNo)=0
Trigger the start from a new frame (input from Phy layer)
virtual void ReceiveLteControlMessage(Ptr< LteControlMessage > msg)=0
Receive SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
void SetCellId(uint16_t cellId)
Set the cell ID function.
void SetRsrp(double value)
Set RSRP function.
void ConfigureReferenceSignalPower(int8_t referenceSignalPower)
Configure reference signal power (dBm) function.
void SetRnti(uint16_t rnti)
Set the RNTI function.
double GetPucchTxPower(std::vector< int > rb)
Get PUCCH transmit power function.
void SetTxPower(double value)
Set transmit power function.
void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)
Set RSRP function.
double GetPuschTxPower(std::vector< int > rb)
Get PUSCH transmit power function.
void ReportTpc(uint8_t tpc)
Set RSRP function.
double GetSrsTxPower(std::vector< int > rb)
Get SRS transmit power function.
virtual void DoInitialize()
Initialize() implementation.
Hold objects of type Ptr<T>.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
static Time Now()
Return the current simulation virtual time.
Set of values corresponding to a given SpectrumModel.
Values::const_iterator ConstValuesBegin() const
Values::const_iterator ConstValuesEnd() const
Simulation virtual time values and global simulation resolution.
int64_t GetMilliSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
static uint8_t TxMode2LayerNum(uint8_t txMode)
Transmit mode 2 layer number.
a unique identifier for an interface.
@ ATTR_GET
The attribute can be read.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
UeMemberLteUePhySapProvider class.
void SendRachPreamble(uint32_t prachId, uint32_t raRnti) override
Send a preamble on the PRACH.
void NotifyConnectionSuccessful() override
Notify PHY about the successful RRC connection establishment.
void SendLteControlMessage(Ptr< LteControlMessage > msg) override
Send SendLteControlMessage (PDCCH map, CQI feedbacks) using the ideal control channel.
void SendMacPdu(Ptr< Packet > p) override
Send the MAC PDU to the channel.
UeMemberLteUePhySapProvider(LteUePhy *phy)
Constructor.
Hold an unsigned integer type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
#define UL_PUSCH_TTIS_DELAY
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static const std::string g_uePhyStateName[LteUePhy::NUM_STATES]
Map each of UE PHY states to its string representation.
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
static const std::string & ToString(EpcUeNas::State s)
static const Time UL_DATA_DURATION
Duration of the data portion of a UL subframe.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
static const Time UL_SRS_DELAY_FROM_SUBFRAME_START
Delay from subframe start to transmission of SRS.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
std::vector< HarqProcessInfoElement_t > HarqProcessInfoList_t
HarqProcessInfoList_t typedef.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
static const int Type0AllocationRbg[4]
Type 0 RGB allocation.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
See section 4.3.24 cqiListElement.
std::vector< uint8_t > m_wbCqi
wb CQI
struct SbMeasResult_s m_sbMeasResult
sb measure result
See section 4.3.1 dlDciListElement.
std::vector< uint8_t > m_ndi
New data indicator.
uint8_t m_harqProcess
HARQ process.
uint32_t m_rbBitmap
RB bitmap.
std::vector< uint8_t > m_mcs
MCS.
uint8_t m_resAlloc
The type of resource allocation.
std::vector< uint16_t > m_tbsSize
The TBs size.
std::vector< uint8_t > m_rv
Redundancy version.
uint8_t m_tpc
Tx power control command.
See section 4.3.23 dlInfoListElement.
See section 4.3.27 higherLayerSelected.
std::vector< uint8_t > m_sbCqi
sb CQI
Parameters of the ReportUeMeasurements primitive: RSRP [dBm] and RSRQ [dB] See section 5....
UeMeasurementsParameters structure.
double pssPsdSum
PSS PSD sum.
Summary results of measuring a specific cell. Used for layer-1 filtering.
double rsrqSum
Sum of RSRQ sample values in linear unit.
uint8_t rsrpNum
Number of RSRP samples.
double rsrpSum
Sum of RSRP sample values in linear unit.
uint8_t rsrqNum
Number of RSRQ samples.
PhyTransmissionStatParameters structure.
See section 4.3.25 sbMeasResult.
std::vector< struct HigherLayerSelected_s > m_higherLayerSelected
higher layer selected
See section 4.3.2 ulDciListElement.