5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NodeDistributionScenarioInterface Class Referenceabstract

Represents a scenario with base stations and user terminals. More...

#include "node-distribution-scenario-interface.h"

+ Inheritance diagram for ns3::NodeDistributionScenarioInterface:
+ Collaboration diagram for ns3::NodeDistributionScenarioInterface:

Public Member Functions

 ~NodeDistributionScenarioInterface () override
 ~NodeDistributionScenarioInterface
 
virtual void CreateScenario ()=0
 Create the scenario, with the configured parameter.
 
double GetAntennaOrientationDegrees (std::size_t cellId) const
 Returns the orientation in degrees of the antenna array for the given cellId. The orientation is the azimuth angle of the antenna bore sight.
 
double GetAntennaOrientationRadians (std::size_t cellId) const
 Returns the orientation in radians of the antenna array for the given cellId.
 
Vector GetAntennaPosition (const Vector &sitePos, uint16_t cellId) const
 Returns the position of the cell antenna.
 
const NodeContainer & GetBaseStations () const
 Get the list of gnb/base station nodes.
 
uint16_t GetCellIndex (std::size_t ueId) const
 Get the cell (base station) index the queried UE id belongs to.
 
std::size_t GetNumCells () const
 Gets the total number of cells deployed.
 
std::size_t GetNumSites () const
 Gets the number of sites with cell base stations.
 
uint16_t GetSectorIndex (std::size_t cellId) const
 Get the sector index the queried cell id belongs to.
 
uint16_t GetSiteIndex (std::size_t cellId) const
 Gets the site index the queried cell id belongs to.
 
const NodeContainer & GetUserTerminals () const
 Get the list of user nodes.
 
void SetBsNumber (std::size_t n)
 Set the number of base stations.
 
void SetSitesNumber (std::size_t n)
 Set number of sites/towers.
 
void SetUtNumber (std::size_t n)
 Set the number of UT/UE.
 
- Public Member Functions inherited from ns3::ScenarioParameters
virtual ~ScenarioParameters ()
 ~ScenarioParameters
 
uint32_t GetNumSectorsPerSite () const
 Gets the number of sectors per site.
 
void SetBsHeight (double h)
 SetGnbHeight.
 
void SetRMaParameters ()
 Sets rural Macro scenario parameters.
 
void SetScenarioParameters (const ScenarioParameters &scenario)
 Sets parameters to the specified scenario.
 
void SetScenarioParameters (const std::string &scenario)
 Sets parameters to the specified scenario.
 
void SetSectorization (SiteSectorizationType numSectors)
 Sets the number of sectors of every site.
 
void SetSectorization (uint32_t numSectors)
 Sets the number of sectors of every site.
 
void SetUMaParameters ()
 Sets the Urban Macro (UMa) scenario parameters.
 
void SetUMiParameters ()
 Sets the Urban Micro (UMi) scenario parameters.
 
void SetUtHeight (double h)
 SetUeHeight.
 

Protected Attributes

NodeContainer m_bs
 Base stations.
 
std::size_t m_numBs
 Number of base stations to create.
 
std::size_t m_numSites
 Number of sites with base stations.
 
std::size_t m_numUt
 Number of user terminals to create.
 
NodeContainer m_ut
 User Terminals.
 

Additional Inherited Members

- Public Types inherited from ns3::ScenarioParameters
enum  SiteSectorizationType { NONE = 0 , SINGLE = 1 , TRIPLE = 3 }
 Type of site sectorization. More...
 
- Public Attributes inherited from ns3::ScenarioParameters
double m_antennaOffset {-1.0}
 Cell antenna offset in meters w.r.t. site location.
 
double m_bsHeight {-1.0}
 Height of gNB nodes.
 
double m_isd {-1.0}
 Inter-site distance (ISD) in meters.
 
double m_minBsUtDistance {-1.0}
 Minimum distance between BS and UT in meters.
 
SiteSectorizationType m_sectorization {NONE}
 Number of sectors per site.
 
double m_utHeight {-1.0}
 Height of UE nodes.
 
- Static Public Attributes inherited from ns3::ScenarioParameters
static double MAX_ANTENNA_OFFSET = 1
 

Detailed Description

Represents a scenario with base stations and user terminals.

Set the relevant settings, and then call CreateScenario. After that call, the node containers can be retrieved through GetBaseStations and GetUserTerminals.

Site sectorizaton must be set before setting the number of sites or base stations.

Definition at line 24 of file node-distribution-scenario-interface.h.

Constructor & Destructor Documentation

◆ ~NodeDistributionScenarioInterface()

ns3::NodeDistributionScenarioInterface::~NodeDistributionScenarioInterface ( )
override

~NodeDistributionScenarioInterface

Definition at line 12 of file node-distribution-scenario-interface.cc.

Member Function Documentation

◆ CreateScenario()

virtual void ns3::NodeDistributionScenarioInterface::CreateScenario ( )
pure virtual

Create the scenario, with the configured parameter.

After this call, GetGnbs and GetUes will return the containers with the nodes created and positioned.

Implemented in ns3::FileScenarioHelper, ns3::GridScenarioHelper, and ns3::HexagonalGridScenarioHelper.

◆ GetAntennaOrientationDegrees()

double ns3::NodeDistributionScenarioInterface::GetAntennaOrientationDegrees ( std::size_t  cellId) const

Returns the orientation in degrees of the antenna array for the given cellId. The orientation is the azimuth angle of the antenna bore sight.

Parameters
cellIdCell Id
Returns
The antenna orientation in degrees [0, 360]

Definition at line 67 of file node-distribution-scenario-interface.cc.

References ns3::ScenarioParameters::m_sectorization, and ns3::ScenarioParameters::TRIPLE.

