A Discrete-Event Network Simulator
API
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ns3::LteUePowerControl Class Reference

This class realizes Uplink Power Control functionality. More...

#include "lte-ue-power-control.h"

+ Inheritance diagram for ns3::LteUePowerControl:

Public Types

typedef void(* TxPowerTracedCallback) (uint16_t cellId, uint16_t rnti, double power)
 TracedCallback signature for uplink transmit power. More...
 

Public Member Functions

 LteUePowerControl ()
 
virtual ~LteUePowerControl ()
 
void CalculatePucchTxPower ()
 Calculate PUCCH transmit power function. More...
 
void CalculatePuschTxPower ()
 Calculate PUSCH transmit power function. More...
 
void CalculateSrsTxPower ()
 Calculate SRS transmit power function. More...
 
void ConfigureReferenceSignalPower (int8_t referenceSignalPower)
 Configure reference signal power function. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
double GetPcmax ()
 Get PC maximum function. More...
 
double GetPucchTxPower (std::vector< int > rb)
 Get PUCCH transmit power function. More...
 
double GetPuschTxPower (std::vector< int > rb)
 Get PUSCH transmit power function. More...
 
double GetSrsTxPower (std::vector< int > rb)
 Get SRS transmit power function. More...
 
void ReportTpc (uint8_t tpc)
 Set RSRP function. More...
 
void SetAlpha (double value)
 Set alpha function. More...
 
void SetCellId (uint16_t cellId)
 Set the cell ID function. More...
 
void SetPcmax (double value)
 Set PC maximum function. More...
 
void SetPoNominalPusch (int16_t value)
 Set PO nominal PUSCH function. More...
 
void SetPoUePusch (int16_t value)
 Set PO UE PUSCH function. More...
 
void SetRnti (uint16_t rnti)
 Set the RNTI function. More...
 
void SetRsrp (double value)
 Set RSRP function. More...
 
void SetTxPower (double value)
 Set transmit power function. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

void SetSubChannelMask (std::vector< int > mask)
 Set subchannel mask function. More...
 

Private Attributes

bool m_accumulationEnabled
 accumulation enabled More...
 
std::vector< double > m_alpha
 alpha values More...
 
uint16_t m_cellId
 cell ID More...
 
bool m_closedLoop
 is closed loop More...
 
double m_curPucchTxPower
 current PUCCH transmit power More...
 
double m_curPuschTxPower
 current PUSCH transmit power More...
 
double m_curSrsTxPower
 current SRS transmit power More...
 
std::vector< int8_t > m_deltaPusch
 delta PUSCH More...
 
double m_deltaTF
 delta TF More...
 
double m_fc
 FC. More...
 
uint16_t m_M_Pusch
 size of DL RB list More...
 
double m_pathLoss
 path loss value More...
 
double m_Pcmax
 PC maximum. More...
 
double m_Pcmin
 PC minimum. More...
 
std::vector< int16_t > m_PoNominalPusch
 PO nominal PUSCH. More...
 
std::vector< int16_t > m_PoUePusch
 PO US PUSCH. More...
 
int16_t m_PsrsOffset
 PSRS offset. More...
 
double m_referenceSignalPower
 reference signal power More...
 
TracedCallback< uint16_t, uint16_t, double > m_reportPucchTxPower
 Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower. More...
 
TracedCallback< uint16_t, uint16_t, double > m_reportPuschTxPower
 Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower. More...
 
TracedCallback< uint16_t, uint16_t, double > m_reportSrsTxPower
 Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower. More...
 
uint16_t m_rnti
 RNTI. More...
 
double m_rsrp
 RSRP value. More...
 
bool m_rsrpSet
 is RSRP set? More...
 
uint16_t m_srsBandwidth
 SRS bandwidth. More...
 
double m_txPower
 transmit power More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

This class realizes Uplink Power Control functionality.


Introspection did not find any typical Config paths.

When LteUePhy is about sending PUSCH/PUCCH/SRS it should ask LteUePowerControl for current channel TX power level and then use it while creating SpectrumValue for Uplink Transmission

LteUePowerControl computes TX power level for PUSCH and SRS. PUCCH is realized in ideal way and PUSCH do not use any resources, so there is no need to compute power for that channel

LteUePowerControlcomputes TX power based on some preconfigured parameters and current Path-loss. Path-loss is computed as difference between current RSRP and referenceSignalPower level. Current RSRP is passed to LteUePowerControl by LteUePhy. referenceSignalPower is configurable by attribute system

Moreover, LteUePhy pass all received TPC values to LteUePowerControl, what is a part of Closed Loop Power Control functionality


