A Discrete-Event Network Simulator
API
lte-test-frequency-reuse.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Piotr Gawlowicz
4  *
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
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
19  *
20  */
21 
22 #ifndef LTE_TEST_DOWNLINK_FR_H
23 #define LTE_TEST_DOWNLINK_FR_H
24 
25 #include "ns3/test.h"
26 #include "ns3/spectrum-value.h"
27 #include <ns3/lte-rrc-sap.h>
28 
29 #include "ns3/spectrum-test.h"
30 #include "ns3/lte-spectrum-value-helper.h"
31 
32 using namespace ns3;
33 
41 {
42 public:
44 };
45 
53 class LteFrTestCase : public TestCase
54 {
55 public:
66  LteFrTestCase (std::string name,
67  uint32_t userNum,uint8_t dlBandwidth,uint8_t ulBandwidth,
68  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
69  virtual ~LteFrTestCase ();
70 
75  void DlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
80  void UlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
81 
82 protected:
83  virtual void DoRun (void);
84 
85  uint32_t m_userNum;
86  uint8_t m_dlBandwidth;
87  uint8_t m_ulBandwidth;
88 
89  std::vector<bool> m_availableDlRb;
91 
92  std::vector<bool> m_availableUlRb;
94 };
95 
96 
105 {
106 public:
122  LteHardFrTestCase (std::string name, uint32_t userNum,
123  std::string schedulerType,
124  uint8_t dlBandwidth, uint8_t ulBandwidth,
125  uint8_t dlSubBandOffset, uint8_t dlSubBandwidth,
126  uint8_t ulSubBandOffset, uint8_t ulSubBandwidth,
127  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
128  virtual ~LteHardFrTestCase ();
129 
130 private:
131  virtual void DoRun (void);
132 
133  std::string m_schedulerType;
134 
137 
140 };
141 
150 {
151 public:
169  LteStrictFrTestCase (std::string name, uint32_t userNum,
170  std::string schedulerType,
171  uint8_t dlBandwidth, uint8_t ulBandwidth,
172  uint8_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint8_t dlEdgeSubBandwidth,
173  uint8_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint8_t ulEdgeSubBandwidth,
174  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
175  virtual ~LteStrictFrTestCase ();
176 
177 private:
178  virtual void DoRun (void);
179 
180  std::string m_schedulerType;
181 
185 
189 };
190 
201 {
202 public:
209  LteFrAreaTestCase (std::string name, std::string schedulerType);
210  virtual ~LteFrAreaTestCase ();
211 
216  void DlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
221  void UlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
222 
228  void SimpleTeleportUe (uint32_t x, uint32_t y);
236  void TeleportUe (uint32_t x, uint32_t y, double expectedPower, std::vector<bool> expectedDlRb);
245  void TeleportUe2 (Ptr<Node> ueNode, uint32_t x, uint32_t y, double expectedPower,
246  std::vector<bool> expectedDlRb);
247 
253  void SetDlExpectedValues (double expectedPower, std::vector<bool> expectedDlRb);
259  void SetUlExpectedValues (double expectedPower, std::vector<bool> expectedDlRb);
260 
261 protected:
262  virtual void DoRun (void);
263 
264  std::string m_schedulerType;
265 
266  uint8_t m_dlBandwidth;
267  uint8_t m_ulBandwidth;
268 
271 
273  std::vector<bool> m_expectedDlRb;
276 
278  std::vector<bool> m_expectedUlRb;
281 
282 };
283 
291 {
292 public:
299  LteStrictFrAreaTestCase (std::string name, std::string schedulerType);
300  virtual ~LteStrictFrAreaTestCase ();
301 
302 private:
303  virtual void DoRun (void);
304 };
305 
313 {
314 public:
321  LteSoftFrAreaTestCase (std::string name, std::string schedulerType);
322  virtual ~LteSoftFrAreaTestCase ();
323 
324 private:
325  virtual void DoRun (void);
326 
327 };
328 
336 {
337 public:
344  LteSoftFfrAreaTestCase (std::string name, std::string schedulerType);
345  virtual ~LteSoftFfrAreaTestCase ();
346 
347 private:
348  virtual void DoRun (void);
349 
350 };
351 
359 {
360 public:
367  LteEnhancedFfrAreaTestCase (std::string name, std::string schedulerType);
368  virtual ~LteEnhancedFfrAreaTestCase ();
369 
370 private:
371  virtual void DoRun (void);
372 
373 };
374 
382 {
383 public:
390  LteDistributedFfrAreaTestCase (std::string name, std::string schedulerType);
391  virtual ~LteDistributedFfrAreaTestCase ();
392 
393 private:
394  virtual void DoRun (void);
395 
396 };
397 
398 #endif /* LTE_TEST_DOWNLINK_FR_H */
Test hard frequency reuse algorithm.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
std::string m_schedulerType
scheduler type
Test the fractional frequency reuse algorithms.
bool m_usedWrongUlRbg
used wrong UL RBG?
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
std::vector< bool > m_expectedDlRb
the expected DL per RB
std::string m_schedulerType
the scheduler type
bool m_usedWrongDlPower
used wrong DL power?
Lte Enhanced Ffr Area Test Case.
A suite of tests to run.
Definition: test.h:1342
uint8_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
bool m_usedMutedUlRbg
used muted UL RBG?
uint8_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
uint8_t m_dlSubBandOffset
the DL subband offset
std::vector< bool > m_expectedUlRb
expected UL per RB
encapsulates test code
Definition: test.h:1155
Lte Distributed Ffr Area Test Case.
std::string m_schedulerType
the scheduler type
uint8_t m_ulBandwidth
the UL bandwidth
bool m_usedWrongUlPower
used wrong UL power?
uint8_t m_dlBandwidth
the DL bandwidth
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
uint8_t m_ulSubBandOffset
UL subband offset.
Lte Soft Fr Area Test Case.
bool m_usedWrongDlRbg
used wrong DL RBG?
Test stric frequency reuse algorithm.
double m_expectedDlPower
the expected DL power
uint8_t m_dlSubBandwidth
the DL subband width
std::vector< bool > m_availableDlRb
the available DL for each RB
Ptr< MobilityModel > m_ueMobility
the UE mobility model
bool m_usedMutedDlRbg
used muted DL RBG?
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t m_ulBandwidth
the UL bandwidth
uint8_t m_ulCommonSubBandwidth
UL common subbandwidth.
Time m_teleportTime
the telport time
uint8_t m_ulSubBandwidth
UL subband offset.
double m_expectedUlPower
expected UL power
uint8_t m_dlBandwidth
the DL bandwidth
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
Lte Soft Ffr Area Test Case.
uint32_t m_userNum
the number of UE nodes
std::vector< bool > m_availableUlRb
the available UL for each RB
Test frequency reuse algorithm by teleporing UEs to different parts of area and checking if the frequ...
Test frequency reuse algorithm.
uint8_t m_dlCommonSubBandwidth
DL common subbandwidth.