Referenced by GetAntennaOrientationRadians(), and GetAntennaPosition().

+ Here is the caller graph for this function:

◆ GetAntennaOrientationRadians()

double ns3::NodeDistributionScenarioInterface::GetAntennaOrientationRadians ( std::size_t  cellId) const

Returns the orientation in radians of the antenna array for the given cellId.

Parameters
cellIdCell Id
Returns
The antenna orientation in radians [-PI, PI]

Definition at line 81 of file node-distribution-scenario-interface.cc.

References GetAntennaOrientationDegrees().

Referenced by ns3::FileScenarioHelper::CreateScenario().

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

◆ GetAntennaPosition()

Vector ns3::NodeDistributionScenarioInterface::GetAntennaPosition ( const Vector &  sitePos,
uint16_t  cellId 
) const

Returns the position of the cell antenna.

Parameters
sitePosSite position coordinates in meters
cellIdId Cell id of the antenna

Definition at line 113 of file node-distribution-scenario-interface.cc.

References GetAntennaOrientationDegrees(), and ns3::ScenarioParameters::m_antennaOffset.

Referenced by ns3::HexagonalGridScenarioHelper::CreateScenario(), and ns3::HexagonalGridScenarioHelper::CreateScenarioWithMobility().

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

◆ GetBaseStations()

const NodeContainer & ns3::NodeDistributionScenarioInterface::GetBaseStations ( ) const

Get the list of gnb/base station nodes.

Returns
A NodeContainer with all the Gnb (or base stations)

Definition at line 17 of file node-distribution-scenario-interface.cc.

References m_bs.

◆ GetCellIndex()

uint16_t ns3::NodeDistributionScenarioInterface::GetCellIndex ( std::size_t  ueId) const

Get the cell (base station) index the queried UE id belongs to.

Parameters
ueIdUE index.
Returns
The cell id.

Definition at line 107 of file node-distribution-scenario-interface.cc.

References m_numBs.

Referenced by ns3::FileScenarioHelper::CreateScenario().

+ Here is the caller graph for this function:

◆ GetNumCells()

std::size_t ns3::NodeDistributionScenarioInterface::GetNumCells ( ) const

Gets the total number of cells deployed.

Returns
Number of cells in the network deployment

Definition at line 61 of file node-distribution-scenario-interface.cc.

References m_numBs.

◆ GetNumSites()

std::size_t ns3::NodeDistributionScenarioInterface::GetNumSites ( ) const

Gets the number of sites with cell base stations.

Returns
Number of sites in the network deployment

Definition at line 55 of file node-distribution-scenario-interface.cc.

References m_numSites.

◆ GetSectorIndex()

uint16_t ns3::NodeDistributionScenarioInterface::GetSectorIndex ( std::size_t  cellId) const

Get the sector index the queried cell id belongs to.

Parameters
cellIdCell index.
Returns
The sector id.

Definition at line 100 of file node-distribution-scenario-interface.cc.

References ns3::ScenarioParameters::m_sectorization.

Referenced by ns3::HexagonalGridScenarioHelper::CreateScenario(), ns3::HexagonalGridScenarioHelper::CreateScenarioWithMobility(), and ns3::HexagonalGridScenarioHelper::GetHexagonalCellCenter().

+ Here is the caller graph for this function:

◆ GetSiteIndex()

uint16_t ns3::NodeDistributionScenarioInterface::GetSiteIndex ( std::size_t  cellId) const

Gets the site index the queried cell id belongs to.

Parameters
cellIdCell index
Returns
site id

Definition at line 93 of file node-distribution-scenario-interface.cc.

References ns3::ScenarioParameters::m_sectorization.

Referenced by ns3::FileScenarioHelper::CreateScenario(), ns3::HexagonalGridScenarioHelper::CreateScenario(), and ns3::HexagonalGridScenarioHelper::CreateScenarioWithMobility().

+ Here is the caller graph for this function:

◆ GetUserTerminals()

const NodeContainer & ns3::NodeDistributionScenarioInterface::GetUserTerminals ( ) const

Get the list of user nodes.

Returns
A NodeContainer with all the users

Definition at line 23 of file node-distribution-scenario-interface.cc.

References m_ut.

◆ SetBsNumber()

void ns3::NodeDistributionScenarioInterface::SetBsNumber ( std::size_t  n)

Set the number of base stations.

Parameters
nthe number of bs

Will invalidate already existing BS (recreating the container)

Definition at line 38 of file node-distribution-scenario-interface.cc.

References ns3::ScenarioParameters::m_sectorization, ns3::ScenarioParameters::NONE, and SetSitesNumber().

+ Here is the call graph for this function:

◆ SetSitesNumber()

void ns3::NodeDistributionScenarioInterface::SetSitesNumber ( std::size_t  n)

Set number of sites/towers.

Parameters
nthe number of sites

Definition at line 29 of file node-distribution-scenario-interface.cc.

References m_numBs, m_numSites, ns3::ScenarioParameters::m_sectorization, and ns3::ScenarioParameters::NONE.

Referenced by ns3::FileScenarioHelper::Add(), SetBsNumber(), and ns3::HexagonalGridScenarioHelper::SetNumRings().

+ Here is the caller graph for this function:

◆ SetUtNumber()

void ns3::NodeDistributionScenarioInterface::SetUtNumber ( std::size_t  n)

Set the number of UT/UE.

Parameters
nthe number of ut

Will invalidate already existing UT (recreating the container)

Definition at line 49 of file node-distribution-scenario-interface.cc.

References m_numUt.

Member Data Documentation

◆ m_bs

◆ m_numBs

◆ m_numSites

std::size_t ns3::NodeDistributionScenarioInterface::m_numSites
protected

◆ m_numUt

◆ m_ut


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