Index: src/lte/model/lte-ue-phy.cc |
=================================================================== |
--- a/src/lte/model/lte-ue-phy.cc |
+++ b/src/lte/model/lte-ue-phy.cc |
@@ -55,13 +55,13 @@ |
* events. The duration of one symbol is TTI/14 (rounded). In other words, |
* duration of data portion of UL subframe = 1 ms * (13/14) - 1 ns. |
*/ |
-static const Time UL_DATA_DURATION = NanoSeconds (1e6 - 71429 - 1); |
+static const Time UL_DATA_DURATION = NanoSeconds (1000000 - 71429 - 1); |
/** |
* Delay from subframe start to transmission of SRS. |
* Equals to "TTI length - 1 symbol for SRS". |
*/ |
-static const Time UL_SRS_DELAY_FROM_SUBFRAME_START = NanoSeconds (1e6 - 71429); |
+static const Time UL_SRS_DELAY_FROM_SUBFRAME_START = NanoSeconds (1000000 - 71429); |
@@ -468,6 +468,9 @@ |
{ |
NS_LOG_FUNCTION (this); |
LteSpectrumValueHelper psdHelper; |
+ //cast found to void, to suppress 'psdHelper' set but not used |
+ //compiler warning |
+ (void)psdHelper; |
Ptr<SpectrumValue> psd = psdHelper.CreateTxPowerSpectralDensity (m_ulEarfcn, m_ulBandwidth, m_txPower, GetSubChannelsForTransmission ()); |
return psd; |
@@ -608,12 +611,14 @@ |
LteUePhy::GenerateDataCqiReport (const SpectrumValue& sinr) |
{ |
// Not used by UE, CQI are based only on RS |
+ NS_UNUSED(sinr); |
} |
void |
LteUePhy::GenerateMixedCqiReport (const SpectrumValue& sinr) |
{ |
NS_LOG_FUNCTION (this); |
+ NS_UNUSED(sinr); |
NS_ASSERT (m_state != CELL_SEARCH); |
NS_ASSERT (m_cellId > 0); |
@@ -720,7 +725,7 @@ |
cqi = m_amc->CreateCqiFeedbacks (newSinr, m_dlBandwidth); |
int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode); |
- int nbSubChannels = cqi.size (); |
+ int nbSubChannels = static_cast<int>(cqi.size ()); |
double cqiSum = 0.0; |
int activeSubChannels = 0; |
// average the CQIs of the different RBs |
@@ -742,7 +747,7 @@ |
{ |
if (activeSubChannels > 0) |
{ |
- dlcqi.m_wbCqi.push_back ((uint16_t) cqiSum / activeSubChannels); |
+ dlcqi.m_wbCqi.push_back ((uint8_t) (cqiSum / activeSubChannels)); |
} |
else |
{ |
@@ -758,7 +763,7 @@ |
{ |
cqi = m_amc->CreateCqiFeedbacks (newSinr, GetRbgSize ()); |
int nLayer = TransmissionModesLayers::TxMode2LayerNum (m_transmissionMode); |
- int nbSubChannels = cqi.size (); |
+ int nbSubChannels = static_cast<int>(cqi.size ()); |
int rbgSize = GetRbgSize (); |
double cqiSum = 0.0; |
int cqiNum = 0; |
@@ -778,9 +783,9 @@ |
//NS_LOG_DEBUG (this << " RBG CQI " << (uint16_t) cqiSum / rbgSize); |
HigherLayerSelected_s hlCqi; |
hlCqi.m_sbPmi = 0; // not yet used |
- for (int i = 0; i < nLayer; i++) |
+ for (int j = 0; j < nLayer; j++) |
{ |
- hlCqi.m_sbCqi.push_back ((uint16_t) cqiSum / rbgSize); |
+ hlCqi.m_sbCqi.push_back ((uint8_t) (cqiSum / rbgSize)); |
} |
rbgMeas.m_higherLayerSelected.push_back (hlCqi); |
cqiSum = 0.0; |
@@ -954,7 +959,7 @@ |
params.m_layer = 0; |
params.m_mcs = dci.m_mcs; |
params.m_size = dci.m_tbSize; |
- params.m_rv = harqInfoList.size (); |
+ params.m_rv = static_cast<uint8_t>(harqInfoList.size ()); |
params.m_ndi = dci.m_ndi; |
params.m_ccId = m_componentCarrierId; |
m_ulPhyTransmission (params); |
@@ -966,9 +971,9 @@ |
Ptr<RarLteControlMessage> rarMsg = DynamicCast<RarLteControlMessage> (msg); |
if (rarMsg->GetRaRnti () == m_raRnti) |
{ |
- for (std::list<RarLteControlMessage::Rar>::const_iterator it = rarMsg->RarListBegin (); it != rarMsg->RarListEnd (); ++it) |
+ for (std::list<RarLteControlMessage::Rar>::const_iterator rit = rarMsg->RarListBegin (); rit != rarMsg->RarListEnd (); ++rit) |
{ |
- if (it->rapId != m_raPreambleId) |
+ if (rit->rapId != m_raPreambleId) |
{ |
// UL grant not for me |
continue; |
@@ -978,9 +983,9 @@ |
NS_LOG_INFO ("received RAR RNTI " << m_raRnti); |
// set the uplink bandwidht according to the UL grant |
std::vector <int> ulRb; |
- for (int i = 0; i < it->rarPayload.m_grant.m_rbLen; i++) |
+ for (int i = 0; i < rit->rarPayload.m_grant.m_rbLen; i++) |
{ |
- ulRb.push_back (i + it->rarPayload.m_grant.m_rbStart); |
+ ulRb.push_back (i + rit->rarPayload.m_grant.m_rbStart); |
} |
QueueSubChannelsForTransmission (ulRb); |
@@ -1015,7 +1020,6 @@ |
} |
- |
} |
@@ -1158,7 +1162,7 @@ |
// trigger the MAC |
m_uePhySapUser->SubframeIndication (frameNo, subframeNo); |
- m_subframeNo = subframeNo; |
+ m_subframeNo = static_cast<uint8_t>(subframeNo); |
++subframeNo; |
if (subframeNo > 10) |
{ |
@@ -1274,7 +1278,7 @@ |
LteUePhy::DoSetDlBandwidth (uint8_t dlBandwidth) |
{ |
NS_LOG_FUNCTION (this << (uint32_t) dlBandwidth); |
- if (m_dlBandwidth != dlBandwidth or !m_dlConfigured) |
+ if (m_dlBandwidth != dlBandwidth || !m_dlConfigured) |
{ |
m_dlBandwidth = dlBandwidth; |
@@ -1284,7 +1288,7 @@ |
63, // RGB size 3 |
110 // RGB size 4 |
}; // see table 7.1.6.1-1 of 36.213 |
- for (int i = 0; i < 4; i++) |
+ for (uint8_t i = 0; i < 4; i++) |
{ |
if (dlBandwidth < Type0AllocationRbg[i]) |
{ |
@@ -1352,7 +1356,7 @@ |
LteUePhy::DoSetPa (double pa) |
{ |
NS_LOG_FUNCTION (this << pa); |
- m_paLinear = pow (10,(pa/10)); |
+ m_paLinear = static_cast<double>(pow (10,(pa/10))); |
} |
void |