A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lte-ue-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_UE_POWER_CONTROL_H
22#define LTE_UE_POWER_CONTROL_H
23
24#include <ns3/object.h>
25#include <ns3/ptr.h>
26#include <ns3/traced-callback.h>
27
28#include <vector>
29
30namespace ns3
31{
32
55{
56 public:
58 ~LteUePowerControl() override;
59
64 static TypeId GetTypeId();
65 // inherited from Object
66 void DoInitialize() override;
67 void DoDispose() override;
68
74 void SetPcmax(double value);
80 double GetPcmax();
81
87 void SetTxPower(double value);
93 void ConfigureReferenceSignalPower(int8_t referenceSignalPower);
94
100 void SetCellId(uint16_t cellId);
106 void SetRnti(uint16_t rnti);
107
113 void SetPoNominalPusch(int16_t value);
119 void SetPoUePusch(int16_t value);
125 void SetAlpha(double value);
126
132 void SetRsrp(double value);
141 void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient);
147 void ReportTpc(uint8_t tpc);
148
154 void CalculateSrsTxPower();
155
162 double GetPuschTxPower(std::vector<int> rb);
169 double GetPucchTxPower(std::vector<int> rb);
176 double GetSrsTxPower(std::vector<int> rb);
177
185 typedef void (*TxPowerTracedCallback)(uint16_t cellId, uint16_t rnti, double power);
186
187 private:
193 void SetSubChannelMask(std::vector<int> mask);
194
195 double m_txPower;
196 double m_Pcmax;
197 double m_Pcmin;
198
202
205 double m_rsrp;
206
207 std::vector<int16_t> m_PoNominalPusch;
208 std::vector<int16_t> m_PoUePusch;
209
210 int16_t m_PsrsOffset;
211
212 uint16_t m_M_Pusch;
213 std::vector<double> m_alpha;
214 double m_pathLoss;
215 double m_deltaTF;
216
217 std::vector<int8_t> m_deltaPusch;
218 double m_fc;
219
220 uint16_t m_srsBandwidth;
221
224
225 uint16_t m_cellId;
226 uint16_t m_rnti;
248};
249
250} // namespace ns3
251
252#endif /* LTE_UE_POWER_CONTROL_H */
This class realizes Uplink Power Control functionality.
void SetPoNominalPusch(int16_t value)
Set PO nominal PUSCH function.
bool m_closedLoop
is closed loop
double m_referenceSignalPower
reference signal power in dBm
TracedCallback< uint16_t, uint16_t, double > m_reportSrsTxPower
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.
void DoDispose() override
Destructor implementation.
TracedCallback< uint16_t, uint16_t, double > m_reportPucchTxPower
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.
void SetCellId(uint16_t cellId)
Set the cell ID function.
double m_txPower
transmit power
double m_curPucchTxPower
current PUCCH transmit power
void SetPoUePusch(int16_t value)
Set PO UE PUSCH function.
void(* TxPowerTracedCallback)(uint16_t cellId, uint16_t rnti, double power)
TracedCallback signature for uplink transmit power.
std::vector< double > m_alpha
alpha values
std::vector< int16_t > m_PoUePusch
PO US PUSCH.
void SetRsrp(double value)
Set RSRP function.
void SetPcmax(double value)
Set PC maximum function.
double m_pathLoss
path loss value in dB
void ConfigureReferenceSignalPower(int8_t referenceSignalPower)
Configure reference signal power (dBm) function.
void DoInitialize() override
Initialize() implementation.
std::vector< int16_t > m_PoNominalPusch
PO nominal PUSCH.
void SetRnti(uint16_t rnti)
Set the RNTI function.
double GetPucchTxPower(std::vector< int > rb)
Get PUCCH transmit power function.
int16_t m_PsrsOffset
PSRS offset.
static TypeId GetTypeId()
Get the type ID.
double m_curPuschTxPower
current PUSCH transmit power
void SetTxPower(double value)
Set transmit power function.
std::vector< int8_t > m_deltaPusch
delta PUSCH
void CalculatePuschTxPower()
Calculate PUSCH transmit power function.
double GetPcmax()
Get PC maximum function.
void SetSubChannelMask(std::vector< int > mask)
Set subchannel mask function.
void SetRsrpFilterCoefficient(uint8_t rsrpFilterCoefficient)
Set RSRP function.
uint16_t m_srsBandwidth
SRS bandwidth.
uint8_t m_pcRsrpFilterCoefficient
The RsrpFilterCoefficient attribute.
void CalculatePucchTxPower()
Calculate PUCCH transmit power function.
double GetPuschTxPower(std::vector< int > rb)
Get PUSCH transmit power function.
uint16_t m_M_Pusch
size of DL RB list
void ReportTpc(uint8_t tpc)
Set RSRP function.
double GetSrsTxPower(std::vector< int > rb)
Get SRS transmit power function.
void SetAlpha(double value)
Set alpha function.
double m_rsrp
RSRP value in dBm.
void CalculateSrsTxPower()
Calculate SRS transmit power function.
double m_curSrsTxPower
current SRS transmit power
TracedCallback< uint16_t, uint16_t, double > m_reportPuschTxPower
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.
bool m_accumulationEnabled
accumulation enabled
A base class which provides memory management and object aggregation.
Definition: object.h:89
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.