A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-test-uplink-power-control.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_UPLINK_POWER_CONTROL_H
22#define LTE_TEST_UPLINK_POWER_CONTROL_H
23
24#include "ns3/nstime.h"
25#include "ns3/ptr.h"
26#include "ns3/spectrum-test.h"
27#include "ns3/spectrum-value.h"
28#include "ns3/test.h"
29
30using namespace ns3;
31
32namespace ns3
33{
34class LteFfrSimple;
36class MobilityModel;
37} // namespace ns3
38
39/**
40 * \ingroup lte-test
41 *
42 * \brief Test 1.1 Uplink Power Control
43 */
45{
46 public:
48};
49
50/**
51 * \ingroup lte-test
52 *
53 * \brief Lte Uplink Power Control Test Case
54 */
56{
57 public:
58 /**
59 * Constructor
60 *
61 * \param name the reference name
62 */
63 LteUplinkPowerControlTestCase(std::string name);
65
66 /**
67 * Teleport UE funcction
68 *
69 * \param x the X position
70 * \param y the Y position
71 * \param expectedPuschTxPower the expected PUSCH transmit power
72 * \param expectedPucchTxPower the expected PUCCH transmit power
73 * \param expectedSrsTxPower the expected SRS transmit power
74 */
75 void TeleportUe(uint32_t x,
76 uint32_t y,
77 double expectedPuschTxPower,
78 double expectedPucchTxPower,
79 double expectedSrsTxPower);
80
81 /**
82 * Set TPC configuration funcction
83 *
84 * \param tpc the TPC
85 * \param tpcNum the TPC number
86 * \param expectedPuschTxPower the expected PUSCH transmit power
87 * \param expectedPucchTxPower the expected PUCCH transmit power
88 * \param expectedSrsTxPower the expected SRS transmit power
89 */
91 uint32_t tpcNum,
92 double expectedPuschTxPower,
93 double expectedPucchTxPower,
94 double expectedSrsTxPower);
95
96 /**
97 * PUSCH transmit power trace funcction
98 *
99 * \param cellId the cell ID
100 * \param rnti the RNTI
101 * \param txPower the transmit power
102 */
103 void PuschTxPowerTrace(uint16_t cellId, uint16_t rnti, double txPower);
104 /**
105 * PUCCH transmit power trace funcction
106 *
107 * \param cellId the cell ID
108 * \param rnti the RNTI
109 * \param txPower the transmit power
110 */
111 void PucchTxPowerTrace(uint16_t cellId, uint16_t rnti, double txPower);
112 /**
113 * SRS transmit power trace funcction
114 *
115 * \param cellId the cell ID
116 * \param rnti the RNTI
117 * \param txPower the transmit power
118 */
119 void SrsTxPowerTrace(uint16_t cellId, uint16_t rnti, double txPower);
120
121 protected:
122 void DoRun() override;
123
124 Ptr<MobilityModel> m_ueMobility; ///< UE mobility model
125 Time m_teleportTime; ///< teleport time
126
127 double m_expectedPuschTxPower; ///< expected PUSCH transmit power
128 double m_expectedPucchTxPower; ///< expected PUCCH transmit power
129 double m_expectedSrsTxPower; ///< expected SRS transmit power
130
131 Ptr<LteUePowerControl> m_ueUpc; ///< UE power control
132 bool m_accumulatedMode; ///< indicates whether accumulated mode is being used
133
135};
136
137/**
138 * \ingroup lte-test
139 *
140 * \brief Lte Uplink Open Loop Power Control Test Case
141 */
143{
144 public:
145 /**
146 * Constructor
147 *
148 * \param name the reference name
149 */
152
153 private:
154 void DoRun() override;
155};
156
157/**
158 * \ingroup lte-test
159 *
160 * \brief Lte Uplink Closed Loop Power Control Absolute Mode Test Case
161 */
163{
164 public:
165 /**
166 * Constructor
167 *
168 * \param name the reference name
169 */
172
173 private:
174 void DoRun() override;
175};
176
177/**
178 * \ingroup lte-test
179 *
180 * \brief Lte Uplink Closed Loop Power Control Accumulated Mode Test Case
181 */
183{
184 public:
185 /**
186 * Constructor
187 *
188 * \param name the reference name
189 */
192
193 private:
194 void DoRun() override;
195};
196
197#endif /* LTE_TEST_UPLINK_POWER_CONTROL_H */
Simple Frequency Reuse algorithm implementation which uses only 1 sub-band.
This class realizes Uplink Power Control functionality.
Keep track of the current position and velocity of an object.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
encapsulates test code
Definition: test.h:1061
A suite of tests to run.
Definition: test.h:1268
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.