5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
ns3::NrChannelHelper Class Reference

This class is a helper class to create a channel with a specific scenario, channel model and channel condition model. You can also pass your own custom channel configuration without this helper, using the following steps: More...

#include "nr-channel-helper.h"

+ Inheritance diagram for ns3::NrChannelHelper:
+ Collaboration diagram for ns3::NrChannelHelper:

Public Types

enum  InitFlags : uint8_t { INIT_PROPAGATION = 0x01 , INIT_FADING = 0x02 }
 Flags for channel assignments. More...
 

Public Member Functions

 NrChannelHelper ()=default
 Default constructor.
 
void AssignChannelsToBands (const std::vector< std::reference_wrapper< OperationBandInfo > > &bandInfos, uint8_t flags=INIT_PROPAGATION|INIT_FADING)
 This helper function assists in creating multiple instances of spectrum channels with the same scenario, channel condition, and channel model configuration. It is useful when you want to create multiple spectrum channels and assign them to multiple BWPs of multiple bands.
 
void ConfigureFactories (std::string Scenario="RMa", std::string Condition="Default", std::string ChannelModel="ThreeGpp")
 This function configures the object factories with the user-selected scenario, channel, and channel condition models. It only allows the supported combinations, which have only phased spectrum and propagation (NYUSIM, FTR, and 3GPP).
 
void ConfigurePropagationFactory (TypeId pathLossTypeId)
 This function configures the propagation loss object factory. It is used to set the object factory manually, in case you want to use a custom propagation loss model.
 
void ConfigureSpectrumFactory (TypeId specTypeId)
 This function configures the spectrum object factory with the user selected spectrum loss model. It is used to set the object factory manually, in case you want to use a custom spectrum loss model.
 
Ptr< SpectrumChannel > CreateChannel (uint8_t flags=INIT_PROPAGATION|INIT_FADING)
 This function creates a spectrum channel with the given flags.
 
void SetChannelConditionModelAttribute (const std::string &n, const AttributeValue &v)
 Set an attribute for the ChannelConditionModel, before the spectrum channel has been created.
 
void SetPathlossAttribute (const std::string &n, const AttributeValue &v)
 Set an attribute for the PathLossModel, before the spectrum channel has been created.
 
void SetPhasedArraySpectrumPropagationLossModelAttribute (const std::string &n, const AttributeValue &v)
 Set an attribute for the PhasedArraySpectrumPropagationLossModel, before the spectrum channel has been created.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the TypeId of the NrChannelHelper.
 

Detailed Description

This class is a helper class to create a channel with a specific scenario, channel model and channel condition model. You can also pass your own custom channel configuration without this helper, using the following steps:

auto channel = CreateObject<MultiModelSpectrumChannel>();
channel->AddPropagationLossModel(YourPropagationLossModel);
channel->AddSpectrumPropagationLossModel(YourSpectrumModel);

The available features are:

  • Scenarios: RMa, UMa, InH-OfficeOpen, InH-OfficeMixed, V2V-Highway, V2V-Urban, UMi, InH, InF, NTN-DenseUrban, NTN-Urban, NTN-Suburban, NTN-Rural
  • Conditions: LOS, NLOS, Buildings, Default
  • Channel Models: ThreeGpp, TwoRay, NYU
Note
The Default channel condition is defined by the selected scenario and can be mixed, LOS or NLOS.

Definition at line 46 of file nr-channel-helper.h.

Member Enumeration Documentation

◆ InitFlags

Flags for channel assignments.

Enumerator
INIT_PROPAGATION 

Initialize the propagation loss model.

INIT_FADING 

Initialize the fading model.

Definition at line 52 of file nr-channel-helper.h.

Member Function Documentation

◆ AssignChannelsToBands()

void ns3::NrChannelHelper::AssignChannelsToBands ( const std::vector< std::reference_wrapper< OperationBandInfo > > &  bandInfos,
uint8_t  flags = INIT_PROPAGATION | INIT_FADING 
)

