A Discrete-Event Network Simulator
API
lte-ue-power-control.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_UE_POWER_CONTROL_H
23#define LTE_UE_POWER_CONTROL_H
24
25#include <ns3/ptr.h>
26#include <ns3/traced-callback.h>
27#include <ns3/object.h>
28#include <vector>
29
30
31namespace ns3 {
32
55{
56public:
57
59 virtual ~LteUePowerControl ();
60
65 static TypeId GetTypeId (void);
66 // inherited from Object
67 virtual void DoInitialize (void);
68 virtual void DoDispose (void);
69
75 void SetPcmax (double value);
81 double GetPcmax ();
82
88 void SetTxPower (double value);
94 void ConfigureReferenceSignalPower (int8_t referenceSignalPower);
95
101 void SetCellId (uint16_t cellId);
107 void SetRnti (uint16_t rnti);
108
114 void SetPoNominalPusch (int16_t value);
120 void SetPoUePusch (int16_t value);
126 void SetAlpha (double value);
127
133 void SetRsrp (double value);
142 void SetRsrpFilterCoefficient (uint8_t rsrpFilterCoefficient);
148 void ReportTpc (uint8_t tpc);
149
151 void CalculatePuschTxPower ();
153 void CalculatePucchTxPower ();
155 void CalculateSrsTxPower ();
156
163 double GetPuschTxPower (std::vector <int> rb);
170 double GetPucchTxPower (std::vector <int> rb);
177 double GetSrsTxPower (std::vector <int> rb);
178
186 typedef void (* TxPowerTracedCallback)
187 (uint16_t cellId, uint16_t rnti, double power);
188
189private:
195 void SetSubChannelMask (std::vector <int> mask);
196
197 double m_txPower;
198 double m_Pcmax;
199 double m_Pcmin;
200
204
207 double m_rsrp;
208
209 std::vector<int16_t> m_PoNominalPusch;
210 std::vector<int16_t> m_PoUePusch;
211
212 int16_t m_PsrsOffset;
213
214 uint16_t m_M_Pusch;
215 std::vector<double> m_alpha;
216 double m_pathLoss;
217 double m_deltaTF;
218
219 std::vector<int8_t> m_deltaPusch;
220 double m_fc;
221
222 uint16_t m_srsBandwidth;
223
226
227 uint16_t m_cellId;
228 uint16_t m_rnti;
250
251};
252
253
254}
255
256#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.
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.
virtual void DoDispose(void)
Destructor 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.
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.
virtual void DoInitialize(void)
Initialize() implementation.
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.
static TypeId GetTypeId(void)
Get the type ID.
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:88
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.