5G-LENA nr-v3.0-33-g7aea1e4
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
node-distribution-scenario-interface.h
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2019 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#ifndef NODE_DISTRIBUTION_SCENARIO_INTERFACE_H
8#define NODE_DISTRIBUTION_SCENARIO_INTERFACE_H
9
10#include "scenario-parameters.h"
11
12#include <ns3/node-container.h>
13#include <ns3/vector.h>
14
15namespace ns3
16{
17
27{
28 public:
37 const NodeContainer& GetBaseStations() const;
42 const NodeContainer& GetUserTerminals() const;
43
50 virtual void CreateScenario() = 0;
51
56 void SetSitesNumber(std::size_t n);
57
64 void SetBsNumber(std::size_t n);
65
72 void SetUtNumber(std::size_t n);
73
78 std::size_t GetNumSites() const;
79
84 std::size_t GetNumCells() const;
85
93 double GetAntennaOrientationDegrees(std::size_t cellId) const;
94
101 double GetAntennaOrientationRadians(std::size_t cellId) const;
102
108 Vector GetAntennaPosition(const Vector& sitePos, uint16_t cellId) const;
109
115 uint16_t GetSiteIndex(std::size_t cellId) const;
116
122 uint16_t GetSectorIndex(std::size_t cellId) const;
123
129 uint16_t GetCellIndex(std::size_t ueId) const;
130
131 protected:
132 std::size_t m_numSites;
133 std::size_t m_numBs;
134 std::size_t m_numUt;
135 NodeContainer m_bs;
136 NodeContainer m_ut;
137};
138
139} // namespace ns3
140
141#endif // NODE_DISTRIBUTION_SCENARIO_INTERFACE_H
Represents a scenario with base stations and user terminals.
virtual void CreateScenario()=0
Create the scenario, with the configured parameter.
const NodeContainer & GetUserTerminals() const
Get the list of user nodes.
std::size_t GetNumSites() const
Gets the number of sites with cell base stations.
std::size_t m_numBs
Number of base stations to create.
uint16_t GetSiteIndex(std::size_t cellId) const
Gets the site index the queried cell id belongs to.
void SetBsNumber(std::size_t n)
Set the number of base stations.
uint16_t GetCellIndex(std::size_t ueId) const
Get the cell (base station) index the queried UE id belongs to.
Vector GetAntennaPosition(const Vector &sitePos, uint16_t cellId) const
Returns the position of the cell antenna.
std::size_t m_numUt
Number of user terminals to create.
void SetUtNumber(std::size_t n)
Set the number of UT/UE.
std::size_t m_numSites
Number of sites with base stations.
void SetSitesNumber(std::size_t n)
Set number of sites/towers.
~NodeDistributionScenarioInterface() override
~NodeDistributionScenarioInterface
double GetAntennaOrientationDegrees(std::size_t cellId) const
Returns the orientation in degrees of the antenna array for the given cellId. The orientation is the ...
uint16_t GetSectorIndex(std::size_t cellId) const
Get the sector index the queried cell id belongs to.
std::size_t GetNumCells() const
Gets the total number of cells deployed.
const NodeContainer & GetBaseStations() const
Get the list of gnb/base station nodes.
double GetAntennaOrientationRadians(std::size_t cellId) const
Returns the orientation in radians of the antenna array for the given cellId.
Basic simulation scenario parameters.