--- a/src/lte/model/lte-ue-rrc.cc Thu Nov 22 19:06:15 2012 +0100
+++ b/src/lte/model/lte-ue-rrc.cc Fri Nov 23 12:47:04 2012 +0100
@@ -762,9 +762,12 @@
rlc->SetRnti (m_rnti);
rlc->SetLcId (dtamIt->logicalChannelIdentity);
- Ptr<LteDataRadioBearerInfo> rbInfo = CreateObject<LteDataRadioBearerInfo> ();
- rbInfo->m_rlc = rlc;
-
+ Ptr<LteDataRadioBearerInfo> drbInfo = CreateObject<LteDataRadioBearerInfo> ();
+ drbInfo->m_rlc = rlc;
+ drbInfo->m_epsBearerIdentity = dtamIt->epsBearerIdentity;
+ drbInfo->m_logicalChannelIdentity = dtamIt->logicalChannelIdentity;
+ drbInfo->m_drbIdentity = dtamIt->drbIdentity;
+
// we need PDCP only for real RLC, i.e., RLC/UM or RLC/AM
// if we are using RLC/SM we don't care of anything above RLC
if (rlcTypeId != LteRlcSm::GetTypeId ())
@@ -775,12 +778,12 @@
pdcp->SetLtePdcpSapUser (m_pdcpSapUser);
pdcp->SetLteRlcSapProvider (rlc->GetLteRlcSapProvider ());
rlc->SetLteRlcSapUser (pdcp->GetLteRlcSapUser ());
- rbInfo->m_pdcp = pdcp;
+ drbInfo->m_pdcp = pdcp;
}
m_bid2DrbidMap[dtamIt->epsBearerIdentity] = dtamIt->drbIdentity;
- m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (dtamIt->drbIdentity, rbInfo));
+ m_drbMap.insert (std::pair<uint8_t, Ptr<LteDataRadioBearerInfo> > (dtamIt->drbIdentity, drbInfo));
struct LteUeCmacSapProvider::LogicalChannelConfig lcConfig;
@@ -795,9 +798,9 @@
}
else
{
- NS_LOG_INFO ("request to modify existing DRBID (skipping as currently not implemented)");
- Ptr<LteDataRadioBearerInfo> rbInfo = drbMapIt->second;
- // would need to modify rbInfo, and then propagate changes to the MAC
+ NS_LOG_INFO ("request to modify existing DRBID");
+ Ptr<LteDataRadioBearerInfo> drbInfo = drbMapIt->second;
+ // TODO: currently not implemented. Would need to modify drbInfo, and then propagate changes to the MAC
}
}
--- a/src/lte/test/test-lte-rrc.cc Thu Nov 22 19:06:15 2012 +0100
+++ b/src/lte/test/test-lte-rrc.cc Fri Nov 23 12:47:04 2012 +0100
@@ -153,6 +153,13 @@
LteRrcConnectionEstablishmentTestCase::Connect (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice)
{
m_lteHelper->Attach (ueDevice, enbDevice);
+
+ for (uint32_t b = 0; b < m_nBearers; ++b)
+ {
+ enum EpsBearer::Qci q = EpsBearer::NGBR_VIDEO_TCP_DEFAULT;
+ EpsBearer bearer (q);
+ m_lteHelper->ActivateDataRadioBearer (ueDevice, bearer);
+ }
}
void
LteRrcConnectionEstablishmentTestCase::CheckConnected (Ptr<NetDevice> ueDevice, Ptr<NetDevice> enbDevice)
@@ -190,6 +197,34 @@
NS_TEST_ASSERT_MSG_EQ (ueUlBandwidth, enbUlBandwidth, "inconsistent UlBandwidth");
NS_TEST_ASSERT_MSG_EQ (ueDlEarfcn, enbDlEarfcn, "inconsistent DlEarfcn");
NS_TEST_ASSERT_MSG_EQ (ueUlEarfcn, enbUlEarfcn, "inconsistent UlEarfcn");
+
+ ObjectMapValue enbDataRadioBearerMapValue;
+ ueManager->GetAttribute ("DataRadioBearerMap", enbDataRadioBearerMapValue);
+ NS_TEST_ASSERT_MSG_EQ (enbDataRadioBearerMapValue.GetN (), m_nBearers, "wrong num bearers at eNB");
+
+ ObjectMapValue ueDataRadioBearerMapValue;
+ ueRrc->GetAttribute ("DataRadioBearerMap", ueDataRadioBearerMapValue);
+ NS_TEST_ASSERT_MSG_EQ (ueDataRadioBearerMapValue.GetN (), m_nBearers, "wrong num bearers at UE");
+
+ ObjectMapValue::Iterator enbBearerIt = enbDataRadioBearerMapValue.Begin ();
+ ObjectMapValue::Iterator ueBearerIt = ueDataRadioBearerMapValue.Begin ();
+ while (enbBearerIt != enbDataRadioBearerMapValue.End () &&
+ ueBearerIt != ueDataRadioBearerMapValue.End ())
+ {
+ Ptr<LteDataRadioBearerInfo> enbDrbInfo = enbBearerIt->second->GetObject<LteDataRadioBearerInfo> ();
+ Ptr<LteDataRadioBearerInfo> ueDrbInfo = ueBearerIt->second->GetObject<LteDataRadioBearerInfo> ();
+ //NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_epsBearer, ueDrbInfo->m_epsBearer, "epsBearer differs");
+ NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_epsBearerIdentity, (uint32_t) ueDrbInfo->m_epsBearerIdentity, "epsBearerIdentity differs");
+ NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_drbIdentity, (uint32_t) ueDrbInfo->m_drbIdentity, "drbIdentity differs");
+ //NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_rlcConfig, ueDrbInfo->m_rlcConfig, "rlcConfig differs");
+ NS_TEST_ASSERT_MSG_EQ ((uint32_t) enbDrbInfo->m_logicalChannelIdentity, (uint32_t) ueDrbInfo->m_logicalChannelIdentity, "logicalChannelIdentity differs");
+ //NS_TEST_ASSERT_MSG_EQ (enbDrbInfo->m_logicalChannelConfig, ueDrbInfo->m_logicalChannelConfig, "logicalChannelConfig differs");
+
+ ++enbBearerIt;
+ ++ueBearerIt;
+ }
+ NS_ASSERT_MSG (enbBearerIt == enbDataRadioBearerMapValue.End (), "too many bearers at eNB");
+ NS_ASSERT_MSG (ueBearerIt == ueDataRadioBearerMapValue.End (), "too many bearers at UE");
}