A Discrete-Event Network Simulator
API
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
45{
46 public:
48};
49
57class LteFrTestCase : public TestCase
58{
59 public:
70 LteFrTestCase(std::string name,
71 uint32_t userNum,
72 uint16_t dlBandwidth,
73 uint16_t ulBandwidth,
74 std::vector<bool> availableDlRb,
75 std::vector<bool> availableUlRb);
76 ~LteFrTestCase() override;
77
82 void DlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
87 void UlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
88
89 protected:
90 void DoRun() override;
91
93 uint16_t m_dlBandwidth;
94 uint16_t m_ulBandwidth;
95
96 std::vector<bool> m_availableDlRb;
98
99 std::vector<bool> m_availableUlRb;
101};
102
111{
112 public:
128 LteHardFrTestCase(std::string name,
129 uint32_t userNum,
130 std::string schedulerType,
131 uint16_t dlBandwidth,
132 uint16_t ulBandwidth,
133 uint8_t dlSubBandOffset,
134 uint16_t dlSubBandwidth,
135 uint8_t ulSubBandOffset,
136 uint16_t ulSubBandwidth,
137 std::vector<bool> availableDlRb,
138 std::vector<bool> availableUlRb);
139 ~LteHardFrTestCase() override;
140
141 private:
142 void DoRun() override;
143
144 std::string m_schedulerType;
145
148
151};
152
161{
162 public:
180 LteStrictFrTestCase(std::string name,
181 uint32_t userNum,
182 std::string schedulerType,
183 uint16_t dlBandwidth,
184 uint16_t ulBandwidth,
185 uint16_t dlCommonSubBandwidth,
186 uint8_t dlEdgeSubBandOffset,
187 uint16_t dlEdgeSubBandwidth,
188 uint16_t ulCommonSubBandwidth,
189 uint8_t ulEdgeSubBandOffset,
190 uint16_t ulEdgeSubBandwidth,
191 std::vector<bool> availableDlRb,
192 std::vector<bool> availableUlRb);
193 ~LteStrictFrTestCase() override;
194
195 private:
196 void DoRun() override;
197
198 std::string m_schedulerType;
199
203
207};
208
219{
220 public:
227 LteFrAreaTestCase(std::string name, std::string schedulerType);
228 ~LteFrAreaTestCase() override;
229
234 void DlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
239 void UlDataRxStart(Ptr<const SpectrumValue> spectrumValue);
240
254 void TeleportUe(uint32_t x, uint32_t y, double expectedPower, std::vector<bool> expectedDlRb);
263 void TeleportUe2(Ptr<Node> ueNode,
264 uint32_t x,
265 uint32_t y,
266 double expectedPower,
267 std::vector<bool> expectedDlRb);
268
274 void SetDlExpectedValues(double expectedPower, std::vector<bool> expectedDlRb);
280 void SetUlExpectedValues(double expectedPower, std::vector<bool> expectedDlRb);
281
282 protected:
283 void DoRun() override;
284
285 std::string m_schedulerType;
286
287 uint16_t m_dlBandwidth;
288 uint16_t m_ulBandwidth;
289
292
294 std::vector<bool> m_expectedDlRb;
297
299 std::vector<bool> m_expectedUlRb;
302};
303
311{
312 public:
319 LteStrictFrAreaTestCase(std::string name, std::string schedulerType);
320 ~LteStrictFrAreaTestCase() override;
321
322 private:
323 void DoRun() override;
324};
325
333{
334 public:
341 LteSoftFrAreaTestCase(std::string name, std::string schedulerType);
342 ~LteSoftFrAreaTestCase() override;
343
344 private:
345 void DoRun() override;
346};
347
355{
356 public:
363 LteSoftFfrAreaTestCase(std::string name, std::string schedulerType);
364 ~LteSoftFfrAreaTestCase() override;
365
366 private:
367 void DoRun() override;
368};
369
377{
378 public:
385 LteEnhancedFfrAreaTestCase(std::string name, std::string schedulerType);
387
388 private:
389 void DoRun() override;
390};
391
399{
400 public:
407 LteDistributedFfrAreaTestCase(std::string name, std::string schedulerType);
409
410 private:
411 void DoRun() override;
412};
413
414#endif /* LTE_TEST_DOWNLINK_FR_H */
Lte Distributed Ffr Area Test Case.
LteDistributedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
Lte Enhanced Ffr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
LteEnhancedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Test frequency reuse algorithm by teleporing UEs to different parts of area and checking if the frequ...
Time m_teleportTime
the telport time
LteFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
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
LteFrTestCase(std::string name, uint32_t userNum, uint16_t dlBandwidth, uint16_t ulBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
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.
LteHardFrTestCase(std::string name, uint32_t userNum, std::string schedulerType, uint16_t dlBandwidth, uint16_t ulBandwidth, uint8_t dlSubBandOffset, uint16_t dlSubBandwidth, uint8_t ulSubBandOffset, uint16_t ulSubBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
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.
LteSoftFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Lte Soft Fr Area Test Case.
void DoRun() override
Implementation to actually run this TestCase.
LteSoftFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
void DoRun() override
Implementation to actually run this TestCase.
LteStrictFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Test stric 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
LteStrictFrTestCase(std::string name, uint32_t userNum, std::string schedulerType, uint16_t dlBandwidth, uint16_t ulBandwidth, uint16_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint16_t dlEdgeSubBandwidth, uint16_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint16_t ulEdgeSubBandwidth, std::vector< bool > availableDlRb, std::vector< bool > availableUlRb)
Constructor.
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.