5G-LENA nr-v3.0-33-g7aea1e4
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
file-scenario-helper.h
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2020 Lawrence Livermore National Laboratory
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#ifndef FILE_SCENARIO_HELPER_H
8#define FILE_SCENARIO_HELPER_H
9
10#include "node-distribution-scenario-interface.h"
11
12#include <ns3/ptr.h>
13#include <ns3/vector.h>
14
15namespace ns3
16{
17
18// Forward declaration
19class ListPositionAllocator;
20
31{
32 public:
36 ~FileScenarioHelper() override;
37
53 void Add(const std::string filePath, char delimiter = ',');
54
59 Vector GetSitePosition(std::size_t cellId) const;
60
61 // inherited
62 void CreateScenario() override;
64
65 private:
72 void CheckScenario(const char* where) const;
73
75 bool m_scenarioCreated{false};
76
81 Ptr<ListPositionAllocator> m_bsPositioner;
82};
83
84} // namespace ns3
85
86#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.