![]() |
5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
|
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"
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. | |
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:
The available features are:
Definition at line 46 of file nr-channel-helper.h.
enum ns3::NrChannelHelper::InitFlags : uint8_t |
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.
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.
bandInfos | The operation bands |
flags | The flags to initialize the spectrum channel |
Definition at line 329 of file nr-channel-helper.cc.
References CreateChannel().
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).
Scenario | The scenario to be used in the band |
Condition | The channel condition to be used in the band |
ChannelModel | The channel model to be used in the band |
Definition at line 155 of file nr-channel-helper.cc.
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.
propTypeId | The TypeId of the propagation loss model |
Definition at line 195 of file nr-channel-helper.cc.
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.
specTypeId | The TypeId of the spectrum model |
Definition at line 201 of file nr-channel-helper.cc.
Ptr< SpectrumChannel > ns3::NrChannelHelper::CreateChannel | ( | uint8_t | flags = INIT_PROPAGATION | INIT_FADING | ) |
This function creates a spectrum channel with the given flags.
flags | The 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: |
Definition at line 99 of file nr-channel-helper.cc.
References INIT_FADING, and INIT_PROPAGATION.
Referenced by AssignChannelsToBands().
|
static |
Get the TypeId of the NrChannelHelper.
Definition at line 33 of file nr-channel-helper.cc.
void ns3::NrChannelHelper::SetChannelConditionModelAttribute | ( | const std::string & | n, |
const AttributeValue & | v | ||
) |
Set an attribute for the ChannelConditionModel, before the spectrum channel has been created.
n | The name of the attribute |
v | The value of the attribute |
Definition at line 180 of file nr-channel-helper.cc.
void ns3::NrChannelHelper::SetPathlossAttribute | ( | const std::string & | n, |
const AttributeValue & | v | ||
) |
Set an attribute for the PathLossModel, before the spectrum channel has been created.
n | The name of the attribute |
v | The value of the attribute |
Definition at line 188 of file nr-channel-helper.cc.
void ns3::NrChannelHelper::SetPhasedArraySpectrumPropagationLossModelAttribute | ( | const std::string & | n, |
const AttributeValue & | v | ||
) |
Set an attribute for the PhasedArraySpectrumPropagationLossModel, before the spectrum channel has been created.
n | The name of the attribute |
v | The value of the attribute |
Definition at line 172 of file nr-channel-helper.cc.