A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-frequency-reuse.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Piotr Gawlowicz
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Piotr Gawlowicz <gawlowicz.p@gmail.com>
18 *
19 */
20
21#ifndef LTE_TEST_DOWNLINK_FR_H
22#define LTE_TEST_DOWNLINK_FR_H
23
24#include "ns3/lte-spectrum-value-helper.h"
25#include "ns3/node.h"
26#include "ns3/spectrum-test.h"
27#include "ns3/spectrum-value.h"
28#include "ns3/test.h"
29#include <ns3/lte-rrc-sap.h>
30
31namespace ns3
32{
33class MobilityModel;
34}
35
36using namespace ns3;
37
44{
45 public:
47};
48
55class LteFrTestCase : public TestCase
56{
57 public:
68 LteFrTestCase(std::string name,
69 uint32_t userNum,
70 uint16_t dlBandwidth,
71 uint16_t ulBandwidth,
72 std::vector<bool> availableDlRb,
73 std::vector<bool> availableUlRb);
74 ~LteFrTestCase() override;
75
80 void DlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
85 void UlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
86
87 protected:
88 void DoRun() override;
89
91 uint16_t m_dlBandwidth;
92 uint16_t m_ulBandwidth;
93
94 std::vector<bool> m_availableDlRb;
96
97 std::vector<bool> m_availableUlRb;
99};
100
108{
109 public:
125 LteHardFrTestCase(std::string name,
126 uint32_t userNum,
127 std::string schedulerType,
128 uint16_t dlBandwidth,
129 uint16_t ulBandwidth,
130 uint8_t dlSubBandOffset,
131 uint16_t dlSubBandwidth,
132 uint8_t ulSubBandOffset,
133 uint16_t ulSubBandwidth,
134 std::vector<bool> availableDlRb,
135 std::vector<bool> availableUlRb);
136 ~LteHardFrTestCase() override;
137
138 private:
139 void DoRun() override;
140
141 std::string m_schedulerType;
142
145
148};
149
157{
158 public:
176 LteStrictFrTestCase(std::string name,
177 uint32_t userNum,
178 std::string schedulerType,
179 uint16_t dlBandwidth,
180 uint16_t ulBandwidth,
181 uint16_t dlCommonSubBandwidth,
182 uint8_t dlEdgeSubBandOffset,
183 uint16_t dlEdgeSubBandwidth,
184 uint16_t ulCommonSubBandwidth,
185 uint8_t ulEdgeSubBandOffset,
186 uint16_t ulEdgeSubBandwidth,
187 std::vector<bool> availableDlRb,
188 std::vector<bool> availableUlRb);
189 ~LteStrictFrTestCase() override;
190
191 private:
192 void DoRun() override;
193
194 std::string m_schedulerType;
195
199
203};
204
214{
215 public:
222 LteFrAreaTestCase(std::string name, std::string schedulerType);
223 ~LteFrAreaTestCase() override;
224
229 void DlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
234 void UlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
235
249 void TeleportUe(uint32_t x, uint32_t y, double expectedPower, std::vector<bool> expectedDlRb);
258 void TeleportUe2(Ptr<Node> ueNode,
259 uint32_t x,
260 uint32_t y,
261 double expectedPower,
262 std::vector<bool> expectedDlRb);
263
269 void SetDlExpectedValues(double expectedPower, std::vector<bool> expectedDlRb);
275 void SetUlExpectedValues(double expectedPower, std::vector<bool> expectedDlRb);
276
277 protected:
278 void DoRun() override;
279
280 std::string m_schedulerType;
281
282 uint16_t m_dlBandwidth;
283 uint16_t m_ulBandwidth;
284
287
289 std::vector<bool> m_expectedDlRb;
292
294 std::vector<bool> m_expectedUlRb;
297};
298
305{
306 public:
313 LteStrictFrAreaTestCase(std::string name, std::string schedulerType);
314 ~LteStrictFrAreaTestCase() override;
315
316 private:
317 void DoRun() override;
318};
319
326{
327 public:
334 LteSoftFrAreaTestCase(std::string name, std::string schedulerType);
335 ~LteSoftFrAreaTestCase() override;
336
337 private:
338 void DoRun() override;
339};
340
347{
348 public:
355 LteSoftFfrAreaTestCase(std::string name, std::string schedulerType);
356 ~LteSoftFfrAreaTestCase() override;
357
358 private:
359 void DoRun() override;
360};
361
368{
369 public:
376 LteEnhancedFfrAreaTestCase(std::string name, std::string schedulerType);
378
379 private:
380 void DoRun() override;
381};
382
389{
390 public:
397 LteDistributedFfrAreaTestCase(std::string name, std::string schedulerType);
399
400 private:
401 void DoRun() override;
402};
403
404#endif /* LTE_TEST_DOWNLINK_FR_H */
Lte Distributed Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Lte Enhanced Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Test frequency reuse algorithm by teleporting UEs to different parts of area and checking if the freq...
Time m_teleportTime
the teleport time
bool m_usedWrongUlRbg
used wrong UL RBG?
std::vector< bool > m_expectedDlRb
the expected DL per RB
void SimpleTeleportUe(uint32_t x, uint32_t y)
Simple teleport UE function.
uint16_t m_ulBandwidth
the UL bandwidth
uint16_t m_dlBandwidth
the DL bandwidth
std::vector< bool > m_expectedUlRb
expected UL per RB
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
void TeleportUe2(Ptr< Node > ueNode, uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE 2 function.
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
double m_expectedUlPower
expected UL power
std::string m_schedulerType
the scheduler type
void SetUlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set UL expected values function.
bool m_usedWrongUlPower
used wrong UL power?
double m_expectedDlPower
the expected DL power
void SetDlExpectedValues(double expectedPower, std::vector< bool > expectedDlRb)
Set DL expected values function.
bool m_usedWrongDlRbg
used wrong DL RBG?
void TeleportUe(uint32_t x, uint32_t y, double expectedPower, std::vector< bool > expectedDlRb)
Teleport UE function.
Ptr< MobilityModel > m_ueMobility
the UE mobility model
bool m_usedWrongDlPower
used wrong DL power?
void DoRun() override
Implementation to actually run this TestCase.
Test frequency reuse algorithm.
void DlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
DL data receive start function.
uint32_t m_userNum
the number of UE nodes
void UlDataRxStart(Ptr< const SpectrumValue > spectrumValue)
UL data receive start function.
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_dlBandwidth
the DL bandwidth
uint16_t m_ulBandwidth
the UL bandwidth
bool m_usedMutedDlRbg
used muted DL RBG?
std::vector< bool > m_availableDlRb
the available DL for each RB
std::vector< bool > m_availableUlRb
the available UL for each RB
bool m_usedMutedUlRbg
used muted UL RBG?
Test the fractional frequency reuse algorithms.
Test hard frequency reuse algorithm.
uint8_t m_dlSubBandOffset
the DL subband offset
uint8_t m_ulSubBandwidth
UL subband offset.
uint8_t m_ulSubBandOffset
UL subband offset.
void DoRun() override
Implementation to actually run this TestCase.
uint8_t m_dlSubBandwidth
the DL subband width
std::string m_schedulerType
the scheduler type
Lte Soft Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
Lte Soft Fr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
void DoRun() override
Implementation to actually run this TestCase.
Test strict frequency reuse algorithm.
uint16_t m_ulCommonSubBandwidth
UL common subbandwidth.
void DoRun() override
Implementation to actually run this TestCase.
uint16_t m_dlCommonSubBandwidth
DL common subbandwidth.
uint8_t m_dlEdgeSubBandOffset
DL edge subband offset.
uint8_t m_ulEdgeSubBandOffset
UL edge subband offset.
std::string m_schedulerType
scheduler type
uint16_t m_dlEdgeSubBandwidth
DL edge subbandwidth.
uint16_t m_ulEdgeSubBandwidth
UL edge subbandwidth.
Keep track of the current position and velocity of an object.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
encapsulates test code
Definition: test.h:1060
A suite of tests to run.
Definition: test.h:1256
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Every class exported by the ns3 library is enclosed in the ns3 namespace.