lte: Add trace sources for uplink PSD and RBs

see merge request !300
This commit is contained in:
Peter D. Barnes, Jr
2020-05-20 16:54:20 -07:00
committed by ZorazeAli
parent a75ca74913
commit 88d244c5f0
3 changed files with 43 additions and 1 deletions

View File

@@ -356,7 +356,7 @@ int main (int argc, char *argv[])
uint32_t dlChannelId = dlChannel->GetId ();
NS_LOG_INFO ("DL ChannelId: " << dlChannelId);
remHelper->SetAttribute ("ChannelPath", StringValue ("/ChannelList/1"));
remHelper->SetAttribute ("OutputFile", StringValue ("lena-frequency-reuse.rem"));
remHelper->SetAttribute ("OutputFile", StringValue ("lena-distributed-ffr.rem"));
remHelper->SetAttribute ("XMin", DoubleValue (macroUeBox.xMin));
remHelper->SetAttribute ("XMax", DoubleValue (macroUeBox.xMax));
remHelper->SetAttribute ("YMin", DoubleValue (macroUeBox.yMin));

View File

@@ -268,6 +268,14 @@ LteUePhy::GetTypeId (void)
UintegerValue (1),
MakeUintegerAccessor (&LteUePhy::m_rsrpSinrSamplePeriod),
MakeUintegerChecker<uint16_t> ())
.AddTraceSource ("ReportUlPhyResourceBlocks",
"UL transmission PHY layer resource blocks.",
MakeTraceSourceAccessor (&LteUePhy::m_reportUlPhyResourceBlocks),
"ns3::LteUePhy::UlPhyResourceBlocksTracedCallback")
.AddTraceSource ("ReportPowerSpectralDensity",
"Power Spectral Density data.",
MakeTraceSourceAccessor (&LteUePhy::m_reportPowerSpectralDensity),
"ns3::LteUePhy::PowerSpectralDensityTracedCallback")
.AddTraceSource ("UlPhyTransmission",
"DL transmission PHY layer statistics.",
MakeTraceSourceAccessor (&LteUePhy::m_ulPhyTransmission),
@@ -541,6 +549,7 @@ LteUePhy::CreateTxPowerSpectralDensity ()
NS_LOG_FUNCTION (this);
LteSpectrumValueHelper psdHelper;
Ptr<SpectrumValue> psd = psdHelper.CreateUlTxPowerSpectralDensity (m_ulEarfcn, m_ulBandwidth, m_txPower, GetSubChannelsForTransmission ());
m_reportPowerSpectralDensity (m_rnti, psd);
return psd;
}
@@ -1096,6 +1105,7 @@ LteUePhy::ReceiveLteControlMessageList (std::list<Ptr<LteControlMessage> > msgLi
ulRb.push_back (i + dci.m_rbStart);
//NS_LOG_DEBUG (this << " UE RB " << i + dci.m_rbStart);
}
m_reportUlPhyResourceBlocks (m_rnti, ulRb);
QueueSubChannelsForTransmission (ulRb);
// fire trace of UL Tx PHY stats
HarqProcessInfoList_t harqInfoList = m_harqPhyModule->GetHarqProcessInfoUl (m_rnti, 0);

View File

@@ -337,6 +337,24 @@ public:
(uint16_t rnti, uint16_t cellId, double rsrp, double rsrq,
bool isServingCell, uint8_t componentCarrierId);
/**
* TracedCallback signature for UL Phy resource blocks.
*
* \param [in] rnti
* \param [in] rbs Vector of resource blocks allocated for UL.
*/
typedef void (* UlPhyResourceBlocksTracedCallback)
(uint16_t rnti, const std::vector<int>& rbs);
/**
* TracedCallback signature for spectral value.
*
* \param [in] rnti
* \param [in] psd The spectral power density.
*/
typedef void (* PowerSpectralDensityTracedCallback)
(uint16_t rnti, Ptr<SpectrumValue> psd);
private:
/**
@@ -780,6 +798,20 @@ private:
*/
TracedCallback<PhyTransmissionStatParameters> m_ulPhyTransmission;
/**
* The `ReportUlPhyResourceBlocks` trace source. Contains trace information
* regarding PHY stats from UL Resource Blocks (RBs). Exporting an RNTI of a
* UE and a vector containing the indices of the RBs used for UL.
*/
TracedCallback< uint16_t, const std::vector<int>& > m_reportUlPhyResourceBlocks;
/**
* The `ReportsPowerSpectralDensity` trace source. Contains trace information
* regarding Power Spectral Density. Exporting an RNTI of a UE and a pointer
* to Spectrum Values.
*/
TracedCallback< uint16_t, Ptr<SpectrumValue> > m_reportPowerSpectralDensity;
Ptr<SpectrumValue> m_noisePsd; ///< Noise power spectral density for
///the configured bandwidth