OLD | NEW |
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) 2007,2008,2009 INRIA, UDCAST | 3 * Copyright (c) 2007,2008,2009 INRIA, UDCAST |
4 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 4 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 | 371 |
372 // hardcoded UE addresses for now | 372 // hardcoded UE addresses for now |
373 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.255.255.0"), 1); | 373 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.255.255.0"), 1); |
374 ·· | 374 ·· |
375 | 375 |
376 | 376 |
377 uint16_t udpSinkPort = 1234; | 377 uint16_t udpSinkPort = 1234; |
378 ···· | 378 ···· |
379 NodeContainer enbs; | 379 NodeContainer enbs; |
380 uint16_t cellIdCounter = 0; | 380 uint16_t cellIdCounter = 0; |
| 381 uint64_t imsiCounter = 0; |
381 | 382 |
382 for (std::vector<EnbUlTestData>::iterator enbit = m_enbUlTestData.begin (); | 383 for (std::vector<EnbUlTestData>::iterator enbit = m_enbUlTestData.begin (); |
383 enbit < m_enbUlTestData.end (); | 384 enbit < m_enbUlTestData.end (); |
384 ++enbit) | 385 ++enbit) |
385 { | 386 { |
386 Ptr<Node> enb = CreateObject<Node> (); | 387 Ptr<Node> enb = CreateObject<Node> (); |
387 enbs.Add (enb);······ | 388 enbs.Add (enb);······ |
388 | 389 |
389 // we test EPC without LTE, hence we use: | 390 // we test EPC without LTE, hence we use: |
390 // 1) a CSMA network to simulate the cell | 391 // 1) a CSMA network to simulate the cell |
(...skipping 14 matching lines...) Expand all Loading... |
405 // the eNB's CSMA NetDevice acting as an LTE NetDevice.· | 406 // the eNB's CSMA NetDevice acting as an LTE NetDevice.· |
406 Ptr<NetDevice> enbDevice = cellDevices.Get (cellDevices.GetN () - 1); | 407 Ptr<NetDevice> enbDevice = cellDevices.Get (cellDevices.GetN () - 1); |
407 | 408 |
408 // Note that the EpcEnbApplication won't care of the actual NetDevice type | 409 // Note that the EpcEnbApplication won't care of the actual NetDevice type |
409 epcHelper->AddEnb (enb, enbDevice, cellId);······ | 410 epcHelper->AddEnb (enb, enbDevice, cellId);······ |
410 ······ | 411 ······ |
411 // Plug test RRC entity | 412 // Plug test RRC entity |
412 Ptr<EpcEnbApplication> enbApp = enb->GetApplication (0)->GetObject<EpcEnbA
pplication> (); | 413 Ptr<EpcEnbApplication> enbApp = enb->GetApplication (0)->GetObject<EpcEnbA
pplication> (); |
413 NS_ASSERT_MSG (enbApp != 0, "cannot retrieve EpcEnbApplication"); | 414 NS_ASSERT_MSG (enbApp != 0, "cannot retrieve EpcEnbApplication"); |
414 Ptr<EpcTestRrc> rrc = CreateObject<EpcTestRrc> (); | 415 Ptr<EpcTestRrc> rrc = CreateObject<EpcTestRrc> (); |
| 416 enb->AggregateObject (rrc); |
415 rrc->SetS1SapProvider (enbApp->GetS1SapProvider ()); | 417 rrc->SetS1SapProvider (enbApp->GetS1SapProvider ()); |
416 enbApp->SetS1SapUser (rrc->GetS1SapUser ()); | 418 enbApp->SetS1SapUser (rrc->GetS1SapUser ()); |
417 ······ | 419 ······ |
418 // we install the IP stack on UEs only | 420 // we install the IP stack on UEs only |
419 InternetStackHelper internet; | 421 InternetStackHelper internet; |
420 internet.Install (ues); | 422 internet.Install (ues); |
421 | 423 |
422 // assign IP address to UEs, and install applications | 424 // assign IP address to UEs, and install applications |
423 for (uint32_t u = 0; u < ues.GetN (); ++u) | 425 for (uint32_t u = 0; u < ues.GetN (); ++u) |
424 { | 426 { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 client->SetAttribute ("MaxPackets", UintegerValue (enbit->ues[u].numPk
ts)); | 470 client->SetAttribute ("MaxPackets", UintegerValue (enbit->ues[u].numPk
ts)); |
469 client->SetAttribute ("Interval", TimeValue (interPacketInterval)); | 471 client->SetAttribute ("Interval", TimeValue (interPacketInterval)); |
470 client->SetAttribute ("PacketSize", UintegerValue (enbit->ues[u].pktSi
ze)); | 472 client->SetAttribute ("PacketSize", UintegerValue (enbit->ues[u].pktSi
ze)); |
471 ue->AddApplication (client); | 473 ue->AddApplication (client); |
472 ApplicationContainer clientApp; | 474 ApplicationContainer clientApp; |
473 clientApp.Add (client); | 475 clientApp.Add (client); |
474 clientApp.Start (Seconds (2.0)); | 476 clientApp.Start (Seconds (2.0)); |
475 clientApp.Stop (Seconds (10.0));··· | 477 clientApp.Stop (Seconds (10.0));··· |
476 enbit->ues[u].clientApp = client; | 478 enbit->ues[u].clientApp = client; |
477 | 479 |
478 uint64_t imsi = u+1; | 480 uint64_t imsi = ++imsiCounter; |
479 epcHelper->AddUe (ueLteDevice, imsi); | 481 epcHelper->AddUe (ueLteDevice, imsi); |
480 epcHelper->ActivateEpsBearer (ueLteDevice, imsi, EpcTft::Default (), E
psBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT)); | 482 epcHelper->ActivateEpsBearer (ueLteDevice, imsi, EpcTft::Default (), E
psBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT)); |
481 enbApp->GetS1SapProvider ()->InitialUeMessage (imsi, (uint16_t) imsi); | 483 Simulator::Schedule (MilliSeconds (10), |
482 ·········· | 484 &EpcEnbS1SapProvider::InitialUeMessage, |
| 485 enbApp->GetS1SapProvider (), imsi, enbit->ues[u].
rnti); |
483 // need this since all sinks are installed in the same node | 486 // need this since all sinks are installed in the same node |
484 ++udpSinkPort;· | 487 ++udpSinkPort;· |
485 }· | 488 }· |
486 ············ | 489 ············ |
487 }· | 490 }· |
488 ·· | 491 ·· |
489 Simulator::Run (); | 492 Simulator::Run (); |
490 | 493 |
491 for (std::vector<EnbUlTestData>::iterator enbit = m_enbUlTestData.begin (); | 494 for (std::vector<EnbUlTestData>::iterator enbit = m_enbUlTestData.begin (); |
492 enbit < m_enbUlTestData.end (); | 495 enbit < m_enbUlTestData.end (); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 AddTestCase (new EpcS1uUlTestCase ("1 eNB, 10 pkts 15000 bytes each", v7), Tes
tCase::QUICK); | 582 AddTestCase (new EpcS1uUlTestCase ("1 eNB, 10 pkts 15000 bytes each", v7), Tes
tCase::QUICK); |
580 | 583 |
581 std::vector<EnbUlTestData> v8;·· | 584 std::vector<EnbUlTestData> v8;·· |
582 EnbUlTestData e8; | 585 EnbUlTestData e8; |
583 UeUlTestData f8 (100, 15000, 1, 1); | 586 UeUlTestData f8 (100, 15000, 1, 1); |
584 e8.ues.push_back (f8); | 587 e8.ues.push_back (f8); |
585 v8.push_back (e8); | 588 v8.push_back (e8); |
586 AddTestCase (new EpcS1uUlTestCase ("1 eNB, 100 pkts 15000 bytes each", v8), Te
stCase::QUICK); | 589 AddTestCase (new EpcS1uUlTestCase ("1 eNB, 100 pkts 15000 bytes each", v8), Te
stCase::QUICK); |
587 ·· | 590 ·· |
588 } | 591 } |
OLD | NEW |