A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
61  // inherited from Object
62  static TypeId GetTypeId (void);
63  virtual void DoInitialize (void);
64  virtual void DoDispose (void);
65 
66  void SetPcmax (double value);
67  double GetPcmax ();
68 
69  void SetTxPower (double value);
70  void ConfigureReferenceSignalPower (int8_t referenceSignalPower);
71 
72  void SetCellId (uint16_t cellId);
73  void SetRnti (uint16_t rnti);
74 
75  void SetPoNominalPusch (int16_t value);
76  void SetPoUePusch (int16_t value);
77  void SetAlpha (double value);
78 
79  void SetRsrp (double value);
80  void ReportTpc (uint8_t tpc);
81 
82  void CalculatePuschTxPower ();
83  void CalculatePucchTxPower ();
84  void CalculateSrsTxPower ();
85 
86  double GetPuschTxPower (std::vector <int> rb);
87  double GetPucchTxPower (std::vector <int> rb);
88  double GetSrsTxPower (std::vector <int> rb);
89 
90 private:
91  void SetSubChannelMask (std::vector <int> mask);
92 
93  double m_txPower;
94  double m_Pcmax;
95  double m_Pcmin;
96 
100 
102  bool m_rsrpSet;
103  double m_rsrp;
104 
105  std::vector<int16_t> m_PoNominalPusch;
106  std::vector<int16_t> m_PoUePusch;
107 
108  int16_t m_PsrsOffset;
109 
110  uint16_t m_M_Pusch;
111  std::vector<double> m_alpha;
112  double m_pathLoss;
113  double m_deltaTF;
114 
115  std::vector<int8_t> m_deltaPusch;
116  double m_fc;
117 
118  uint16_t m_srsBandwidth;
119 
122 
123  uint16_t m_cellId;
124  uint16_t m_rnti;
132 
133 };
134 
135 
136 }
137 
138 #endif /* LTE_UE_POWER_CONTROL_H */
void SetTxPower(double value)
void SetSubChannelMask(std::vector< int > mask)
std::vector< int16_t > m_PoNominalPusch
void SetCellId(uint16_t cellId)
double GetPuschTxPower(std::vector< int > rb)
void SetPoUePusch(int16_t value)
std::vector< int8_t > m_deltaPusch
TracedCallback< uint16_t, uint16_t, double > m_reportPucchTxPower
TracedCallback< uint16_t, uint16_t, double > m_reportSrsTxPower
virtual void DoInitialize(void)
This method is called only once by Object::Initialize.
TracedCallback< uint16_t, uint16_t, double > m_reportPuschTxPower
Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower...
static TypeId GetTypeId(void)
std::vector< int16_t > m_PoUePusch
void SetPoNominalPusch(int16_t value)
std::vector< double > m_alpha
This class realizes Uplink Power Control functionality.
void SetRnti(uint16_t rnti)
double GetPucchTxPower(std::vector< int > rb)
double GetSrsTxPower(std::vector< int > rb)
a base class which provides memory management and object aggregation
Definition: object.h:64
void ConfigureReferenceSignalPower(int8_t referenceSignalPower)
a unique identifier for an interface.
Definition: type-id.h:49
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...