5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrInitialAssociation Class Reference

#include "introspected-doxygen.h"

+ Inheritance diagram for ns3::NrInitialAssociation:
+ Collaboration diagram for ns3::NrInitialAssociation:

Classes

struct  AntennaArrayModels
 AntennaArrayModels struct to store copy of antenna array of gNB and UE to do beamforming later. More...
 
struct  ChannelParams
 ChannelParams struct to set channel model, pathloss model, spectral model and spectrumprop model to extract from Ue and pass to attachment process. More...
 
struct  LocalSearchParams
 LocalSearchParams struct format to keep ChannelParams, Mobilities, and AntennaArrayModels of UE and gNB. More...
 
struct  Mobilities
 Mobilities struct to keep mobility model of ue and gNB. More...
 

Public Member Functions

bool CheckNumBeamsAllowed () const
 Check whether number of beams is corresponds to standard.
 
std::pair< Ptr< NetDevice >, double > FindAssociatedGnb ()
 Find the gNB associated with the UE.
 
Ptr< NetDevice > GetAssociatedGnb () const
 Get the gNB associated gNB with the UE.
 
double GetAssociatedRsrp () const
 Get RSRP of associated gNB.
 
NrAnglePair GetBestBfv (uint64_t gnbId) const
 Get the best beam from a given gNB to the UE.
 
double GetCarrierFrequency () const
 Get carrier frequency.
 
std::vector< double > GetColBeamAngles () const
 Get col angles of the beam used.
 
double GetHandoffMargin () const
 Get handoff margin.
 
std::vector< double > GetInterference (const std::vector< uint16_t > &idxVal) const
 Calculate the cumulative sum of RSRP values from gNBs.
 
NetDeviceContainer GetInterferingGnbs () const
 Get the gNBs which are main interferer with the UE.
 
double GetMaxRsrp (uint64_t gnbId) const
 Get the max RSRP from a given gNB.
 
size_t GetNumIntfGnbsByRelRsrp (const std::vector< double > cumSumIntf, const double relRsrpThreshold, const double totalInterference) const
 Get the number of interference gNB based on Relative RSRP value.
 
uint8_t GetNumMainInterfererGnb () const
 Get number of main interferer gNBs.
 
double GetPrimaryCarrier () const
 Get the primary BWP or carrier.
 
double GetRelativeRsrpRatio () const
 Get relative RSRP of remaining gNBs to that of the main one.
 
std::vector< double > GetRowBeamAngles () const
 Get row angles of the beam used.
 
double GetTotalInterference (const std::vector< double > &cumSumIntf) const
 Calculate total interference based on RSRP values from gNBs.
 
uint8_t GetUeActivePanel () const
 Get the index of the active panel for the UE device in NrSpectrumPhy.
 
Ptr< const NetDevice > GetUeDevice () const
 Get UE device for which initial association is required.
 
void InitializeIntfSet (uint16_t numIntfs, bool useRelRsrp, double relRsrpThreshold)
 Create a container of gNBs forming a main interfering set with the UE.
 
void SetColBeamAngles (std::vector< double > colVect)
 Set column beam angles.
 
void SetGnbDevices (const NetDeviceContainer &gnbDevices)
 Set gnb devices among which association is done.
 
void SetHandoffMargin (double margin)
 Set hand off margin in dB.
 
void SetNumMainInterfererGnb (uint8_t numInterfere)
 Set number of main interferer gNBs.
 
void SetNumSsbRb (uint16_t numSsbRb)
 Set number of RBs for association.
 
void SetPrimaryCarrier (double index)
 Set the primary BWP or carrier.
 
void SetRowBeamAngles (std::vector< double > rowVect)
 Set row beam angles.
 
void SetStartSsbRb (uint16_t startSsb)
 Set start RB for SSB.
 
void SetUeActivePanel (int8_t panelIndex) const
 Set the active panel for the UE device in NrSpectrumPhy.
 
void SetUeDevice (const Ptr< NetDevice > &ueDev)
 Set UE device for which initial association is required.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 

Detailed Description

Config Paths

ns3::NrInitialAssociation is accessible through the following paths with Config::Set and Config::Connect:

Attributes

  • HandoffMargin: handoff margin (dB); UE attaches to any gNB whose RSRP is within hand off margin
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • PrimaryCarrierIndex: primary carrier index
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 0
    • Flags: construct write read
  • NumMainInterfererGnb: Number of main interferer gNBs
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 6
    • Flags: construct write read

No TraceSources are defined for this type.
Size of this type is 344 bytes (on a 64-bit architecture).

Definition at line 31 of file nr-initial-association.h.

Member Function Documentation

◆ CheckNumBeamsAllowed()

bool ns3::NrInitialAssociation::CheckNumBeamsAllowed ( ) const

Check whether number of beams is corresponds to standard.

Returns
true if the number of beams conforms to standard

