22 #include <ns3/core-module.h>
23 #include <ns3/network-module.h>
24 #include <ns3/mobility-module.h>
25 #include <ns3/lte-module.h>
44 LteRrcConnectionEstablishmentTestCase (uint32_t nUes, uint32_t nBearers, uint32_t tc, uint32_t tConnIncrPerUe, uint32_t delayDiscStart,
bool useIdealRrc,
bool admitRrcConnectionRequest);
47 static std::string
BuildNameString (uint32_t nUes, uint32_t nBearers, uint32_t tc, uint32_t tConnIncrPerUe, uint32_t delayDiscStart,
bool useIdealRrc,
bool admitRrcConnectionRequest);
48 virtual void DoRun (
void);
69 std::ostringstream oss;
70 oss <<
"nUes=" << nUes
71 <<
", nBearers=" << nBearers
72 <<
", tConnBase=" << tConnBase
73 <<
", tConnIncrPerUe=" << tConnIncrPerUe
74 <<
", delayDiscStart=" << delayDiscStart;
83 if (admitRrcConnectionRequest)
85 oss <<
", admitRrcConnectionRequest = true";
89 oss <<
", admitRrcConnectionRequest = false";
95 :
TestCase (BuildNameString (nUes, nBearers, tConnBase, tConnIncrPerUe, delayDiscStart, useIdealRrc, admitRrcConnectionRequest)),
97 m_nBearers (nBearers),
98 m_tConnBase (tConnBase),
99 m_tConnIncrPerUe (tConnIncrPerUe),
101 m_delayDiscStart (delayDiscStart),
103 m_useIdealRrc (useIdealRrc),
104 m_admitRrcConnectionRequest (admitRrcConnectionRequest)
108 double nRaAttempts = 0;
118 nRaAttempts += std::ceil (nUes / 4.0);
119 double dra = nRaAttempts * 7;
120 double dce = 10.0 + (2.0 * nUes) / 4.0;
142 double dcr = (10.0 + (2.0 * nUes) / 4.0) * (
m_nBearers + nCrs);
197 it != enbDevs.
End ();
217 tmax = std::max (tmax, tcd);
268 uint16_t rnti = ueRrc->GetRnti ();
274 uint16_t ueCellId = ueRrc->GetCellId ();
275 uint16_t enbCellId = enbLteDevice->GetCellId ();
276 uint16_t ueImsi = ueLteDevice->GetImsi ();
277 uint16_t enbImsi = ueManager->
GetImsi ();
278 uint8_t ueDlBandwidth = ueRrc->GetDlBandwidth ();
279 uint8_t enbDlBandwidth = enbLteDevice->GetDlBandwidth ();
280 uint8_t ueUlBandwidth = ueRrc->GetUlBandwidth ();
281 uint8_t enbUlBandwidth = enbLteDevice->GetUlBandwidth ();
282 uint8_t ueDlEarfcn = ueRrc->GetDlEarfcn ();
283 uint8_t enbDlEarfcn = enbLteDevice->GetDlEarfcn ();
284 uint8_t ueUlEarfcn = ueRrc->GetUlEarfcn ();
285 uint8_t enbUlEarfcn = enbLteDevice->GetUlEarfcn ();
296 ueManager->
GetAttribute (
"DataRadioBearerMap", enbDataRadioBearerMapValue);
300 ueRrc->GetAttribute (
"DataRadioBearerMap", ueDataRadioBearerMapValue);
305 while (enbBearerIt != enbDataRadioBearerMapValue.
End ()
306 && ueBearerIt != ueDataRadioBearerMapValue.End ())
320 NS_ASSERT_MSG (enbBearerIt == enbDataRadioBearerMapValue.
End (),
"too many bearers at eNB");
321 NS_ASSERT_MSG (ueBearerIt == ueDataRadioBearerMapValue.End (),
"too many bearers at UE");
339 for (uint32_t useIdealRrc = 0; useIdealRrc <= 1; ++useIdealRrc)