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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 | 75 |
76 /** | 76 /** |
77 * TestSuite | 77 * TestSuite |
78 */ | 78 */ |
79 | 79 |
80 LteCqiGenerationTestSuite::LteCqiGenerationTestSuite () | 80 LteCqiGenerationTestSuite::LteCqiGenerationTestSuite () |
81 : TestSuite ("lte-cqi-generation", SYSTEM) | 81 : TestSuite ("lte-cqi-generation", SYSTEM) |
82 { | 82 { |
83 // LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL
_DEBUG); | 83 #if 0 |
84 // LogComponentEnable ("LteCqiGenerationTest", logLevel); | 84 LogLevel logLevel = (LogLevel)(LOG_PREFIX_FUNC | LOG_PREFIX_TIME | LOG_LEVEL_D
EBUG); |
| 85 LogComponentEnable ("LteCqiGenerationTest", logLevel); |
| 86 #endif |
| 87 |
85 NS_LOG_INFO ("Creating LteCqiGenerationTestSuite"); | 88 NS_LOG_INFO ("Creating LteCqiGenerationTestSuite"); |
86 | 89 |
87 AddTestCase (new LteCqiGenerationTestCase ("UsePdcchForCqiGeneration", false,
4, 2), TestCase::QUICK); | 90 AddTestCase (new LteCqiGenerationTestCase ("UsePdcchForCqiGeneration", false,
4, 2), TestCase::QUICK); |
88 AddTestCase (new LteCqiGenerationTestCase ("UsePdschForCqiGeneration", true, 2
8, 2), TestCase::QUICK); | 91 AddTestCase (new LteCqiGenerationTestCase ("UsePdschForCqiGeneration", true, 2
8, 2), TestCase::QUICK); |
89 | 92 |
90 AddTestCase (new LteCqiGenerationDlPowerControlTestCase ("CqiGenerationWithDlP
owerControl", | 93 AddTestCase (new LteCqiGenerationDlPowerControlTestCase ("CqiGenerationWithDlP
owerControl", |
91 LteRrcSap::PdschConfi
gDedicated::dB0, LteRrcSap::PdschConfigDedicated::dB0, 4, 2), TestCase::QUICK); | 94 LteRrcSap::PdschConfi
gDedicated::dB0, LteRrcSap::PdschConfigDedicated::dB0, 4, 2), TestCase::QUICK); |
92 AddTestCase (new LteCqiGenerationDlPowerControlTestCase ("CqiGenerationWithDlP
owerControl", | 95 AddTestCase (new LteCqiGenerationDlPowerControlTestCase ("CqiGenerationWithDlP
owerControl", |
93 LteRrcSap::PdschConfi
gDedicated::dB0, LteRrcSap::PdschConfigDedicated::dB_3, 8, 2), TestCase::QUICK); | 96 LteRrcSap::PdschConfi
gDedicated::dB0, LteRrcSap::PdschConfigDedicated::dB_3, 8, 2), TestCase::QUICK); |
94 AddTestCase (new LteCqiGenerationDlPowerControlTestCase ("CqiGenerationWithDlP
owerControl", | 97 AddTestCase (new LteCqiGenerationDlPowerControlTestCase ("CqiGenerationWithDlP
owerControl", |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // Attach a UE to a eNB | 220 // Attach a UE to a eNB |
218 lteHelper->Attach (ueDevs1, enbDevs.Get (0)); | 221 lteHelper->Attach (ueDevs1, enbDevs.Get (0)); |
219 lteHelper->Attach (ueDevs2, enbDevs.Get (1)); | 222 lteHelper->Attach (ueDevs2, enbDevs.Get (1)); |
220 | 223 |
221 // Activate an EPS bearer | 224 // Activate an EPS bearer |
222 enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; | 225 enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; |
223 EpsBearer bearer (q); | 226 EpsBearer bearer (q); |
224 lteHelper->ActivateDataRadioBearer (ueDevs1, bearer); | 227 lteHelper->ActivateDataRadioBearer (ueDevs1, bearer); |
225 lteHelper->ActivateDataRadioBearer (ueDevs2, bearer); | 228 lteHelper->ActivateDataRadioBearer (ueDevs2, bearer); |
226 | 229 |
227 Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling", | 230 Config::Connect ("/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/DlS
cheduling", |
228 MakeBoundCallback (&LteTestDlSchedulingCallback, this)); | 231 MakeBoundCallback (&LteTestDlSchedulingCallback, this)); |
229 | 232 |
230 Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/UlScheduling", | 233 Config::Connect ("/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/UlS
cheduling", |
231 MakeBoundCallback (&LteTestUlSchedulingCallback, this)); | 234 MakeBoundCallback (&LteTestUlSchedulingCallback, this)); |
232 | 235 |
233 Config::Connect ("/NodeList/1/DeviceList/0/LteEnbMac/DlScheduling", | 236 Config::Connect ("/NodeList/1/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/DlS
cheduling", |
234 MakeBoundCallback (&LteTestDlSchedulingCallback, this)); | 237 MakeBoundCallback (&LteTestDlSchedulingCallback, this)); |
235 | 238 |
236 Config::Connect ("/NodeList/1/DeviceList/0/LteEnbMac/UlScheduling", | 239 Config::Connect ("/NodeList/1/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/UlS
cheduling", |
237 MakeBoundCallback (&LteTestUlSchedulingCallback, this)); | 240 MakeBoundCallback (&LteTestUlSchedulingCallback, this)); |
238 | 241 |
239 Simulator::Stop (Seconds (1.100)); | 242 Simulator::Stop (Seconds (1.100)); |
240 Simulator::Run (); | 243 Simulator::Run (); |
241 | 244 |
242 Simulator::Destroy (); | 245 Simulator::Destroy (); |
243 } | 246 } |
244 | 247 |
245 LteCqiGenerationDlPowerControlTestCase::LteCqiGenerationDlPowerControlTestCase (
std::string name, | 248 LteCqiGenerationDlPowerControlTestCase::LteCqiGenerationDlPowerControlTestCase (
std::string name, |
246
uint8_t cell0Pa, uint8_t cell1Pa, uint16_t dlMcs, uint16_t ulMcs) | 249
uint8_t cell0Pa, uint8_t cell1Pa, uint16_t dlMcs, uint16_t ulMcs) |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 364 |
362 enbDevs.Get (1)->GetAttribute ("LteFfrAlgorithm", tmp); | 365 enbDevs.Get (1)->GetAttribute ("LteFfrAlgorithm", tmp); |
363 Ptr<LteFfrSimple> simpleFfrAlgorithmEnb1 = DynamicCast<LteFfrSimple>(tmp.GetOb
ject ()); | 366 Ptr<LteFfrSimple> simpleFfrAlgorithmEnb1 = DynamicCast<LteFfrSimple>(tmp.GetOb
ject ()); |
364 simpleFfrAlgorithmEnb1->ChangePdschConfigDedicated (true); | 367 simpleFfrAlgorithmEnb1->ChangePdschConfigDedicated (true); |
365 | 368 |
366 LteRrcSap::PdschConfigDedicated pdschConfigDedicatedEnb1; | 369 LteRrcSap::PdschConfigDedicated pdschConfigDedicatedEnb1; |
367 pdschConfigDedicatedEnb1.pa = m_cell1Pa; | 370 pdschConfigDedicatedEnb1.pa = m_cell1Pa; |
368 simpleFfrAlgorithmEnb1->SetPdschConfigDedicated (pdschConfigDedicatedEnb1); | 371 simpleFfrAlgorithmEnb1->SetPdschConfigDedicated (pdschConfigDedicatedEnb1); |
369 | 372 |
370 | 373 |
371 Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/DlScheduling", | 374 Config::Connect ("/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/DlS
cheduling", |
372 MakeBoundCallback (&LteTestDlSchedulingCallback2, this)); | 375 MakeBoundCallback (&LteTestDlSchedulingCallback2, this)); |
373 | 376 |
374 Config::Connect ("/NodeList/0/DeviceList/0/LteEnbMac/UlScheduling", | 377 Config::Connect ("/NodeList/0/DeviceList/0/ComponentCarrierMap/*/LteEnbMac/UlS
cheduling", |
375 MakeBoundCallback (&LteTestUlSchedulingCallback2, this)); | 378 MakeBoundCallback (&LteTestUlSchedulingCallback2, this)); |
376 | 379 |
377 Simulator::Stop (Seconds (1.100)); | 380 Simulator::Stop (Seconds (1.100)); |
378 Simulator::Run (); | 381 Simulator::Run (); |
379 | 382 |
380 Simulator::Destroy (); | 383 Simulator::Destroy (); |
381 } | 384 } |
382 | 385 |
LEFT | RIGHT |