This helper function assists in creating multiple instances of spectrum channels with the same scenario, channel condition, and channel model configuration. It is useful when you want to create multiple spectrum channels and assign them to multiple BWPs of multiple bands.

Parameters
bandInfosThe operation bands
flagsThe flags to initialize the spectrum channel
Note
This function assigns spectrum channels to the provided bands by internally calling CreateChannel(). It uses the central frequency of the BWPs to set the frequency of the created spectrum channels.

Definition at line 329 of file nr-channel-helper.cc.

References CreateChannel().

+ Here is the call graph for this function:

◆ ConfigureFactories()

void ns3::NrChannelHelper::ConfigureFactories ( std::string  Scenario = "RMa",
std::string  Condition = "Default",
std::string  ChannelModel = "ThreeGpp" 
)

This function configures the object factories with the user-selected scenario, channel, and channel condition models. It only allows the supported combinations, which have only phased spectrum and propagation (NYUSIM, FTR, and 3GPP).

Parameters
ScenarioThe scenario to be used in the band
ConditionThe channel condition to be used in the band
ChannelModelThe channel model to be used in the band

Definition at line 155 of file nr-channel-helper.cc.

◆ ConfigurePropagationFactory()

void ns3::NrChannelHelper::ConfigurePropagationFactory ( TypeId  pathLossTypeId)

This function configures the propagation loss object factory. It is used to set the object factory manually, in case you want to use a custom propagation loss model.

Parameters
propTypeIdThe TypeId of the propagation loss model

Definition at line 195 of file nr-channel-helper.cc.

◆ ConfigureSpectrumFactory()

void ns3::NrChannelHelper::ConfigureSpectrumFactory ( TypeId  specTypeId)

This function configures the spectrum object factory with the user selected spectrum loss model. It is used to set the object factory manually, in case you want to use a custom spectrum loss model.

Parameters
specTypeIdThe TypeId of the spectrum model

Definition at line 201 of file nr-channel-helper.cc.

◆ CreateChannel()

Ptr< SpectrumChannel > ns3::NrChannelHelper::CreateChannel ( uint8_t  flags = INIT_PROPAGATION | INIT_FADING)

This function creates a spectrum channel with the given flags.

Parameters
flagsThe flags to initialize the spectrum channel. By default, it initializes the propagation and fading models, but you can choose to initialize only the propagation model or only the fading model by using the following flags:
  • INIT_PROPAGATION: Initialize the propagation loss model
  • INIT_FADING: Initialize the fading model
Returns
The created spectrum channel

Definition at line 99 of file nr-channel-helper.cc.

References INIT_FADING, and INIT_PROPAGATION.

Referenced by AssignChannelsToBands().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::NrChannelHelper::GetTypeId ( )
static

Get the TypeId of the NrChannelHelper.

Returns
The TypeId of the NrChannelHelper

Definition at line 33 of file nr-channel-helper.cc.

◆ SetChannelConditionModelAttribute()

void ns3::NrChannelHelper::SetChannelConditionModelAttribute ( const std::string &  n,
const AttributeValue &  v 
)

Set an attribute for the ChannelConditionModel, before the spectrum channel has been created.

Parameters
nThe name of the attribute
vThe value of the attribute

Definition at line 180 of file nr-channel-helper.cc.

◆ SetPathlossAttribute()

void ns3::NrChannelHelper::SetPathlossAttribute ( const std::string &  n,
const AttributeValue &  v 
)

Set an attribute for the PathLossModel, before the spectrum channel has been created.

Parameters
nThe name of the attribute
vThe value of the attribute

Definition at line 188 of file nr-channel-helper.cc.

◆ SetPhasedArraySpectrumPropagationLossModelAttribute()

void ns3::NrChannelHelper::SetPhasedArraySpectrumPropagationLossModelAttribute ( const std::string &  n,
const AttributeValue &  v 
)

Set an attribute for the PhasedArraySpectrumPropagationLossModel, before the spectrum channel has been created.

Parameters
nThe name of the attribute
vThe value of the attribute

Definition at line 172 of file nr-channel-helper.cc.


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