This commit is contained in:
Nicola Baldo
2012-01-26 14:50:32 +01:00
7 changed files with 34 additions and 18 deletions

View File

@@ -278,6 +278,11 @@ public:
*/
Ptr<RadioBearerStatsCalculator> GetPdcpStats (void);
enum LteEpsBearerToRlcMapping_t {RLC_SM_ALWAYS = 1,
RLC_UM_ALWAYS = 2,
RLC_AM_ALWAYS = 3,
PER_BASED = 4};
protected:
// inherited from Object
virtual void DoStart (void);
@@ -310,10 +315,7 @@ private:
Ptr<RadioBearerStatsCalculator> m_rlcStats;
Ptr<RadioBearerStatsCalculator> m_pdcpStats;
enum LteEpsBearerToRlcMapping_t {RLC_SM_ALWAYS = 1,
RLC_UM_ALWAYS = 2,
RLC_AM_ALWAYS = 3,
PER_BASED = 4} m_epsBearerToRlcMapping;
enum LteEpsBearerToRlcMapping_t m_epsBearerToRlcMapping;
Ptr<EpcHelper> m_epcHelper;

View File

@@ -195,6 +195,7 @@ void
EpcSgwPgwApplication::SendToTunDevice (Ptr<Packet> packet, uint32_t teid)
{
NS_LOG_FUNCTION (this << packet << teid);
NS_LOG_LOGIC (" packet size: " << packet->GetSize () << " bytes");
m_tunDevice->Receive (packet, 0x0800, m_tunDevice->GetAddress (), m_tunDevice->GetAddress (), NetDevice::PACKET_HOST);
}

View File

@@ -247,6 +247,7 @@ int
LteAmc::GetMcsFromCqi (int cqi)
{
NS_LOG_FUNCTION (cqi);
NS_ASSERT_MSG (cqi >= 0 && cqi <= 15, "CQI must be in [0..15] = " << cqi);
double spectralEfficiency = SpectralEfficiencyForCqi[cqi];
int mcs = 0;
while ((mcs < 28) && (SpectralEfficiencyForMcs[mcs + 1] <= spectralEfficiency))
@@ -273,6 +274,7 @@ LteAmc::GetTbSizeFromMcs (int mcs, int nprb)
double
LteAmc::GetSpectralEfficiencyFromCqi (int cqi)
{
NS_ASSERT_MSG (cqi >= 0 && cqi <= 15, "CQI must be in [0..15] = " << cqi);
NS_LOG_FUNCTION (cqi << SpectralEfficiencyForCqi[cqi]);
return SpectralEfficiencyForCqi[cqi];
}

View File

@@ -229,9 +229,9 @@ LteRlcUm::DoNotifyTxOpportunity (uint32_t bytes)
// (NO more segments) → exit
// break;
}
else if ( (firstSegment->GetSize () == nextSegmentSize) || (m_txBuffer.size () == 0) )
else if ( (nextSegmentSize - firstSegment->GetSize () <= 2) || (m_txBuffer.size () == 0) )
{
NS_LOG_LOGIC (" IF firstSegment == NextSegmentSize || txBuffer.size == 0");
NS_LOG_LOGIC (" IF nextSegmentSize - firstSegment->GetSize () <= 2 || txBuffer.size == 0");
// Add txBuffer.FirstBuffer to DataField
dataFieldAddedSize = firstSegment->GetSize ();
dataFieldTotalSize += dataFieldAddedSize;
@@ -254,7 +254,7 @@ LteRlcUm::DoNotifyTxOpportunity (uint32_t bytes)
}
NS_LOG_LOGIC (" Next segment size = " << nextSegmentSize);
// nextSegmentSize MUST be zero (only if txBuffer is not empty)
// nextSegmentSize <= 2 (only if txBuffer is not empty)
// (NO more segments) → exit
// break;
@@ -273,7 +273,7 @@ LteRlcUm::DoNotifyTxOpportunity (uint32_t bytes)
// LengthIndicator (Next_Segment) = txBuffer.FirstBuffer.length()
rlcHeader.PushLengthIndicator (firstSegment->GetSize ());
nextSegmentSize -= ((nextSegmentId % 2) ? (2) : (1)) + dataFieldAddedSize; // TODO???
nextSegmentSize -= ((nextSegmentId % 2) ? (2) : (1)) + dataFieldAddedSize;
nextSegmentId++;
NS_LOG_LOGIC (" SDUs in TxBuffer = " << m_txBuffer.size ());

