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) 2016 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2016 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 static TestCarrierAggregationSuite lenaTestRrFfMacSchedulerSuite; | 244 static TestCarrierAggregationSuite lenaTestRrFfMacSchedulerSuite; |
245 | 245 |
246 std::string· | 246 std::string· |
247 CarrierAggregationTestCase::BuildNameString (uint16_t nUser, uint16_t dist, uint
32_t dlBandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers) | 247 CarrierAggregationTestCase::BuildNameString (uint16_t nUser, uint16_t dist, uint
32_t dlBandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCarriers) |
248 { | 248 { |
249 std::ostringstream oss; | 249 std::ostringstream oss; |
250 oss << nUser << " UEs, distance " << dist << " m"<< " dlBandwidth "<< dlBandwi
dth <<" ulBandwidth "<< ulBandwidth <<" number of carriers "<<numberOfComponentC
arriers; | 250 oss << nUser << " UEs, distance " << dist << " m"<< " dlBandwidth "<< dlBandwi
dth <<" ulBandwidth "<< ulBandwidth <<" number of carriers "<<numberOfComponentC
arriers; |
251 return oss.str (); | 251 return oss.str (); |
252 } | 252 } |
253 | 253 |
254 CarrierAggregationTestCase::CarrierAggregationTestCase (uint16_t nUser, uint16_t
dist, uint32_t dlbandwidth, uint32_t ulBandwidth, uint32_t numberOfComponentCar
riers) | 254 CarrierAggregationTestCase::CarrierAggregationTestCase (uint16_t nUser, uint16_t
dist, uint8_t dlbandwidth, uint8_t ulBandwidth, uint32_t numberOfComponentCarri
ers) |
255 : TestCase (BuildNameString (nUser, dist, dlbandwidth, ulBandwidth, numberOfCo
mponentCarriers)), | 255 : TestCase (BuildNameString (nUser, dist, dlbandwidth, ulBandwidth, numberOfCo
mponentCarriers)), |
256 m_nUser (nUser), | 256 m_nUser (nUser), |
257 m_dist (dist), | 257 m_dist (dist), |
258 m_dlBandwidth (dlbandwidth), | 258 m_dlBandwidth (dlbandwidth), |
259 m_ulBandwidth (ulBandwidth), | 259 m_ulBandwidth (ulBandwidth), |
260 m_numberOfComponentCarriers(numberOfComponentCarriers) | 260 m_numberOfComponentCarriers(numberOfComponentCarriers) |
261 { | 261 { |
262 m_dlThroughput = 0; | 262 m_dlThroughput = 0; |
263 m_statsDuration = 0.6; | 263 m_statsDuration = 0.6; |
264 } | 264 } |
(...skipping 20 matching lines...) Expand all Loading... |
285 * Initialize Simulation Scenario: 1 eNB and m_nUser UEs | 285 * Initialize Simulation Scenario: 1 eNB and m_nUser UEs |
286 */ | 286 */ |
287 | 287 |
288 Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); | 288 Ptr<LteHelper> lteHelper = CreateObject<LteHelper> (); |
289 ·· | 289 ·· |
290 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); | 290 lteHelper->SetAttribute ("PathlossModel", StringValue ("ns3::FriisSpectrumProp
agationLossModel")); |
291 | 291 |
292 auto cch = CreateObject<CcHelper> (); | 292 auto cch = CreateObject<CcHelper> (); |
293 cch->SetDlEarfcn (100); // Same as default value for LteEnbNetDevice | 293 cch->SetDlEarfcn (100); // Same as default value for LteEnbNetDevice |
294 cch->SetUlEarfcn (100 + 18000); // Same as default value for LteEnbNetDevice | 294 cch->SetUlEarfcn (100 + 18000); // Same as default value for LteEnbNetDevice |
295 cch->SetDlBandwidth (static_cast<uint16_t>(m_dlBandwidth)); | 295 cch->SetDlBandwidth (m_dlBandwidth); |
296 cch->SetUlBandwidth (static_cast<uint16_t>(m_ulBandwidth)); | 296 cch->SetUlBandwidth (m_ulBandwidth); |
297 cch->SetNumberOfComponentCarriers (static_cast<uint16_t>(m_numberOfComponentCa
rriers)); | 297 cch->SetNumberOfComponentCarriers (static_cast<uint16_t>(m_numberOfComponentCa
rriers)); |
298 lteHelper->SetCcPhyParams (cch->EquallySpacedCcs ()); | 298 lteHelper->SetCcPhyParams (cch->EquallySpacedCcs ()); |
299 | 299 |
300 // Create Nodes: eNodeB and UE | 300 // Create Nodes: eNodeB and UE |
301 NodeContainer enbNodes; | 301 NodeContainer enbNodes; |
302 NodeContainer ueNodes; | 302 NodeContainer ueNodes; |
303 enbNodes.Create (1); | 303 enbNodes.Create (1); |
304 ueNodes.Create (m_nUser); | 304 ueNodes.Create (m_nUser); |
305 | 305 |
306 // Install Mobility Model | 306 // Install Mobility Model |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 481 |
482 if (!ulOutFile.is_open ()) | 482 if (!ulOutFile.is_open ()) |
483 { | 483 { |
484 NS_LOG_ERROR ("Can't open file "<<ulResultsFileName); | 484 NS_LOG_ERROR ("Can't open file "<<ulResultsFileName); |
485 return; | 485 return; |
486 } | 486 } |
487 ulOutFile << m_nUser <<" "<<m_numberOfComponentCarriers <<" "<< ((m_ulThroughp
ut*8)/m_statsDuration)/m_nUser<<std::endl; | 487 ulOutFile << m_nUser <<" "<<m_numberOfComponentCarriers <<" "<< ((m_ulThroughp
ut*8)/m_statsDuration)/m_nUser<<std::endl; |
488 ulOutFile.close (); | 488 ulOutFile.close (); |
489 } | 489 } |
490 | 490 |
LEFT | RIGHT |