![]() |
5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
|
#include "introspected-doxygen.h"
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. | |
ns3::NrInitialAssociation is accessible through the following paths with Config::Set and Config::Connect:
/NodeList/[i]/DeviceList/[i]/$ns3::NrNetDevice/$ns3::NrUeNetDevice/InitAssoc
/NodeList/[i]/DeviceList/[i]/$ns3::NrUeNetDevice/InitAssoc
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.
bool ns3::NrInitialAssociation::CheckNumBeamsAllowed | ( | ) | const |
Check whether number of beams is corresponds to standard.
Definition at line 109 of file nr-initial-association.cc.
std::pair< Ptr< NetDevice >, double > ns3::NrInitialAssociation::FindAssociatedGnb | ( | ) |
Find the gNB associated with the UE.
Definition at line 480 of file nr-initial-association.cc.
Ptr< NetDevice > ns3::NrInitialAssociation::GetAssociatedGnb | ( | ) | const |
Get the gNB associated gNB with the UE.
Definition at line 66 of file nr-initial-association.cc.
double ns3::NrInitialAssociation::GetAssociatedRsrp | ( | ) | const |
NrAnglePair ns3::NrInitialAssociation::GetBestBfv | ( | uint64_t | gnbId | ) | const |
Get the best beam from a given gNB to the UE.
gnbId | ID of gNB |
Definition at line 85 of file nr-initial-association.cc.
double ns3::NrInitialAssociation::GetCarrierFrequency | ( | ) | const |
Get carrier frequency.
Definition at line 135 of file nr-initial-association.cc.
std::vector< double > ns3::NrInitialAssociation::GetColBeamAngles | ( | ) | const |
Get col angles of the beam used.
Definition at line 159 of file nr-initial-association.cc.
double ns3::NrInitialAssociation::GetHandoffMargin | ( | ) | const |
Get handoff margin.
Definition at line 141 of file nr-initial-association.cc.
Referenced by GetTypeId().
std::vector< double > ns3::NrInitialAssociation::GetInterference | ( | const std::vector< uint16_t > & | idxVal | ) | const |
Calculate the cumulative sum of RSRP values from gNBs.
idxVal | Index of the gNBs in increasing order of received power to the UE |
Definition at line 419 of file nr-initial-association.cc.
Referenced by InitializeIntfSet().
NetDeviceContainer ns3::NrInitialAssociation::GetInterferingGnbs | ( | ) | const |
Get the gNBs which are main interferer with the UE.
Definition at line 73 of file nr-initial-association.cc.
double ns3::NrInitialAssociation::GetMaxRsrp | ( | uint64_t | gnbId | ) | const |
Get the max RSRP from a given gNB.
gnbId | node ID of gNB |
Definition at line 79 of file nr-initial-association.cc.
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.
cumSumIntf | Cumulative sum of received RSRP from gNB wherein RSRP are in increasing order |
relRsrpThreshold | Threshold of the ratio RSRP of the remaining interferers to main interferers, |
totalInterference | Total interference based on RSRP values from gNBs |
Definition at line 445 of file nr-initial-association.cc.
Referenced by InitializeIntfSet().
uint8_t ns3::NrInitialAssociation::GetNumMainInterfererGnb | ( | ) | const |
Get number of main interferer gNBs.
Definition at line 60 of file nr-initial-association.cc.
Referenced by GetTypeId().
double ns3::NrInitialAssociation::GetPrimaryCarrier | ( | ) | const |
Get the primary BWP or carrier.
Definition at line 195 of file nr-initial-association.cc.
Referenced by GetTypeId().
double ns3::NrInitialAssociation::GetRelativeRsrpRatio | ( | ) | const |
Get relative RSRP of remaining gNBs to that of the main one.
Definition at line 91 of file nr-initial-association.cc.
std::vector< double > ns3::NrInitialAssociation::GetRowBeamAngles | ( | ) | const |
Get row angles of the beam used.
Definition at line 147 of file nr-initial-association.cc.
double ns3::NrInitialAssociation::GetTotalInterference | ( | const std::vector< double > & | cumSumIntf | ) | const |
Calculate total interference based on RSRP values from gNBs.
cumSumIntf | Cumulative sum of received RSRP from gNB wherein RSRP are in increasing order |
Definition at line 432 of file nr-initial-association.cc.
Referenced by InitializeIntfSet().
|
static |
Get the type ID.
Definition at line 22 of file nr-initial-association.cc.
References GetHandoffMargin(), GetNumMainInterfererGnb(), GetPrimaryCarrier(), SetHandoffMargin(), SetNumMainInterfererGnb(), and SetPrimaryCarrier().
Referenced by ns3::NrHelper::NrHelper().
uint8_t ns3::NrInitialAssociation::GetUeActivePanel | ( | ) | const |
Get the index of the active panel for the UE device in NrSpectrumPhy.
Definition at line 536 of file nr-initial-association.cc.
References ns3::NrUeNetDevice::GetPhy().
Ptr< const NetDevice > ns3::NrInitialAssociation::GetUeDevice | ( | ) | const |
Get UE device for which initial association is required.
Definition at line 171 of file nr-initial-association.cc.
void ns3::NrInitialAssociation::InitializeIntfSet | ( | uint16_t | numIntfs, |
bool | useRelRsrp, | ||
double | relRsrpThreshold | ||
) |
Create a container of gNBs forming a main interfering set with the UE.
numIntfs | Number of interferer in the interfering set |
useRelRsrp | If true use relative RSRP to form interfering set |
relRsrpThreshold | Threshold 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().
void ns3::NrInitialAssociation::SetColBeamAngles | ( | std::vector< double > | colVect | ) |
Set column beam angles.
colVect | vector of column angles |
Definition at line 165 of file nr-initial-association.cc.
void ns3::NrInitialAssociation::SetGnbDevices | ( | const NetDeviceContainer & | gnbDevices | ) |
Set gnb devices among which association is done.
gnbDevices | gnb devices |
Definition at line 183 of file nr-initial-association.cc.
void ns3::NrInitialAssociation::SetHandoffMargin | ( | double | margin | ) |
Set hand off margin in dB.
margin | handoff margin |
Definition at line 129 of file nr-initial-association.cc.
Referenced by GetTypeId().
void ns3::NrInitialAssociation::SetNumMainInterfererGnb | ( | uint8_t | numInterfere | ) |
Set number of main interferer gNBs.
numInterfere | Number of main interferer gNBs |
Definition at line 54 of file nr-initial-association.cc.
Referenced by GetTypeId().
void ns3::NrInitialAssociation::SetNumSsbRb | ( | uint16_t | numSsbRb | ) |
Set number of RBs for association.
numSsbRb |
Definition at line 103 of file nr-initial-association.cc.
void ns3::NrInitialAssociation::SetPrimaryCarrier | ( | double | index | ) |
Set the primary BWP or carrier.
index |
Definition at line 189 of file nr-initial-association.cc.
Referenced by GetTypeId().
void ns3::NrInitialAssociation::SetRowBeamAngles | ( | std::vector< double > | rowVect | ) |
Set row beam angles.
rowVect | vector of row angles |
Definition at line 153 of file nr-initial-association.cc.
void ns3::NrInitialAssociation::SetStartSsbRb | ( | uint16_t | startSsb | ) |
void ns3::NrInitialAssociation::SetUeActivePanel | ( | int8_t | panelIndex | ) | const |
Set the active panel for the UE device in NrSpectrumPhy.
panelIndex | Index of panel to be active |
Definition at line 527 of file nr-initial-association.cc.
References ns3::NrUeNetDevice::GetPhy().
void ns3::NrInitialAssociation::SetUeDevice | ( | const Ptr< NetDevice > & | ueDev | ) |
Set UE device for which initial association is required.
ueDev | UE device |
Definition at line 177 of file nr-initial-association.cc.