Definition at line 109 of file nr-initial-association.cc.

◆ FindAssociatedGnb()

std::pair< Ptr< NetDevice >, double > ns3::NrInitialAssociation::FindAssociatedGnb ( )

Find the gNB associated with the UE.

Returns
pair of gNB and RSRP of associated gNB and
Note
Calculate the RSRP at this UE for all gNBs in the system. Association is not necessarily done with the gNB with max-RSRP. Instead, the UE randomly associates with one of the gNBs where the RSRP is within the handover margin of the max-RSRP

Definition at line 480 of file nr-initial-association.cc.

◆ GetAssociatedGnb()

Ptr< NetDevice > ns3::NrInitialAssociation::GetAssociatedGnb ( ) const

Get the gNB associated gNB with the UE.

Returns
gNB associated with the UE device

Definition at line 66 of file nr-initial-association.cc.

◆ GetAssociatedRsrp()

double ns3::NrInitialAssociation::GetAssociatedRsrp ( ) const

Get RSRP of associated gNB.

Returns
RSRP

Definition at line 521 of file nr-initial-association.cc.

◆ GetBestBfv()

NrAnglePair ns3::NrInitialAssociation::GetBestBfv ( uint64_t  gnbId) const

Get the best beam from a given gNB to the UE.

Parameters
gnbIdID of gNB
Returns
Best beam from a given gNB

Definition at line 85 of file nr-initial-association.cc.

◆ GetCarrierFrequency()

double ns3::NrInitialAssociation::GetCarrierFrequency ( ) const

Get carrier frequency.

Returns
carrier frequency

Definition at line 135 of file nr-initial-association.cc.

◆ GetColBeamAngles()

std::vector< double > ns3::NrInitialAssociation::GetColBeamAngles ( ) const

Get col angles of the beam used.

Returns
col angles

Definition at line 159 of file nr-initial-association.cc.

◆ GetHandoffMargin()

double ns3::NrInitialAssociation::GetHandoffMargin ( ) const

Get handoff margin.

Returns
handoff margin

Definition at line 141 of file nr-initial-association.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetInterference()

std::vector< double > ns3::NrInitialAssociation::GetInterference ( const std::vector< uint16_t > &  idxVal) const

Calculate the cumulative sum of RSRP values from gNBs.

Parameters
idxValIndex of the gNBs in increasing order of received power to the UE
Returns
Cumulative sum of received RSRP from gNB wherein RSRP are in increasing order

Definition at line 419 of file nr-initial-association.cc.

Referenced by InitializeIntfSet().

+ Here is the caller graph for this function:

◆ GetInterferingGnbs()

NetDeviceContainer ns3::NrInitialAssociation::GetInterferingGnbs ( ) const

Get the gNBs which are main interferer with the UE.

Returns
A container having the set of main interfering gNBs

Definition at line 73 of file nr-initial-association.cc.

◆ GetMaxRsrp()

double ns3::NrInitialAssociation::GetMaxRsrp ( uint64_t  gnbId) const

Get the max RSRP from a given gNB.

Parameters
gnbIdnode ID of gNB
Returns
Max RSRP received from gNB

Definition at line 79 of file nr-initial-association.cc.

◆ GetNumIntfGnbsByRelRsrp()

size_t ns3::NrInitialAssociation::GetNumIntfGnbsByRelRsrp ( const std::vector< double >  cumSumIntf,
const double  relRsrpThreshold,
const double  totalInterference 
) const

Get the number of interference gNB based on Relative RSRP value.

Parameters
cumSumIntfCumulative sum of received RSRP from gNB wherein RSRP are in increasing order
relRsrpThresholdThreshold of the ratio RSRP of the remaining interferers to main interferers,
totalInterferenceTotal interference based on RSRP values from gNBs
Returns
Number of main interfering gNBs

Definition at line 445 of file nr-initial-association.cc.

Referenced by InitializeIntfSet().

+ Here is the caller graph for this function:

◆ GetNumMainInterfererGnb()

uint8_t ns3::NrInitialAssociation::GetNumMainInterfererGnb ( ) const

Get number of main interferer gNBs.

Returns
Number of main interferer gNBs

Definition at line 60 of file nr-initial-association.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetPrimaryCarrier()

double ns3::NrInitialAssociation::GetPrimaryCarrier ( ) const

Get the primary BWP or carrier.

Definition at line 195 of file nr-initial-association.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetRelativeRsrpRatio()

double ns3::NrInitialAssociation::GetRelativeRsrpRatio ( ) const

Get relative RSRP of remaining gNBs to that of the main one.

Returns
The relative RSRP ratio

Definition at line 91 of file nr-initial-association.cc.

◆ GetRowBeamAngles()

std::vector< double > ns3::NrInitialAssociation::GetRowBeamAngles ( ) const

Get row angles of the beam used.

Returns
row angles

Definition at line 147 of file nr-initial-association.cc.

