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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 double noisePowerDbm = ktDbm + 10 * std::log10 (25 * 180000); // corresponds t
o kT*bandwidth in linear units | 116 double noisePowerDbm = ktDbm + 10 * std::log10 (25 * 180000); // corresponds t
o kT*bandwidth in linear units |
117 double receiverNoiseFigureDb = 9.0; // default UE noise figure | 117 double receiverNoiseFigureDb = 9.0; // default UE noise figure |
118 | 118 |
119 for ( int i = 0 ; i < numOfTests; i++ ) | 119 for ( int i = 0 ; i < numOfTests; i++ ) |
120 { | 120 { |
121 double lossDb = txPowerDbm - snrEfficiencyMcs[i].snrDb - noisePowerDbm - r
eceiverNoiseFigureDb; | 121 double lossDb = txPowerDbm - snrEfficiencyMcs[i].snrDb - noisePowerDbm - r
eceiverNoiseFigureDb; |
122 | 122 |
123 std::ostringstream name; | 123 std::ostringstream name; |
124 name << " snr= " << snrEfficiencyMcs[i].snrDb << " dB, " | 124 name << " snr= " << snrEfficiencyMcs[i].snrDb << " dB, " |
125 << " mcs= " << snrEfficiencyMcs[i].mcsIndex; | 125 << " mcs= " << snrEfficiencyMcs[i].mcsIndex; |
126 AddTestCase (new LteLinkAdaptationTestCase (name.str (), snrEfficiencyMcs
[i].snrDb, lossDb, snrEfficiencyMcs[i].mcsIndex), TestCase::QUICK); | 126 AddTestCase (new LteLinkAdaptationTestCase (name.str (), snrEfficiencyMcs
[i].snrDb, lossDb, static_cast<uint16_t>(snrEfficiencyMcs[i].mcsIndex)), TestCas
e::QUICK); |
127 } | 127 } |
128 | 128 |
129 } | 129 } |
130 | 130 |
131 static LteLinkAdaptationTestSuite lteLinkAdaptationTestSuite; | 131 static LteLinkAdaptationTestSuite lteLinkAdaptationTestSuite; |
132 | 132 |
133 | 133 |
134 /** | 134 /** |
135 * TestCase | 135 * TestCase |
136 */ | 136 */ |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 * RRC connection has been completed and | 240 * RRC connection has been completed and |
241 * CQI feedback is available at the eNB. | 241 * CQI feedback is available at the eNB. |
242 */ | 242 */ |
243 if (Simulator::Now ().GetSeconds () > 0.030) | 243 if (Simulator::Now ().GetSeconds () > 0.030) |
244 { | 244 { |
245 NS_LOG_INFO (m_snrDb << "\t" << m_mcsIndex << "\t" << (uint16_t)dlInfo.mcs
Tb1); | 245 NS_LOG_INFO (m_snrDb << "\t" << m_mcsIndex << "\t" << (uint16_t)dlInfo.mcs
Tb1); |
246 | 246 |
247 NS_TEST_ASSERT_MSG_EQ ((uint16_t)dlInfo.mcsTb1, m_mcsIndex, "Wrong MCS ind
ex"); | 247 NS_TEST_ASSERT_MSG_EQ ((uint16_t)dlInfo.mcsTb1, m_mcsIndex, "Wrong MCS ind
ex"); |
248 } | 248 } |
249 } | 249 } |
LEFT | RIGHT |