5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
file-scenario-helper.h
1// Copyright (c) 2020 Lawrence Livermore National Laboratory
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef FILE_SCENARIO_HELPER_H
6#define FILE_SCENARIO_HELPER_H
7
8#include "node-distribution-scenario-interface.h"
9
10#include <ns3/ptr.h>
11#include <ns3/vector.h>
12
13namespace ns3
14{
15
16// Forward declaration
17class ListPositionAllocator;
18
29{
30 public:
34 ~FileScenarioHelper() override;
35
51 void Add(const std::string filePath, char delimiter = ',');
52
57 Vector GetSitePosition(std::size_t cellId) const;
58
59 // inherited
60 void CreateScenario() override;
62
63 private:
70 void CheckScenario(const char* where) const;
71
73 bool m_scenarioCreated{false};
74
79 Ptr<ListPositionAllocator> m_bsPositioner;
80};
81
82} // namespace ns3
83
84#endif /* FILE_SCENARIO_HELPER_H */
The FileScenarioHelper class.
~FileScenarioHelper() override
~FileScenarioHelper
void CreateScenario() override
Create the scenario, with the configured parameter.
void Add(const std::string filePath, char delimiter=',')
Add the positions listed in a file. The file should be a simple text file, with one position per line...
Vector GetSitePosition(std::size_t cellId) const
Get the site position corresponding to a given cell.
Represents a scenario with base stations and user terminals.
Vector GetAntennaPosition(const Vector &sitePos, uint16_t cellId) const
Returns the position of the cell antenna.