◆ GetTotalInterference()

double ns3::NrInitialAssociation::GetTotalInterference ( const std::vector< double > &  cumSumIntf) const

Calculate total interference based on RSRP values from gNBs.

Parameters
cumSumIntfCumulative sum of received RSRP from gNB wherein RSRP are in increasing order
Returns
Total interference based on RSRP values from gNBs

Definition at line 432 of file nr-initial-association.cc.

Referenced by InitializeIntfSet().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::NrInitialAssociation::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 22 of file nr-initial-association.cc.

References GetHandoffMargin(), GetNumMainInterfererGnb(), GetPrimaryCarrier(), SetHandoffMargin(), SetNumMainInterfererGnb(), and SetPrimaryCarrier().

Referenced by ns3::NrHelper::NrHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetUeActivePanel()

uint8_t ns3::NrInitialAssociation::GetUeActivePanel ( ) const

Get the index of the active panel for the UE device in NrSpectrumPhy.

Returns
panelIndex

Definition at line 536 of file nr-initial-association.cc.

References ns3::NrUeNetDevice::GetPhy().

+ Here is the call graph for this function:

◆ GetUeDevice()

Ptr< const NetDevice > ns3::NrInitialAssociation::GetUeDevice ( ) const

Get UE device for which initial association is required.

Returns
UE device

Definition at line 171 of file nr-initial-association.cc.

◆ InitializeIntfSet()

void ns3::NrInitialAssociation::InitializeIntfSet ( uint16_t  numIntfs,
bool  useRelRsrp,
double  relRsrpThreshold 
)

Create a container of gNBs forming a main interfering set with the UE.

Parameters
numIntfsNumber of interferer in the interfering set
useRelRsrpIf true use relative RSRP to form interfering set
relRsrpThresholdThreshold of the ratio RSRP of the remaining interferers to main interferers, i.e., interferer whose power sum is below the threshold are not main interferers

Definition at line 393 of file nr-initial-association.cc.

References GetInterference(), GetNumIntfGnbsByRelRsrp(), and GetTotalInterference().

+ Here is the call graph for this function:

◆ SetColBeamAngles()

void ns3::NrInitialAssociation::SetColBeamAngles ( std::vector< double >  colVect)

Set column beam angles.

Parameters
colVectvector of column angles

Definition at line 165 of file nr-initial-association.cc.

◆ SetGnbDevices()

void ns3::NrInitialAssociation::SetGnbDevices ( const NetDeviceContainer &  gnbDevices)

Set gnb devices among which association is done.

Parameters
gnbDevicesgnb devices

Definition at line 183 of file nr-initial-association.cc.

◆ SetHandoffMargin()

void ns3::NrInitialAssociation::SetHandoffMargin ( double  margin)

Set hand off margin in dB.

Parameters
marginhandoff margin
Note
Set m_handOffMargin in dB. UE attaches to any gNB whose RSRP is within hand off margin

Definition at line 129 of file nr-initial-association.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetNumMainInterfererGnb()

void ns3::NrInitialAssociation::SetNumMainInterfererGnb ( uint8_t  numInterfere)

Set number of main interferer gNBs.

Parameters
numInterfereNumber of main interferer gNBs

Definition at line 54 of file nr-initial-association.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetNumSsbRb()

void ns3::NrInitialAssociation::SetNumSsbRb ( uint16_t  numSsbRb)

Set number of RBs for association.

Parameters
numSsbRb

Definition at line 103 of file nr-initial-association.cc.

◆ SetPrimaryCarrier()

void ns3::NrInitialAssociation::SetPrimaryCarrier ( double  index)

Set the primary BWP or carrier.

Parameters
index

Definition at line 189 of file nr-initial-association.cc.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetRowBeamAngles()

void ns3::NrInitialAssociation::SetRowBeamAngles ( std::vector< double >  rowVect)

Set row beam angles.

Parameters
rowVectvector of row angles

Definition at line 153 of file nr-initial-association.cc.

◆ SetStartSsbRb()

void ns3::NrInitialAssociation::SetStartSsbRb ( uint16_t  startSsb)

Set start RB for SSB.

Parameters
startSsb

Definition at line 97 of file nr-initial-association.cc.

◆ SetUeActivePanel()

void ns3::NrInitialAssociation::SetUeActivePanel ( int8_t  panelIndex) const

Set the active panel for the UE device in NrSpectrumPhy.

Parameters
panelIndexIndex of panel to be active

Definition at line 527 of file nr-initial-association.cc.

References ns3::NrUeNetDevice::GetPhy().

+ Here is the call graph for this function:

◆ SetUeDevice()

void ns3::NrInitialAssociation::SetUeDevice ( const Ptr< NetDevice > &  ueDev)

Set UE device for which initial association is required.

Parameters
ueDevUE device

Definition at line 177 of file nr-initial-association.cc.


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