View File

@@ -242,6 +242,7 @@ LteUeRrc::Send (Ptr<Packet> packet)
}
else
{
NS_LOG_LOGIC (this << " RNTI=" << m_rnti << " sending " << packet << "on LCID " << (uint32_t) lcid << " (" << packet->GetSize () << " bytes)");
it->second->m_pdcp->GetLtePdcpSapProvider ()->TransmitRrcPdu (params);
return true;
}

View File

@@ -1060,13 +1060,15 @@ PfFfMacScheduler::RefreshDlCqiMaps(void)
NS_ASSERT_MSG (itMap != m_p10CqiRxed.end (), " Does not find CQI report for user " << (*itP10).first);
NS_LOG_INFO (this << " P10-CQI exired for user " << (*itP10).first);
m_p10CqiRxed.erase (itMap);
m_p10CqiTimers.erase (itP10);
std::map <uint16_t,uint32_t>::iterator temp = itP10;
itP10++;
m_p10CqiTimers.erase (temp);
}
else
{
(*itP10).second--;
itP10++;
}
itP10++;
}
// refresh DL CQI A30 Map
@@ -1081,13 +1083,15 @@ PfFfMacScheduler::RefreshDlCqiMaps(void)
NS_ASSERT_MSG (itMap != m_a30CqiRxed.end (), " Does not find CQI report for user " << (*itA30).first);
NS_LOG_INFO (this << " A30-CQI exired for user " << (*itA30).first);
m_a30CqiRxed.erase (itMap);
m_a30CqiTimers.erase (itA30);
std::map <uint16_t,uint32_t>::iterator temp = itA30;
itA30++;
m_a30CqiTimers.erase (temp);
}
else
{
(*itA30).second--;
itA30++;
}
itA30++;
}
return;
@@ -1110,13 +1114,15 @@ PfFfMacScheduler::RefreshUlCqiMaps(void)
NS_LOG_INFO (this << " UL-CQI exired for user " << (*itUl).first);
(*itMap).second.clear ();
m_ueCqi.erase (itMap);
m_ueCqiTimers.erase (itUl);
std::map <uint16_t,uint32_t>::iterator temp = itUl;
itUl++;
m_ueCqiTimers.erase (temp);
}
else
{
(*itUl).second--;
itUl++;
}
itUl++;
}
return;

View File

@@ -915,13 +915,15 @@ RrFfMacScheduler::RefreshDlCqiMaps(void)
NS_ASSERT_MSG (itMap != m_p10CqiRxed.end (), " Does not find CQI report for user " << (*itP10).first);
NS_LOG_INFO (this << " P10-CQI exired for user " << (*itP10).first);
m_p10CqiRxed.erase (itMap);
m_p10CqiTimers.erase (itP10);
std::map <uint16_t,uint32_t>::iterator temp = itP10;
itP10++;
m_p10CqiTimers.erase (temp);
}
else
{
(*itP10).second--;
itP10++;
}
itP10++;
}
return;
@@ -944,13 +946,15 @@ RrFfMacScheduler::RefreshUlCqiMaps(void)
NS_LOG_INFO (this << " UL-CQI exired for user " << (*itUl).first);
(*itMap).second.clear ();
m_ueCqi.erase (itMap);
m_ueCqiTimers.erase (itUl);
std::map <uint16_t,uint32_t>::iterator temp = itUl;
itUl++;
m_ueCqiTimers.erase (temp);
}
else
{
(*itUl).second--;
itUl++;
}
itUl++;
}
return;