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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 } | 335 } |
336 | 336 |
337 | 337 |
338 | 338 |
339 // --------------- T E S T - C A S E # 2 ------------------------------ | 339 // --------------- T E S T - C A S E # 2 ------------------------------ |
340 | 340 |
341 | 341 |
342 std::string· | 342 std::string· |
343 LenaTdBetFfMacSchedulerTestCase2::BuildNameString (uint16_t nUser, std::vector<d
ouble> dist) | 343 LenaTdBetFfMacSchedulerTestCase2::BuildNameString (uint16_t nUser, std::vector<d
ouble> dist) |
344 { | 344 { |
345 NS_UNUSED(nUser); | 345 NS_UNUSED (nUser); |
346 std::ostringstream oss; | 346 std::ostringstream oss; |
347 oss << "distances (m) = [ " ; | 347 oss << "distances (m) = [ " ; |
348 for (std::vector<double>::iterator it = dist.begin (); it != dist.end (); ++it
) | 348 for (std::vector<double>::iterator it = dist.begin (); it != dist.end (); ++it
) |
349 { | 349 { |
350 oss << *it << " "; | 350 oss << *it << " "; |
351 } | 351 } |
352 oss << "]"; | 352 oss << "]"; |
353 return oss.str (); | 353 return oss.str (); |
354 } | 354 } |
355 | 355 |
356 | 356 |
357 LenaTdBetFfMacSchedulerTestCase2::LenaTdBetFfMacSchedulerTestCase2 (std::vector<
double> dist, std::vector<uint32_t> estAchievableRateDl, std::vector<uint32_t> e
stThrTdBetUl, bool errorModelEnabled) | 357 LenaTdBetFfMacSchedulerTestCase2::LenaTdBetFfMacSchedulerTestCase2 (std::vector<
double> dist, std::vector<uint32_t> estAchievableRateDl, std::vector<uint32_t> e
stThrTdBetUl, bool errorModelEnabled) |
358 : TestCase (BuildNameString (static_cast<uint16_t>(dist.size ()), dist)), | 358 : TestCase (BuildNameString (static_cast<uint16_t> (dist.size ()), dist)), |
359 m_nUser (static_cast<uint16_t>(dist.size ())), | 359 m_nUser (static_cast<uint16_t> (dist.size ())), |
360 m_dist (dist), | 360 m_dist (dist), |
361 m_achievableRateDl (estAchievableRateDl), | 361 m_achievableRateDl (estAchievableRateDl), |
362 m_estThrTdBetUl (estThrTdBetUl), | 362 m_estThrTdBetUl (estThrTdBetUl), |
363 m_errorModelEnabled (errorModelEnabled) | 363 m_errorModelEnabled (errorModelEnabled) |
364 { | 364 { |
365 } | 365 } |
366 | 366 |
367 LenaTdBetFfMacSchedulerTestCase2::~LenaTdBetFfMacSchedulerTestCase2 () | 367 LenaTdBetFfMacSchedulerTestCase2::~LenaTdBetFfMacSchedulerTestCase2 () |
368 { | 368 { |
369 } | 369 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi (); | 492 uint64_t imsi = ueDevs.Get (i)->GetObject<LteUeNetDevice> ()->GetImsi (); |
493 // get the lcId | 493 // get the lcId |
494 uint8_t lcId = 3; | 494 uint8_t lcId = 3; |
495 ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId)); | 495 ulDataRxed.push_back (rlcStats->GetUlRxData (imsi, lcId)); |
496 NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " bytes rxed "
<< (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / statsDu
ration << " ref " << (double)m_estThrTdBetUl.at (i)); | 496 NS_LOG_INFO ("\tUser " << i << " dist " << m_dist.at (i) << " bytes rxed "
<< (double)ulDataRxed.at (i) << " thr " << (double)ulDataRxed.at (i) / statsDu
ration << " ref " << (double)m_estThrTdBetUl.at (i)); |
497 NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / statsDuration, (dou
ble)m_estThrTdBetUl.at (i), (double)m_estThrTdBetUl.at (i) * tolerance, " Unfair
Throughput!"); | 497 NS_TEST_ASSERT_MSG_EQ_TOL ((double)ulDataRxed.at (i) / statsDuration, (dou
ble)m_estThrTdBetUl.at (i), (double)m_estThrTdBetUl.at (i) * tolerance, " Unfair
Throughput!"); |
498 } | 498 } |
499 Simulator::Destroy (); | 499 Simulator::Destroy (); |
500 | 500 |
501 } | 501 } |
LEFT | RIGHT |