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) 2014 Piotr Gawlowicz | 3 * Copyright (c) 2014 Piotr Gawlowicz |
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 23 matching lines...) Expand all Loading... |
34 #include "ns3/lte-enb-phy.h" | 34 #include "ns3/lte-enb-phy.h" |
35 #include "ns3/lte-enb-net-device.h" | 35 #include "ns3/lte-enb-net-device.h" |
36 | 36 |
37 #include "ns3/lte-ue-phy.h" | 37 #include "ns3/lte-ue-phy.h" |
38 #include "ns3/lte-ue-net-device.h" | 38 #include "ns3/lte-ue-net-device.h" |
39 | 39 |
40 #include "lte-test-interference-fr.h" | 40 #include "lte-test-interference-fr.h" |
41 | 41 |
42 #include <ns3/lte-chunk-processor.h> | 42 #include <ns3/lte-chunk-processor.h> |
43 | 43 |
44 #include "lte-simple-spectrum-phy.h" | |
45 #include "ns3/spectrum-value.h" | 44 #include "ns3/spectrum-value.h" |
46 #include "ns3/lte-spectrum-value-helper.h" | 45 #include "ns3/lte-spectrum-value-helper.h" |
47 | 46 |
48 | 47 |
49 using namespace ns3; | 48 using namespace ns3; |
50 | 49 |
51 NS_LOG_COMPONENT_DEFINE ("LteInterferenceFrTest"); | 50 NS_LOG_COMPONENT_DEFINE ("LteInterferenceFrTest"); |
52 | 51 |
53 | 52 |
54 | 53 |
55 /** | 54 /** |
56 * TestSuite | 55 * TestSuite |
57 */ | 56 */ |
58 | 57 |
59 LteInterferenceFrTestSuite::LteInterferenceFrTestSuite () | 58 LteInterferenceFrTestSuite::LteInterferenceFrTestSuite () |
60 : TestSuite ("lte-interference-fr", SYSTEM) | 59 : TestSuite ("lte-interference-fr", SYSTEM) |
61 { | 60 { |
62 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL
_DEBUG); | 61 #if 0 |
63 // LogComponentEnable ("LteInterferenceFrTest", logLevel); | 62 LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_D
EBUG); |
| 63 LogComponentEnable ("LteInterferenceFrTest", logLevel); |
| 64 #endif |
64 | 65 |
65 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=20", 50.000000, 20
.000000, 356449.932732, 10803.280215), TestCase::QUICK); | 66 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=20", 50.000000, 20
.000000, 356449.932732, 10803.280215), TestCase::QUICK); |
66 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=50", 50.000000, 50
.000000, 356449.932732, 10803.280215), TestCase::QUICK); | 67 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=50", 50.000000, 50
.000000, 356449.932732, 10803.280215), TestCase::QUICK); |
67 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=200", 50.000000, 2
00.000000, 356449.932732, 10803.280215), TestCase::QUICK); | 68 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=200", 50.000000, 2
00.000000, 356449.932732, 10803.280215), TestCase::QUICK); |
68 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=500", 50.000000, 5
00.000000, 356449.932732, 10803.280215), TestCase::QUICK); | 69 AddTestCase (new LteInterferenceHardFrTestCase ("d1=50, d2=500", 50.000000, 5
00.000000, 356449.932732, 10803.280215), TestCase::QUICK); |
69 | 70 |
70 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=20", 50.000000,
20.000000, 0.160000, 0.159998, 356449.932732, 10803.280215, 18), TestCase::QUIC
K); | 71 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=20", 50.000000,
20.000000, 0.160000, 0.159998, 356449.932732, 10803.280215, 18), TestCase::QUIC
K); |
71 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=50", 50.000000,
50.000000, 0.999997, 0.999907, 356449.932732, 10803.280215, 28), TestCase::QUICK
); | 72 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=50", 50.000000,
50.000000, 0.999997, 0.999907, 356449.932732, 10803.280215, 28), TestCase::QUICK
); |
72 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=200", 50.000000,
200.000000, 15.999282, 15.976339, 356449.932732, 10803.280215, 30), TestCase::
QUICK); | 73 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=200", 50.000000,
200.000000, 15.999282, 15.976339, 356449.932732, 10803.280215, 30), TestCase::
QUICK); |
73 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=500", 50.000000,
500.000000, 99.971953, 99.082845, 356449.932732, 10803.280215, 30), TestCase::
QUICK); | 74 AddTestCase (new LteInterferenceStrictFrTestCase ("d1=50, d2=500", 50.000000,
500.000000, 99.971953, 99.082845, 356449.932732, 10803.280215, 30), TestCase::
QUICK); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // double ulSinr1Db = 10.0 * std::log10 (testUlSinr1->GetValue ()->operator[] (
0)); | 423 // double ulSinr1Db = 10.0 * std::log10 (testUlSinr1->GetValue ()->operator[] (
0)); |
423 // NS_LOG_DEBUG("ulSinr1Db: "<< ulSinr1Db); | 424 // NS_LOG_DEBUG("ulSinr1Db: "<< ulSinr1Db); |
424 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr1Db, m_expectedUlSinrDb, 0.01, "Wrong SINR
in UL! (UE1 --> eNB1)"); | 425 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr1Db, m_expectedUlSinrDb, 0.01, "Wrong SINR
in UL! (UE1 --> eNB1)"); |
425 // | 426 // |
426 // double ulSinr2Db = 10.0 * std::log10 (testUlSinr2->GetValue ()->operator[] (
0)); | 427 // double ulSinr2Db = 10.0 * std::log10 (testUlSinr2->GetValue ()->operator[] (
0)); |
427 // NS_LOG_DEBUG("ulSinr2Db: "<< ulSinr2Db); | 428 // NS_LOG_DEBUG("ulSinr2Db: "<< ulSinr2Db); |
428 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr2Db, m_expectedUlSinrDb, 0.01, "Wrong SINR
in UL! (UE2 --> eNB2)"); | 429 // NS_TEST_ASSERT_MSG_EQ_TOL (ulSinr2Db, m_expectedUlSinrDb, 0.01, "Wrong SINR
in UL! (UE2 --> eNB2)"); |
429 | 430 |
430 Simulator::Destroy (); | 431 Simulator::Destroy (); |
431 } | 432 } |
LEFT | RIGHT |