23 #include <ns3/boolean.h>
24 #include <ns3/double.h>
25 #include <ns3/integer.h>
76 TypeId(
"ns3::LteUePowerControl")
80 .AddAttribute(
"ClosedLoop",
81 "If true Closed Loop mode will be active, otherwise Open Loop",
85 .AddAttribute(
"AccumulationEnabled",
86 "If true TCP accumulation mode will be active, otherwise absolute mode "
91 .AddAttribute(
"Alpha",
92 "Value of Alpha parameter",
95 MakeDoubleChecker<double>())
96 .AddAttribute(
"Pcmax",
97 "Max Transmission power in dBm, Default value 23 dBm"
98 "TS36.101 section 6.2.3",
101 MakeDoubleChecker<double>())
102 .AddAttribute(
"Pcmin",
103 "Min Transmission power in dBm, Default value -40 dBm"
104 "TS36.101 section 6.2.3",
107 MakeDoubleChecker<double>())
108 .AddAttribute(
"PoNominalPusch",
109 "P_O_NOMINAL_PUSCH INT (-126 ... 24), Default value -80",
112 MakeIntegerChecker<int16_t>())
113 .AddAttribute(
"PoUePusch",
114 "P_O_UE_PUSCH INT(-8...7), Default value 0",
117 MakeIntegerChecker<int16_t>())
118 .AddAttribute(
"PsrsOffset",
119 "P_SRS_OFFSET INT(0...15), Default value 7",
122 MakeIntegerChecker<int16_t>())
123 .AddTraceSource(
"ReportPuschTxPower",
124 "Report PUSCH TxPower in dBm",
126 "ns3::LteUePowerControl::TxPowerTracedCallback")
127 .AddTraceSource(
"ReportPucchTxPower",
128 "Report PUCCH TxPower in dBm",
130 "ns3::LteUePowerControl::TxPowerTracedCallback")
131 .AddTraceSource(
"ReportSrsTxPower",
132 "Report SRS TxPower in dBm",
134 "ns3::LteUePowerControl::TxPowerTracedCallback");
225 uint32_t temp = value * 10;
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Hold a signed integer type.
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_Pcmax
PC maximum.
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.
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.
~LteUePowerControl() override
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.
bool m_rsrpSet
is RSRP set?
double m_rsrp
RSRP value in dBm.
double m_Pcmin
PC minimum.
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.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeBooleanChecker()
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)