Attributes

TraceSources

Size of this type is 312 bytes (on a 64-bit architecture).

Definition at line 54 of file lte-ue-power-control.h.

Member Typedef Documentation

◆ TxPowerTracedCallback

typedef void(* ns3::LteUePowerControl::TxPowerTracedCallback) (uint16_t cellId, uint16_t rnti, double power)

TracedCallback signature for uplink transmit power.

Parameters
[in]cellIdCell identifier.
[in]rntiThe C-RNTI identifying the UE.
[in]powerThe current TX power.

Definition at line 178 of file lte-ue-power-control.h.

Constructor & Destructor Documentation

◆ LteUePowerControl()

ns3::LteUePowerControl::LteUePowerControl ( )

◆ ~LteUePowerControl()

ns3::LteUePowerControl::~LteUePowerControl ( )
virtual

Definition at line 53 of file lte-ue-power-control.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ CalculatePucchTxPower()

void ns3::LteUePowerControl::CalculatePucchTxPower ( )

Calculate PUCCH transmit power function.

Definition at line 390 of file lte-ue-power-control.cc.

References m_curPucchTxPower, m_curPuschTxPower, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by GetPucchTxPower().

◆ CalculatePuschTxPower()

void ns3::LteUePowerControl::CalculatePuschTxPower ( )

Calculate PUSCH transmit power function.

Definition at line 362 of file lte-ue-power-control.cc.

References m_alpha, m_curPuschTxPower, m_deltaTF, m_fc, m_M_Pusch, m_pathLoss, m_Pcmax, m_Pcmin, m_PoNominalPusch, m_PoUePusch, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by GetPuschTxPower().

◆ CalculateSrsTxPower()

void ns3::LteUePowerControl::CalculateSrsTxPower ( )

Calculate SRS transmit power function.

Definition at line 398 of file lte-ue-power-control.cc.

References m_alpha, m_curSrsTxPower, m_deltaTF, m_fc, m_M_Pusch, m_pathLoss, m_Pcmax, m_Pcmin, m_PoNominalPusch, m_PoUePusch, m_PsrsOffset, m_srsBandwidth, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by GetSrsTxPower().

◆ ConfigureReferenceSignalPower()

void ns3::LteUePowerControl::ConfigureReferenceSignalPower ( int8_t  referenceSignalPower)

Configure reference signal power function.

Parameters
referenceSignalPowerthe reference signal power

Definition at line 160 of file lte-ue-power-control.cc.

References m_referenceSignalPower, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::DoConfigureReferenceSignalPower().

◆ DoDispose()

void ns3::LteUePowerControl::DoDispose ( void  )
virtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 65 of file lte-ue-power-control.cc.

References NS_LOG_FUNCTION.

◆ DoInitialize()

void ns3::LteUePowerControl::DoInitialize ( void  )
virtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 59 of file lte-ue-power-control.cc.

References NS_LOG_FUNCTION.

◆ GetPcmax()

double ns3::LteUePowerControl::GetPcmax ( )

Get PC maximum function.

Returns
the PC maximum value

Definition at line 143 of file lte-ue-power-control.cc.

References m_Pcmax, and NS_LOG_FUNCTION.

◆ GetPucchTxPower()

double ns3::LteUePowerControl::GetPucchTxPower ( std::vector< int >  rb)

Get PUCCH transmit power function.

Parameters
rbunused
Returns
the PUCCH transmit power

Definition at line 435 of file lte-ue-power-control.cc.

References CalculatePucchTxPower(), m_cellId, m_curPucchTxPower, m_reportPucchTxPower, m_rnti, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SubframeIndication().

◆ GetPuschTxPower()

double ns3::LteUePowerControl::GetPuschTxPower ( std::vector< int >  rb)

Get PUSCH transmit power function.

Parameters
rbthe DL RB list
Returns
the PUSCH transmit power

Definition at line 422 of file lte-ue-power-control.cc.

References CalculatePuschTxPower(), m_cellId, m_curPuschTxPower, m_M_Pusch, m_reportPuschTxPower, m_rnti, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SubframeIndication().

◆ GetSrsTxPower()

double ns3::LteUePowerControl::GetSrsTxPower ( std::vector< int >  rb)

Get SRS transmit power function.

Parameters
rbthe DL RB list
Returns
the SRS transmit power

Definition at line 447 of file lte-ue-power-control.cc.

References CalculateSrsTxPower(), m_cellId, m_curSrsTxPower, m_reportSrsTxPower, m_rnti, m_srsBandwidth, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SendSrs().

◆ GetTypeId()

