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 
31 namespace ns3 {
32 
54 class LteUePowerControl : public Object
55 {
56 public:
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);
139  void ReportTpc (uint8_t tpc);
140 
142  void CalculatePuschTxPower ();
144  void CalculatePucchTxPower ();
146  void CalculateSrsTxPower ();
147 
154  double GetPuschTxPower (std::vector <int> rb);
161  double GetPucchTxPower (std::vector <int> rb);
168  double GetSrsTxPower (std::vector <int> rb);
169 
177  typedef void (* TxPowerTracedCallback)
178  (uint16_t cellId, uint16_t rnti, double power);
179 
180 private:
186  void SetSubChannelMask (std::vector <int> mask);
187 
188  double m_txPower;
189  double m_Pcmax;
190  double m_Pcmin;
191 
195 
197  bool m_rsrpSet;
198  double m_rsrp;
199 
200  std::vector<int16_t> m_PoNominalPusch;
201  std::vector<int16_t> m_PoUePusch;
202 
203  int16_t m_PsrsOffset;
204 
205  uint16_t m_M_Pusch;
206  std::vector<double> m_alpha;
207  double m_pathLoss;
208  double m_deltaTF;
209 
210  std::vector<int8_t> m_deltaPusch;
211  double m_fc;
212 
213  uint16_t m_srsBandwidth;
214 
217 
218  uint16_t m_cellId;
219  uint16_t m_rnti;
220 
235 
236 };
237 
238 
239 }
240 
241 #endif /* LTE_UE_POWER_CONTROL_H */
double m_pathLoss
path loss value
void SetTxPower(double value)
Set transmit power function.
void SetSubChannelMask(std::vector< int > mask)
Set subchannel mask function.
std::vector< int16_t > m_PoNominalPusch
PO nominal PUSCH.
void SetCellId(uint16_t cellId)
Set the cell ID function.
void SetAlpha(double value)
Set alpha function.
void CalculateSrsTxPower()
Calculate SRS transmit power function.
double m_referenceSignalPower
reference signal power
double GetPuschTxPower(std::vector< int > rb)
Get PUSCH transmit power function.
uint16_t m_M_Pusch
size of DL RB list
void SetPoUePusch(int16_t value)
Set PO UE PUSCH function.
std::vector< int8_t > m_deltaPusch
delta PUSCH
bool m_closedLoop
is closed loop
uint16_t m_srsBandwidth
SRS bandwidth.
double m_curPucchTxPower
current PUCCH transmit power
TracedCallback< uint16_t, uint16_t, double > m_reportPucchTxPower
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower...
void SetPcmax(double value)
Set PC maximum function.
double m_Pcmax
PC maximum.
TracedCallback< uint16_t, uint16_t, double > m_reportSrsTxPower
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower...
virtual void DoInitialize(void)
Initialize() implementation.
TracedCallback< uint16_t, uint16_t, double > m_reportPuschTxPower
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower...
double m_curPuschTxPower
current PUSCH transmit power
static TypeId GetTypeId(void)
Get the type ID.
std::vector< int16_t > m_PoUePusch
PO US PUSCH.
void CalculatePucchTxPower()
Calculate PUCCH transmit power function.
double m_Pcmin
PC minimum.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
int16_t m_PsrsOffset
PSRS offset.
void SetPoNominalPusch(int16_t value)
Set PO nominal PUSCH function.
std::vector< double > m_alpha
alpha values
void CalculatePuschTxPower()
Calculate PUSCH transmit power function.
double GetPcmax()
Get PC maximum function.
double m_curSrsTxPower
current SRS transmit power
This class realizes Uplink Power Control functionality.
void SetRnti(uint16_t rnti)
Set the RNTI function.
void(* TxPowerTracedCallback)(uint16_t cellId, uint16_t rnti, double power)
TracedCallback signature for uplink transmit power.
double GetPucchTxPower(std::vector< int > rb)
Get PUCCH transmit power function.
double GetSrsTxPower(std::vector< int > rb)
Get SRS transmit power function.
double m_txPower
transmit power
void SetRsrp(double value)
Set RSRP function.
A base class which provides memory management and object aggregation.
Definition: object.h:87
void ConfigureReferenceSignalPower(int8_t referenceSignalPower)
Configure reference signal power function.
a unique identifier for an interface.
Definition: type-id.h:58
bool m_accumulationEnabled
accumulation enabled
void ReportTpc(uint8_t tpc)
Set RSRP function.
virtual void DoDispose(void)
Destructor implementation.