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
32using namespace ns3;
33
41{
42public:
44};
45
53class LteFrTestCase : public TestCase
54{
55public:
66 LteFrTestCase (std::string name,
67 uint32_t userNum,uint16_t dlBandwidth,uint16_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
82protected:
83 virtual void DoRun (void);
84
86 uint16_t m_dlBandwidth;
87 uint16_t m_ulBandwidth;
88
89 std::vector<bool> m_availableDlRb;
91
92 std::vector<bool> m_availableUlRb;
94};
95
96
105{
106public:
122 LteHardFrTestCase (std::string name, uint32_t userNum,
123 std::string schedulerType,
124 uint16_t dlBandwidth, uint16_t ulBandwidth,
125 uint8_t dlSubBandOffset, uint16_t dlSubBandwidth,
126 uint8_t ulSubBandOffset, uint16_t ulSubBandwidth,
127 std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
128 virtual ~LteHardFrTestCase ();
129
130private:
131 virtual void DoRun (void);
132
133 std::string m_schedulerType;
134
137
140};
141
150{
151public:
169 LteStrictFrTestCase (std::string name, uint32_t userNum,
170 std::string schedulerType,
171 uint16_t dlBandwidth, uint16_t ulBandwidth,
172 uint16_t dlCommonSubBandwidth, uint8_t dlEdgeSubBandOffset, uint16_t dlEdgeSubBandwidth,
173 uint16_t ulCommonSubBandwidth, uint8_t ulEdgeSubBandOffset, uint16_t ulEdgeSubBandwidth,
174 std::vector<bool> availableDlRb, std::vector<bool> availableUlRb);
175 virtual ~LteStrictFrTestCase ();
176
177private:
178 virtual void DoRun (void);
179
180 std::string m_schedulerType;
181
185
189};
190
201{
202public:
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
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
261protected:
262 virtual void DoRun (void);
263
264 std::string m_schedulerType;
265
266 uint16_t m_dlBandwidth;
267 uint16_t m_ulBandwidth;
268
271
273 std::vector<bool> m_expectedDlRb;
276
278 std::vector<bool> m_expectedUlRb;
281
282};
283
291{
292public:
299 LteStrictFrAreaTestCase (std::string name, std::string schedulerType);
300 virtual ~LteStrictFrAreaTestCase ();
301
302private:
303 virtual void DoRun (void);
304};
305
313{
314public:
321 LteSoftFrAreaTestCase (std::string name, std::string schedulerType);
322 virtual ~LteSoftFrAreaTestCase ();
323
324private:
325 virtual void DoRun (void);
326
327};
328
336{
337public:
344 LteSoftFfrAreaTestCase (std::string name, std::string schedulerType);
345 virtual ~LteSoftFfrAreaTestCase ();
346
347private:
348 virtual void DoRun (void);
349
350};
351
359{
360public:
367 LteEnhancedFfrAreaTestCase (std::string name, std::string schedulerType);
369
370private:
371 virtual void DoRun (void);
372
373};
374
382{
383public:
390 LteDistributedFfrAreaTestCase (std::string name, std::string schedulerType);
392
393private:
394 virtual void DoRun (void);
395
396};
397
398#endif /* LTE_TEST_DOWNLINK_FR_H */
Lte Distributed Ffr Area Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
LteDistributedFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Lte Enhanced Ffr Area Test Case.
virtual void DoRun(void)
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.
virtual void DoRun(void)
Implementation to actually run this TestCase.
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?
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.
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
virtual void DoRun(void)
Implementation to actually run this TestCase.
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.
uint8_t m_dlSubBandwidth
the DL subband width
virtual void DoRun(void)
Implementation to actually run this TestCase.
std::string m_schedulerType
the scheduler type
Lte Soft Ffr Area Test Case.
virtual void DoRun(void)
Implementation to actually run this TestCase.
LteSoftFfrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
Lte Soft Fr Area Test Case.
LteSoftFrAreaTestCase(std::string name, std::string schedulerType)
Constructor.
virtual void DoRun(void)
Implementation to actually run this TestCase.
virtual void DoRun(void)
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.
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.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
encapsulates test code
Definition: test.h:994
A suite of tests to run.
Definition: test.h:1188
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
Every class exported by the ns3 library is enclosed in the ns3 namespace.
list x
Random number samples.