This commit is contained in:
Marco Miozzo
2012-12-13 15:07:02 +01:00
5 changed files with 37 additions and 11 deletions

View File

@@ -46,7 +46,6 @@ int main (int argc, char *argv[])
cmd.Parse (argc, argv);
Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
lteHelper->EnableTraces ();
// Uncomment to enable logging
//lteHelper->EnableLogComponents ();
@@ -81,7 +80,9 @@ int main (int argc, char *argv[])
EpsBearer bearer (q);
lteHelper->ActivateDataRadioBearer (ueDevs, bearer);
Simulator::Stop (Seconds (0.100));
lteHelper->EnableTraces ();
Simulator::Stop (Seconds (1.05));
Simulator::Run ();

View File

@@ -894,7 +894,7 @@ LteEnbPhy::DoSetSrsConfigurationIndex (uint16_t rnti, uint16_t srcCi)
// inhibit SRS until RRC Connection Reconfiguration propagates
// to UEs, otherwise we might be wrong in determining the UE who
// actually sent the SRS (if the UE was using a stale SRS config)
m_srsStartTime = Simulator::Now () + MilliSeconds (m_macChTtiDelay) + MilliSeconds (3);
m_srsStartTime = Simulator::Now () + MilliSeconds (m_macChTtiDelay) + MilliSeconds (20);
}
NS_LOG_DEBUG (this << " ENB SRS P " << m_srsPeriodicity << " RNTI " << rnti << " offset " << GetSrsSubframeOffset (srcCi) << " CI " << srcCi);

View File

@@ -357,21 +357,36 @@ UeManager::SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gt
}
void
UeManager::StartDataRadioBearers ()
UeManager::RecordDataRadioBearersToBeStarted ()
{
NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
for (std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator it = m_drbMap.begin ();
it != m_drbMap.end ();
++it)
{
it->second->m_rlc->Start ();
if (it->second->m_pdcp)
{
it->second->m_pdcp->Start ();
}
m_drbsToBeStarted.push_back (it->first);
}
}
void
UeManager::StartDataRadioBearers ()
{
NS_LOG_FUNCTION (this << (uint32_t) m_rnti);
for (std::list <uint8_t>::iterator drbIdIt = m_drbsToBeStarted.begin ();
drbIdIt != m_drbsToBeStarted.end ();
++drbIdIt)
{
std::map <uint8_t, Ptr<LteDataRadioBearerInfo> >::iterator drbIt = m_drbMap.find (*drbIdIt);
NS_ASSERT (drbIt != m_drbMap.end ());
drbIt->second->m_rlc->Start ();
if (drbIt->second->m_pdcp)
{
drbIt->second->m_pdcp->Start ();
}
}
m_drbsToBeStarted.clear ();
}
void
UeManager::ReleaseDataRadioBearer (uint8_t drbid)
@@ -417,6 +432,7 @@ UeManager::ScheduleRrcConnectionReconfiguration ()
m_pendingRrcConnectionReconfiguration = false;
LteRrcSap::RrcConnectionReconfiguration msg = BuildRrcConnectionReconfiguration ();
m_rrc->m_rrcSapUser->SendRrcConnectionReconfiguration (m_rnti, msg);
RecordDataRadioBearersToBeStarted ();
SwitchToState (CONNECTION_RECONFIGURATION);
}
break;
@@ -648,6 +664,7 @@ UeManager::RecvRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg)
msg2.rrcTransactionIdentifier = GetNewRrcTransactionIdentifier ();
msg2.radioResourceConfigDedicated = BuildRadioResourceConfigDedicated ();
m_rrc->m_rrcSapUser->SendRrcConnectionSetup (m_rnti, msg2);
RecordDataRadioBearersToBeStarted ();
SwitchToState (CONNECTION_SETUP);
}
break;

View File

@@ -127,12 +127,19 @@ public:
*
*/
void SetupDataRadioBearer (EpsBearer bearer, uint8_t bearerId, uint32_t gtpTeid, Ipv4Address transportLayerAddress);
/**
* Start all configured data radio bearers. It is safe to call this
* method if any bearer had been already started previously.
*
*/
void RecordDataRadioBearersToBeStarted ();
/**
* Start the data radio bearers that have been previously recorded
* to be started using RecordDataRadioBearersToBeStarted()
*
*/
void StartDataRadioBearers ();
/**
@@ -380,6 +387,7 @@ private:
uint16_t m_sourceX2apId;
uint16_t m_sourceCellId;
uint16_t m_targetCellId;
std::list<uint8_t> m_drbsToBeStarted;
};

View File

@@ -899,7 +899,7 @@ LteUePhy::DoSetSrsConfigurationIndex (uint16_t srcCi)
// to make sure no UE sends SRSs before all UEs received the new SRS configuration.
// Note that the eNB will send the new SRS config to all UEs at the same time,
// but with the real RRC model the time it takes to reach each UE might vary.
m_srsStartTime = Simulator::Now () + MilliSeconds (3);
m_srsStartTime = Simulator::Now () + MilliSeconds (20);
NS_LOG_DEBUG (this << " UE SRS P " << m_srsPeriodicity << " RNTI " << m_rnti << " offset " << m_srsSubframeOffset << " cellId " << m_cellId << " CI " << srcCi);
}