LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 ·· | 174 ·· |
175 // setup default gateway for the remote hosts | 175 // setup default gateway for the remote hosts |
176 Ipv4StaticRoutingHelper ipv4RoutingHelper; | 176 Ipv4StaticRoutingHelper ipv4RoutingHelper; |
177 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); | 177 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); |
178 | 178 |
179 // hardcoded UE addresses for now | 179 // hardcoded UE addresses for now |
180 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.255.255.0"), 1); | 180 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.255.255.0"), 1); |
181 ·· | 181 ·· |
182 | 182 |
183 NodeContainer enbs; | 183 NodeContainer enbs; |
184 enbs.Create (m_enbTestData.size ()); | 184 enbs.Create (static_cast<uint32_t> (m_enbTestData.size ())); |
185 MobilityHelper enbMobility; | 185 MobilityHelper enbMobility; |
186 enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); | 186 enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); |
187 enbMobility.SetPositionAllocator ("ns3::GridPositionAllocator", | 187 enbMobility.SetPositionAllocator ("ns3::GridPositionAllocator", |
188 "MinX", DoubleValue (0.0), | 188 "MinX", DoubleValue (0.0), |
189 "MinY", DoubleValue (0.0), | 189 "MinY", DoubleValue (0.0), |
190 "DeltaX", DoubleValue (10000.0), | 190 "DeltaX", DoubleValue (10000.0), |
191 "DeltaY", DoubleValue (10000.0), | 191 "DeltaY", DoubleValue (10000.0), |
192 "GridWidth", UintegerValue (3), | 192 "GridWidth", UintegerValue (3), |
193 "LayoutType", StringValue ("RowFirst")); | 193 "LayoutType", StringValue ("RowFirst")); |
194 enbMobility.Install (enbs); | 194 enbMobility.Install (enbs); |
195 NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbs); | 195 NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbs); |
196 NetDeviceContainer::Iterator enbLteDevIt = enbLteDevs.Begin (); | 196 NetDeviceContainer::Iterator enbLteDevIt = enbLteDevs.Begin (); |
197 ·· | 197 ·· |
198 uint16_t ulPort = 1000; | 198 uint16_t ulPort = 1000; |
199 | 199 |
200 for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin (); | 200 for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin (); |
201 enbit < m_enbTestData.end (); | 201 enbit < m_enbTestData.end (); |
202 ++enbit, ++enbLteDevIt) | 202 ++enbit, ++enbLteDevIt) |
203 { | 203 { |
204 NS_ABORT_IF (enbLteDevIt == enbLteDevs.End ()); | 204 NS_ABORT_IF (enbLteDevIt == enbLteDevs.End ()); |
205 ······ | 205 ······ |
206 | 206 |
207 | 207 |
208 NodeContainer ues; | 208 NodeContainer ues; |
209 ues.Create (enbit->ues.size ()); | 209 ues.Create (static_cast<uint32_t> (enbit->ues.size ())); |
210 Vector enbPosition = (*enbLteDevIt)->GetNode ()->GetObject<MobilityModel>
()->GetPosition (); | 210 Vector enbPosition = (*enbLteDevIt)->GetNode ()->GetObject<MobilityModel>
()->GetPosition (); |
211 MobilityHelper ueMobility; | 211 MobilityHelper ueMobility; |
212 ueMobility.SetPositionAllocator ("ns3::UniformDiscPositionAllocator", | 212 ueMobility.SetPositionAllocator ("ns3::UniformDiscPositionAllocator", |
213 "X", DoubleValue (enbPosition.x), | 213 "X", DoubleValue (enbPosition.x), |
214 "Y", DoubleValue (enbPosition.y), | 214 "Y", DoubleValue (enbPosition.y), |
215 "rho", DoubleValue (100.0)); | 215 "rho", DoubleValue (100.0)); |
216 ueMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); | 216 ueMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); |
217 ueMobility.Install (ues); | 217 ueMobility.Install (ues); |
218 NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ues); | 218 NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ues); |
219 ······· | 219 ······· |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 { | 319 { |
320 for (std::vector<UeTestData>::iterator ueit = enbit->ues.begin (); | 320 for (std::vector<UeTestData>::iterator ueit = enbit->ues.begin (); |
321 ueit < enbit->ues.end (); | 321 ueit < enbit->ues.end (); |
322 ++ueit) | 322 ++ueit) |
323 {···················· | 323 {···················· |
324 uint64_t imsi = ++imsiCounter; | 324 uint64_t imsi = ++imsiCounter; |
325 for (uint32_t b = 0; b < ueit->bearers.size (); ++b) | 325 for (uint32_t b = 0; b < ueit->bearers.size (); ++b) |
326 { | 326 { |
327 // LCID 0, 1, 2 are for SRBs | 327 // LCID 0, 1, 2 are for SRBs |
328 // LCID 3 is (at the moment) the Default EPS bearer, and is unused
in this test program | 328 // LCID 3 is (at the moment) the Default EPS bearer, and is unused
in this test program |
329 uint8_t lcid = static_cast<uint8_t>(b+4); | 329 uint8_t lcid = static_cast<uint8_t> (b+4); |
330 uint32_t expectedPkts = ueit->bearers.at (b).numPkts; | 330 uint32_t expectedPkts = ueit->bearers.at (b).numPkts; |
331 uint32_t expectedBytes = (ueit->bearers.at (b).numPkts) * (ueit->b
earers.at (b).pktSize); | 331 uint32_t expectedBytes = (ueit->bearers.at (b).numPkts) * (ueit->b
earers.at (b).pktSize); |
332 uint32_t txPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlTxPackets
(imsi, lcid); | 332 uint32_t txPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlTxPackets
(imsi, lcid); |
333 uint32_t rxPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlRxPackets
(imsi, lcid); | 333 uint32_t rxPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlRxPackets
(imsi, lcid); |
334 uint32_t txPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlTxPackets
(imsi, lcid); | 334 uint32_t txPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlTxPackets
(imsi, lcid); |
335 uint32_t rxPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlRxPackets
(imsi, lcid); | 335 uint32_t rxPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlRxPackets
(imsi, lcid); |
336 uint32_t rxBytesDl = static_cast<uint32_t>(ueit->bearers.at (b).dl
ServerApp->GetTotalRx ()); | 336 uint32_t rxBytesDl = static_cast<uint32_t> (ueit->bearers.at (b).d
lServerApp->GetTotalRx ()); |
337 uint32_t rxBytesUl = static_cast<uint32_t>(ueit->bearers.at (b).ul
ServerApp->GetTotalRx ()); | 337 uint32_t rxBytesUl = static_cast<uint32_t> (ueit->bearers.at (b).u
lServerApp->GetTotalRx ()); |
338 ·············· | 338 ·············· |
339 ·············· | 339 ·············· |
340 NS_TEST_ASSERT_MSG_EQ (txPktsPdcpDl,· | 340 NS_TEST_ASSERT_MSG_EQ (txPktsPdcpDl,· |
341 expectedPkts,· | 341 expectedPkts,· |
342 "wrong TX PDCP packets in downlink for IMSI
=" << imsi << " LCID=" << (uint16_t) lcid); | 342 "wrong TX PDCP packets in downlink for IMSI
=" << imsi << " LCID=" << (uint16_t) lcid); |
343 ·············· | 343 ·············· |
344 NS_TEST_ASSERT_MSG_EQ (rxPktsPdcpDl,· | 344 NS_TEST_ASSERT_MSG_EQ (rxPktsPdcpDl,· |
345 expectedPkts,· | 345 expectedPkts,· |
346 "wrong RX PDCP packets in downlink for IMSI
=" << imsi << " LCID=" << (uint16_t) lcid); | 346 "wrong RX PDCP packets in downlink for IMSI
=" << imsi << " LCID=" << (uint16_t) lcid); |
347 NS_TEST_ASSERT_MSG_EQ (txPktsPdcpUl,· | 347 NS_TEST_ASSERT_MSG_EQ (txPktsPdcpUl,· |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 UeTestData u9; | 474 UeTestData u9; |
475 BearerTestData f9 (1000, 20, 0.0001); | 475 BearerTestData f9 (1000, 20, 0.0001); |
476 u9.bearers.push_back (f9); | 476 u9.bearers.push_back (f9); |
477 e9.ues.push_back (u9); | 477 e9.ues.push_back (u9); |
478 std::vector<EnbTestData> v9; | 478 std::vector<EnbTestData> v9; |
479 v9.push_back (e9); | 479 v9.push_back (e9); |
480 AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with aggregation", v9), Te
stCase::EXTENSIVE); | 480 AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with aggregation", v9), Te
stCase::EXTENSIVE); |
481 | 481 |
482 | 482 |
483 } | 483 } |
LEFT | RIGHT |