Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1212)

Unified Diff: src/lte/model/tdbet-ff-mac-scheduler.cc

Issue 338840043: Eliminate Visual Studio compiler warnings (Closed)
Patch Set: Update patch with latest module changes. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/lte/model/tdbet-ff-mac-scheduler.cc
===================================================================
--- a/src/lte/model/tdbet-ff-mac-scheduler.cc
+++ b/src/lte/model/tdbet-ff-mac-scheduler.cc
@@ -163,7 +163,7 @@
std::map <uint16_t,uint8_t>::iterator it = m_uesTxMode.find (params.m_rnti);
if (it == m_uesTxMode.end ())
{
- m_uesTxMode.insert (std::pair <uint16_t, double> (params.m_rnti, params.m_transmissionMode));
+ m_uesTxMode.insert (std::pair <uint16_t, uint8_t> (params.m_rnti, params.m_transmissionMode));
// generate HARQ buffers
m_dlHarqCurrentProcessId.insert (std::pair <uint16_t,uint8_t > (params.m_rnti, 0));
DlHarqProcessesStatus_t dlHarqPrcStatus;
@@ -320,6 +320,7 @@
{
NS_LOG_FUNCTION (this);
NS_FATAL_ERROR ("method not implemented");
+ NS_UNUSED (params);
return;
}
@@ -328,6 +329,7 @@
{
NS_LOG_FUNCTION (this);
NS_FATAL_ERROR ("method not implemented");
+ NS_UNUSED (params);
return;
}
@@ -499,15 +501,14 @@
FfMacSchedSapUser::SchedDlConfigIndParameters ret;
// update UL HARQ proc id
- std::map <uint16_t, uint8_t>::iterator itProcId;
- for (itProcId = m_ulHarqCurrentProcessId.begin (); itProcId != m_ulHarqCurrentProcessId.end (); itProcId++)
+ for (std::map <uint16_t, uint8_t>::iterator itProcId = m_ulHarqCurrentProcessId.begin (); itProcId != m_ulHarqCurrentProcessId.end (); itProcId++)
{
(*itProcId).second = ((*itProcId).second + 1) % HARQ_PROC_NUM;
}
// RACH Allocation
m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0);
- uint16_t rbStart = 0;
+ uint8_t rbStart = 0;
std::vector <struct RachListElement_s>::iterator itRach;
for (itRach = m_rachList.begin (); itRach != m_rachList.end (); itRach++)
{
@@ -519,7 +520,7 @@
// UL-RACH Allocation
newRar.m_grant.m_rnti = newRar.m_rnti;
newRar.m_grant.m_mcs = m_ulGrantMcs;
- uint16_t rbLen = 1;
+ uint8_t rbLen = 1;
uint16_t tbSizeBits = 0;
// find lowest TB size that fits UL grant estimated size
while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < m_cschedCellConfig.m_ulBandwidth))
@@ -621,7 +622,7 @@
// RNTI already allocated for retx
continue;
}
- uint8_t nLayers = m_dlInfoListBuffered.at (i).m_harqStatus.size ();
+ uint8_t nLayers = static_cast<uint8_t> (m_dlInfoListBuffered.at (i).m_harqStatus.size ());
std::vector <bool> retx;
NS_LOG_INFO (this << " Processing DLHARQ feedback");
if (nLayers == 1)
@@ -718,8 +719,8 @@
{
// find RBGs for sending HARQ retx
uint8_t j = 0;
- uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum;
- uint8_t startRbg = dciRbg.at (dciRbg.size () - 1);
+ uint8_t rbgId = static_cast<uint8_t> ((dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum);
+ uint8_t startRbg = static_cast<uint8_t> (dciRbg.at (dciRbg.size () - 1));
std::vector <bool> rbgMapCopy = rbgMap;
while ((j < dciRbg.size ())&&(startRbg != rbgId))
{
@@ -865,10 +866,9 @@
}
- std::map <uint16_t, tdbetsFlowPerf_t>::iterator it;
std::map <uint16_t, tdbetsFlowPerf_t>::iterator itMax = m_flowStatsDl.end ();
double metricMax = 0.0;
- for (it = m_flowStatsDl.begin (); it != m_flowStatsDl.end (); it++)
+ for (std::map <uint16_t, tdbetsFlowPerf_t>::iterator it = m_flowStatsDl.begin (); it != m_flowStatsDl.end (); it++)
{
// check first what are channel conditions for this UE, if CQI!=0
@@ -936,7 +936,7 @@
std::vector <uint16_t> tempMap;
for (int i = 0; i < rbgNum; i++)
{
- tempMap.push_back (i);
+ tempMap.push_back (static_cast<uint16_t> (i));
}
allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itMax).first, tempMap));
}
@@ -962,14 +962,14 @@
newDci.m_rnti = (*itMap).first;
newDci.m_harqProcess = UpdateHarqProcessId ((*itMap).first);
- uint16_t lcActives = LcActivePerFlow ((*itMap).first);
+ uint16_t lcActives = static_cast<uint16_t> (LcActivePerFlow ((*itMap).first));
NS_LOG_INFO (this << "Allocate user " << newEl.m_rnti << " rbg " << lcActives);
if (lcActives == 0)
{
// Set to max value, to avoid divide by 0 below
lcActives = (uint16_t)65535; // UINT16_MAX;
}
- uint16_t RgbPerRnti = (*itMap).second.size ();
+ uint16_t RgbPerRnti = static_cast<uint16_t> ((*itMap).second.size ());
std::map <uint16_t,uint8_t>::iterator itCqi;
itCqi = m_p10CqiRxed.find ((*itMap).first);
std::map <uint16_t,uint8_t>::iterator itTxMode;
@@ -993,7 +993,7 @@
}
int tbSize = (m_amc->GetDlTbSizeFromMcs (newDci.m_mcs.at (j), RgbPerRnti * rbgSize) / 8); // (size of TB in bytes according to table 7.1.7.2.1-1 of 36.213)
- newDci.m_tbsSize.push_back (tbSize);
+ newDci.m_tbsSize.push_back (static_cast<uint16_t> (tbSize));
bytesTxed += tbSize;
}
@@ -1345,12 +1345,12 @@
// Divide the remaining resources equally among the active users starting from the subsequent one served last scheduling trigger
- uint16_t rbPerFlow = (m_cschedCellConfig.m_ulBandwidth) / (nflows + rntiAllocated.size ());
+ uint16_t rbPerFlow = static_cast<uint16_t> ((m_cschedCellConfig.m_ulBandwidth / (nflows + rntiAllocated.size ())));
if (rbPerFlow < 3)
{
rbPerFlow = 3; // at least 3 rbg per flow (till available resource) to ensure TxOpportunity >= 7 bytes
}
- int rbAllocated = 0;
+ uint16_t rbAllocated = 0;
std::map <uint16_t, tdbetsFlowPerf_t>::iterator itStats;
if (m_nextRntiUl != 0)
@@ -1401,7 +1401,8 @@
UlDciListElement_s uldci;
uldci.m_rnti = (*it).first;
- uldci.m_rbLen = rbPerFlow;
+ uldci.m_rbLen = static_cast<uint8_t> (rbPerFlow);
+ uldci.m_rbStart = 0;
bool allocated = false;
NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - m_cschedCellConfig.m_ulBandwidth) < 1) && (rbPerFlow != 0))
@@ -1418,7 +1419,7 @@
}
if (free)
{
- uldci.m_rbStart = rbAllocated;
+ uldci.m_rbStart = static_cast<uint8_t> (rbAllocated);
for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++)
{
@@ -1601,6 +1602,7 @@
TdBetFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapProvider::SchedUlNoiseInterferenceReqParameters& params)
{
NS_LOG_FUNCTION (this);
+ NS_UNUSED (params);
return;
}
@@ -1608,6 +1610,7 @@
TdBetFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::SchedUlSrInfoReqParameters& params)
{
NS_LOG_FUNCTION (this);
+ NS_UNUSED (params);
return;
}

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b