TypeId ns3::LteUePowerControl::GetTypeId ( void  )
static

◆ ReportTpc()

void ns3::LteUePowerControl::ReportTpc ( uint8_t  tpc)

Set RSRP function.

Parameters
tpcthe TPC to report

Definition at line 269 of file lte-ue-power-control.cc.

References m_accumulationEnabled, m_closedLoop, m_curPuschTxPower, m_deltaPusch, m_fc, m_Pcmax, m_Pcmin, NS_FATAL_ERROR, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by ns3::LteUePhy::ReceiveLteControlMessageList().

◆ SetAlpha()

void ns3::LteUePowerControl::SetAlpha ( double  value)

Set alpha function.

Parameters
valuethe alpha value to set

Definition at line 216 of file lte-ue-power-control.cc.

References m_alpha, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

◆ SetCellId()

void ns3::LteUePowerControl::SetCellId ( uint16_t  cellId)

Set the cell ID function.

Parameters
cellIdthe cell ID

Definition at line 167 of file lte-ue-power-control.cc.

References m_cellId, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::DoSetRnti().

◆ SetPcmax()

void ns3::LteUePowerControl::SetPcmax ( double  value)

Set PC maximum function.

Parameters
valuethe PC maximum value

Definition at line 136 of file lte-ue-power-control.cc.

References m_Pcmax, and NS_LOG_FUNCTION.

◆ SetPoNominalPusch()

void ns3::LteUePowerControl::SetPoNominalPusch ( int16_t  value)

Set PO nominal PUSCH function.

Parameters
valuethe value to set

Definition at line 180 of file lte-ue-power-control.cc.

References m_PoNominalPusch, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

◆ SetPoUePusch()

void ns3::LteUePowerControl::SetPoUePusch ( int16_t  value)

Set PO UE PUSCH function.

Parameters
valuethe value to set

Definition at line 199 of file lte-ue-power-control.cc.

References m_PoUePusch, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

◆ SetRnti()

void ns3::LteUePowerControl::SetRnti ( uint16_t  rnti)

Set the RNTI function.

Parameters
rntithe RNTI

Definition at line 173 of file lte-ue-power-control.cc.

References m_rnti, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::DoSetRnti().

◆ SetRsrp()

void ns3::LteUePowerControl::SetRsrp ( double  value)

Set RSRP function.

Parameters
valuethe RSRP value to set

Definition at line 252 of file lte-ue-power-control.cc.

References m_pathLoss, m_referenceSignalPower, m_rsrp, m_rsrpSet, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::ReportRsReceivedPower().

◆ SetSubChannelMask()

void ns3::LteUePowerControl::SetSubChannelMask ( std::vector< int >  mask)
private

Set subchannel mask function.

Parameters
[in]maskthe subchannel mask

Definition at line 355 of file lte-ue-power-control.cc.

References m_M_Pusch, and NS_LOG_FUNCTION.

◆ SetTxPower()

void ns3::LteUePowerControl::SetTxPower ( double  value)

Set transmit power function.

Parameters
valuethe transmit power value

Definition at line 150 of file lte-ue-power-control.cc.

References m_curPucchTxPower, m_curPuschTxPower, m_curSrsTxPower, m_txPower, and NS_LOG_FUNCTION.

Referenced by ns3::LteUePhy::SetTxPower().

Member Data Documentation

◆ m_accumulationEnabled

bool ns3::LteUePowerControl::m_accumulationEnabled
private

accumulation enabled

Definition at line 216 of file lte-ue-power-control.h.

Referenced by GetTypeId(), and ReportTpc().

◆ m_alpha

std::vector<double> ns3::LteUePowerControl::m_alpha
private

alpha values

Definition at line 206 of file lte-ue-power-control.h.

Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and SetAlpha().

◆ m_cellId

uint16_t ns3::LteUePowerControl::m_cellId
private

◆ m_closedLoop

bool ns3::LteUePowerControl::m_closedLoop
private

is closed loop

Definition at line 215 of file lte-ue-power-control.h.

Referenced by GetTypeId(), and ReportTpc().

◆ m_curPucchTxPower

double ns3::LteUePowerControl::m_curPucchTxPower
private

current PUCCH transmit power

Definition at line 193 of file lte-ue-power-control.h.

Referenced by CalculatePucchTxPower(), GetPucchTxPower(), LteUePowerControl(), and SetTxPower().

◆ m_curPuschTxPower

double ns3::LteUePowerControl::m_curPuschTxPower
private

current PUSCH transmit power

Definition at line 192 of file lte-ue-power-control.h.

