LEFT | RIGHT |
(no file at all) | |
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanV
alue (false)); | 271 Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanV
alue (false)); |
272 Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanV
alue (false)); | 272 Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanV
alue (false)); |
273 } | 273 } |
274 | 274 |
275 Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true)); | 275 Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true)); |
276 | 276 |
277 Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); | 277 Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); |
278 Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ()
; | 278 Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ()
; |
279 lteHelper->SetEpcHelper (epcHelper); | 279 lteHelper->SetEpcHelper (epcHelper); |
280 | 280 |
281 //LogComponentEnable ("CqaFfMacScheduler", LOG_DEBUG); | 281 #if 0 |
| 282 LogComponentEnable ("CqaFfMacScheduler", LOG_DEBUG); |
| 283 #endif |
282 | 284 |
283 Ptr<Node> pgw = epcHelper->GetPgwNode (); | 285 Ptr<Node> pgw = epcHelper->GetPgwNode (); |
284 | 286 |
285 // Create a single RemoteHost | 287 // Create a single RemoteHost |
286 NodeContainer remoteHostContainer; | 288 NodeContainer remoteHostContainer; |
287 remoteHostContainer.Create (1); | 289 remoteHostContainer.Create (1); |
288 Ptr<Node> remoteHost = remoteHostContainer.Get (0); | 290 Ptr<Node> remoteHost = remoteHostContainer.Get (0); |
289 InternetStackHelper internet; | 291 InternetStackHelper internet; |
290 internet.Install (remoteHostContainer); | 292 internet.Install (remoteHostContainer); |
291 | 293 |
(...skipping 13 matching lines...) Expand all Loading... |
305 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); | 307 Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRo
uting (remoteHost->GetObject<Ipv4> ()); |
306 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.0.0.0"), 1); | 308 remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask
("255.0.0.0"), 1); |
307 | 309 |
308 //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010))
; | 310 //Config::SetDefault ("ns3::LteAmc::AmcModel", EnumValue (LteAmc::PiroEW2010))
; |
309 //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005)); | 311 //Config::SetDefault ("ns3::LteAmc::Ber", DoubleValue (0.00005)); |
310 //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanVal
ue (false)); | 312 //Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanVal
ue (false)); |
311 //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanVal
ue (false)); | 313 //Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanVal
ue (false)); |
312 | 314 |
313 //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteH
elper::RLC_UM_ALWAYS)); | 315 //Config::SetDefault ("ns3::LteEnbRrc::EpsBearerToRlcMapping", EnumValue (LteH
elper::RLC_UM_ALWAYS)); |
314 | 316 |
315 // LogComponentDisableAll (LOG_LEVEL_ALL); | 317 #if 0 |
316 //LogComponentEnable ("LenaTestCqaFfMacScheduler", LOG_LEVEL_ALL); | 318 LogComponentDisableAll (LOG_LEVEL_ALL); |
317 | 319 LogComponentEnable ("LenaTestCqaFfMacScheduler", LOG_LEVEL_ALL); |
| 320 #endif |
| 321 |
318 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); | 322 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); |
319 | 323 |
320 // Create Nodes: eNodeB and UE | 324 // Create Nodes: eNodeB and UE |
321 NodeContainer enbNodes; | 325 NodeContainer enbNodes; |
322 NodeContainer ueNodes; | 326 NodeContainer ueNodes; |
323 enbNodes.Create (1); | 327 enbNodes.Create (1); |
324 ueNodes.Create (m_nUser); | 328 ueNodes.Create (m_nUser); |
325 | 329 |
326 // Install Mobility Model | 330 // Install Mobility Model |
327 MobilityHelper mobility; | 331 MobilityHelper mobility; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 } | 477 } |
474 | 478 |
475 | 479 |
476 | 480 |
477 // --------------- T E S T - C A S E # 2 ------------------------------ | 481 // --------------- T E S T - C A S E # 2 ------------------------------ |
478 | 482 |
479 | 483 |
480 std::string· | 484 std::string· |
481 LenaCqaFfMacSchedulerTestCase2::BuildNameString (uint16_t nUser, std::vector<dou
ble> dist) | 485 LenaCqaFfMacSchedulerTestCase2::BuildNameString (uint16_t nUser, std::vector<dou
ble> dist) |
482 { | 486 { |
| 487 NS_UNUSED(nUser); |
483 std::ostringstream oss; | 488 std::ostringstream oss; |
484 oss << "distances (m) = [ " ; | 489 oss << "distances (m) = [ " ; |
485 for (std::vector<double>::iterator it = dist.begin (); it != dist.end (); ++it
) | 490 for (std::vector<double>::iterator it = dist.begin (); it != dist.end (); ++it
) |
486 { | 491 { |
487 oss << *it << " "; | 492 oss << *it << " "; |
488 } | 493 } |
489 oss << "]"; | 494 oss << "]"; |
490 return oss.str (); | 495 return oss.str (); |
491 } | 496 } |
492 | 497 |
493 | 498 |
494 LenaCqaFfMacSchedulerTestCase2::LenaCqaFfMacSchedulerTestCase2 (std::vector<doub
le> dist, std::vector<uint32_t> estThrCqaDl, std::vector<uint16_t> packetSize, u
int16_t interval,bool errorModelEnabled) | 499 LenaCqaFfMacSchedulerTestCase2::LenaCqaFfMacSchedulerTestCase2 (std::vector<doub
le> dist, std::vector<uint32_t> estThrCqaDl, std::vector<uint16_t> packetSize, u
int16_t interval,bool errorModelEnabled) |
495 : TestCase (BuildNameString (dist.size (), dist)), | 500 : TestCase (BuildNameString (static_cast<uint16_t>(dist.size ()), dist)), |
496 m_nUser (dist.size ()), | 501 m_nUser (static_cast<uint16_t>(dist.size ())), |
497 m_dist (dist), | 502 m_dist (dist), |
498 m_packetSize (packetSize), | 503 m_packetSize (packetSize), |
499 m_interval (interval), | 504 m_interval (interval), |
500 m_estThrCqaDl (estThrCqaDl), | 505 m_estThrCqaDl (estThrCqaDl), |
501 m_errorModelEnabled (errorModelEnabled) | 506 m_errorModelEnabled (errorModelEnabled) |
502 { | 507 { |
503 } | 508 } |
504 | 509 |
505 LenaCqaFfMacSchedulerTestCase2::~LenaCqaFfMacSchedulerTestCase2 () | 510 LenaCqaFfMacSchedulerTestCase2::~LenaCqaFfMacSchedulerTestCase2 () |
506 { | 511 { |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 } | 692 } |
688 | 693 |
689 for (int i = 0; i < m_nUser; i++) | 694 for (int i = 0; i < m_nUser; i++) |
690 { | 695 { |
691 NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_es
tThrCqaDl.at (i), m_estThrCqaDl.at (i) * tolerance, " Unfair Throughput!"); | 696 NS_TEST_ASSERT_MSG_EQ_TOL ((double)dlDataRxed.at (i) / statsDuration, m_es
tThrCqaDl.at (i), m_estThrCqaDl.at (i) * tolerance, " Unfair Throughput!"); |
692 } | 697 } |
693 | 698 |
694 Simulator::Destroy (); | 699 Simulator::Destroy (); |
695 | 700 |
696 } | 701 } |
LEFT | RIGHT |