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 
38 {
39 public:
41 };
42 
43 class LteFrTestCase : public TestCase
44 {
45 public:
46  LteFrTestCase (std::string name,
47  uint32_t userNum,uint8_t dlBandwidth,uint8_t ulBandwidth,
48  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
49  virtual ~LteFrTestCase ();
50 
51  void DlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
52  void UlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
53 
54 protected:
55  virtual void DoRun (void);
56 
57  uint32_t m_userNum;
58  uint8_t m_dlBandwidth;
59  uint8_t m_ulBandwidth;
60 
61  std::vector<bool> m_availableDlRb;
63 
64  std::vector<bool> m_availableUlRb;
66 };
67 
68 
70 {
71 public:
72  LteHardFrTestCase (std::string name, uint32_t userNum,
73  std::string schedulerType,
74  uint8_t dlBandwidth, uint8_t ulBandwidth,
75  uint8_t dlSubBandOffset, uint8_t dlSubBandwidth,
76  uint8_t ulSubBandOffset, uint8_t ulSubBandwidth,
77  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
78  virtual ~LteHardFrTestCase ();
79 
80 private:
81  virtual void DoRun (void);
82 
83  std::string m_schedulerType;
84 
87 
90 };
91 
93 {
94 public:
95  LteStrictFrTestCase (std::string name, uint32_t userNum,
96  std::string schedulerType,
97  uint8_t dlBandwidth, uint8_t ulBandwidth,
98  uint8_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint8_t dlEdgeSubBandwidth,
99  uint8_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint8_t ulEdgeSubBandwidth,
100  std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
101  virtual ~LteStrictFrTestCase ();
102 
103 private:
104  virtual void DoRun (void);
105 
106  std::string m_schedulerType;
107 
111 
115 };
116 
118 {
119 public:
120  LteFrAreaTestCase (std::string name, std::string schedulerType);
121  virtual ~LteFrAreaTestCase ();
122 
123  void DlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
124  void UlDataRxStart (Ptr<const SpectrumValue> spectrumValue);
125 
126  void SimpleTeleportUe (uint32_t x, uint32_t y);
127  void TeleportUe (uint32_t x, uint32_t y, double expectedPower, std::vector<bool> expectedDlRb);
128  void TeleportUe2 (Ptr<Node> ueNode, uint32_t x, uint32_t y, double expectedPower,
129  std::vector<bool> expectedDlRb);
130 
131  void SetDlExpectedValues (double expectedPower, std::vector<bool> expectedDlRb);
132  void SetUlExpectedValues (double expectedPower, std::vector<bool> expectedDlRb);
133 
134 protected:
135  virtual void DoRun (void);
136 
137  std::string m_schedulerType;
138 
139  uint8_t m_dlBandwidth;
140  uint8_t m_ulBandwidth;
141 
144 
146  std::vector<bool> m_expectedDlRb;
149 
151  std::vector<bool> m_expectedUlRb;
154 
155 };
156 
158 {
159 public:
160  LteStrictFrAreaTestCase (std::string name, std::string schedulerType);
161  virtual ~LteStrictFrAreaTestCase ();
162 
163 private:
164  virtual void DoRun (void);
165 };
166 
168 {
169 public:
170  LteSoftFrAreaTestCase (std::string name, std::string schedulerType);
171  virtual ~LteSoftFrAreaTestCase ();
172 
173 private:
174  virtual void DoRun (void);
175 
176 };
177 
179 {
180 public:
181  LteSoftFfrAreaTestCase (std::string name, std::string schedulerType);
182  virtual ~LteSoftFfrAreaTestCase ();
183 
184 private:
185  virtual void DoRun (void);
186 
187 };
188 
190 {
191 public:
192  LteEnhancedFfrAreaTestCase (std::string name, std::string schedulerType);
193  virtual ~LteEnhancedFfrAreaTestCase ();
194 
195 private:
196  virtual void DoRun (void);
197 
198 };
199 
201 {
202 public:
203  LteDistributedFfrAreaTestCase (std::string name, std::string schedulerType);
204  virtual ~LteDistributedFfrAreaTestCase ();
205 
206 private:
207  virtual void DoRun (void);
208 
209 };
210 
211 #endif /* LTE_TEST_DOWNLINK_FR_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Test Downlink FFR algorithms.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
std::vector< bool > m_expectedDlRb
A suite of tests to run.
Definition: test.h:1333
std::vector< bool > m_expectedUlRb
encapsulates test code
Definition: test.h:1147
std::vector< bool > m_availableDlRb
Ptr< MobilityModel > m_ueMobility
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< bool > m_availableUlRb