Referenced by CalculatePucchTxPower(), CalculatePuschTxPower(), GetPuschTxPower(), LteUePowerControl(), ReportTpc(), and SetTxPower().

◆ m_curSrsTxPower

double ns3::LteUePowerControl::m_curSrsTxPower
private

current SRS transmit power

Definition at line 194 of file lte-ue-power-control.h.

Referenced by CalculateSrsTxPower(), GetSrsTxPower(), LteUePowerControl(), and SetTxPower().

◆ m_deltaPusch

std::vector<int8_t> ns3::LteUePowerControl::m_deltaPusch
private

delta PUSCH

Definition at line 210 of file lte-ue-power-control.h.

Referenced by ReportTpc().

◆ m_deltaTF

double ns3::LteUePowerControl::m_deltaTF
private

delta TF

Definition at line 208 of file lte-ue-power-control.h.

Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and LteUePowerControl().

◆ m_fc

double ns3::LteUePowerControl::m_fc
private

◆ m_M_Pusch

uint16_t ns3::LteUePowerControl::m_M_Pusch
private

◆ m_pathLoss

double ns3::LteUePowerControl::m_pathLoss
private

path loss value

Definition at line 207 of file lte-ue-power-control.h.

Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), LteUePowerControl(), and SetRsrp().

◆ m_Pcmax

double ns3::LteUePowerControl::m_Pcmax
private

◆ m_Pcmin

double ns3::LteUePowerControl::m_Pcmin
private

PC minimum.

Definition at line 190 of file lte-ue-power-control.h.

Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), GetTypeId(), and ReportTpc().

◆ m_PoNominalPusch

std::vector<int16_t> ns3::LteUePowerControl::m_PoNominalPusch
private

PO nominal PUSCH.

Definition at line 200 of file lte-ue-power-control.h.

Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and SetPoNominalPusch().

◆ m_PoUePusch

std::vector<int16_t> ns3::LteUePowerControl::m_PoUePusch
private

PO US PUSCH.

Definition at line 201 of file lte-ue-power-control.h.

Referenced by CalculatePuschTxPower(), CalculateSrsTxPower(), and SetPoUePusch().

◆ m_PsrsOffset

int16_t ns3::LteUePowerControl::m_PsrsOffset
private

PSRS offset.

Definition at line 203 of file lte-ue-power-control.h.

Referenced by CalculateSrsTxPower(), and GetTypeId().

◆ m_referenceSignalPower

double ns3::LteUePowerControl::m_referenceSignalPower
private

reference signal power

Definition at line 196 of file lte-ue-power-control.h.

Referenced by ConfigureReferenceSignalPower(), and SetRsrp().

◆ m_reportPucchTxPower

TracedCallback<uint16_t, uint16_t, double> ns3::LteUePowerControl::m_reportPucchTxPower
private

Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.

Definition at line 229 of file lte-ue-power-control.h.

Referenced by GetPucchTxPower(), and GetTypeId().

◆ m_reportPuschTxPower

TracedCallback<uint16_t, uint16_t, double> ns3::LteUePowerControl::m_reportPuschTxPower
private

Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.

Definition at line 224 of file lte-ue-power-control.h.

Referenced by GetPuschTxPower(), and GetTypeId().

◆ m_reportSrsTxPower

TracedCallback<uint16_t, uint16_t, double> ns3::LteUePowerControl::m_reportSrsTxPower
private

Trace information regarding Uplink TxPower uint16_t cellId, uint16_t rnti, double txPower.

Definition at line 234 of file lte-ue-power-control.h.

Referenced by GetSrsTxPower(), and GetTypeId().

◆ m_rnti

uint16_t ns3::LteUePowerControl::m_rnti
private

◆ m_rsrp

double ns3::LteUePowerControl::m_rsrp
private

RSRP value.

Definition at line 198 of file lte-ue-power-control.h.

Referenced by SetRsrp().

◆ m_rsrpSet

bool ns3::LteUePowerControl::m_rsrpSet
private

is RSRP set?

Definition at line 197 of file lte-ue-power-control.h.

Referenced by LteUePowerControl(), and SetRsrp().

◆ m_srsBandwidth

uint16_t ns3::LteUePowerControl::m_srsBandwidth
private

SRS bandwidth.

Definition at line 213 of file lte-ue-power-control.h.

Referenced by CalculateSrsTxPower(), and GetSrsTxPower().

◆ m_txPower

double ns3::LteUePowerControl::m_txPower
private

transmit power

Definition at line 188 of file lte-ue-power-control.h.

Referenced by LteUePowerControl(), and SetTxPower().


The documentation for this class was generated from the following files: