5G-LENA nr-v3.3-120-gdac69c56
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
beam-manager.h
1// Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef SRC_NR_MODEL_BEAM_MANAGER_H_
6#define SRC_NR_MODEL_BEAM_MANAGER_H_
7
8#include "beamforming-vector.h"
9
10#include "ns3/event-id.h"
11#include "ns3/net-device.h"
12#include "ns3/nstime.h"
13
14#include <map>
15
16namespace ns3
17{
18
19class NrUeNetDevice;
20class NrGnbNetDevice;
21class BeamformingHelperBase;
22
32class BeamManager : public Object
33{
35
36 public:
41
45 ~BeamManager() override;
46
51 static TypeId GetTypeId();
52
53 /*
54 * @brief configures a predefined beam to use for directional transmissions
55 */
56 void SetPredefinedBeam(PhasedArrayModel::ComplexVector predefinedBeam);
57
63 void SetPredefinedBeam(uint16_t sector, double elevation);
64
70 void Configure(const Ptr<UniformPlanarArray>& antennaArray);
71
77 PhasedArrayModel::ComplexVector GetVector(const BeamformingVector& v) const;
78
84 BeamId GetBeamId(const BeamformingVector& v) const;
85
90 Ptr<const UniformPlanarArray> GetAntenna() const;
91
92 typedef std::map<const Ptr<const NetDevice>, BeamformingVector>
95
103 virtual void SaveBeamformingVector(const BeamformingVector& bfv,
104 const Ptr<const NetDevice>& device);
109 virtual void ChangeBeamformingVector(const Ptr<const NetDevice>& device);
110
115
121 virtual PhasedArrayModel::ComplexVector GetCurrentBeamformingVector();
122
128 virtual PhasedArrayModel::ComplexVector GetBeamformingVector(
129 const Ptr<NetDevice>& device) const;
130
136 virtual BeamId GetBeamId(const Ptr<NetDevice>& device) const;
137
143 void SetSector(uint16_t sector, double elevation) const;
144
150 void SetSectorAz(double azimuth, double zenith) const;
151
152 private:
153 Ptr<UniformPlanarArray>
154 m_antennaArray;
155 uint32_t m_numRows{0};
157 uint32_t m_numColumns{0};
159 uint32_t m_numPortElems{0};
160 bool m_isPolDual{false};
161 BeamformingVector m_omniTxRxW;
163 BeamformingStorage m_beamformingVectorMap;
164 BeamformingVector m_predefinedDirTxRxW;
166};
167
168} /* namespace ns3 */
169
170#endif /* SRC_NR_MODEL_BEAM_MANAGER_H_ */
Representation of a beam id.
Definition beam-id.h:26
Antenna array management.
static TypeId GetTypeId()
GetTypeId.
BeamManager()
BeamManager constructor.
std::map< const Ptr< const NetDevice >, BeamformingVector > BeamformingStorage
void SetSectorAz(double azimuth, double zenith) const
Set the Sector.
PhasedArrayModel::ComplexVector GetVector(const BeamformingVector &v) const
Get weight vector from a BeamformingVector.
virtual PhasedArrayModel::ComplexVector GetBeamformingVector(const Ptr< NetDevice > &device) const
Function that returns the beamforming vector weights that is used to communicated with a specified de...
virtual PhasedArrayModel::ComplexVector GetCurrentBeamformingVector()
Function that returns the beamforming vector that is currently being used by the antenna.
BeamId GetBeamId(const BeamformingVector &v) const
Extract the beam id from the beamforming vector specified.
virtual void ChangeToQuasiOmniBeamformingVector()
Change current beamforming vector to quasi-omni beamforming vector.
void Configure(const Ptr< UniformPlanarArray > &antennaArray)
Configures quasi-omni beamforming vector.
void SetSector(uint16_t sector, double elevation) const
Set the Sector.
Ptr< const UniformPlanarArray > GetAntenna() const
Get a pointer to the current antenna.
~BeamManager() override
~BeamManager
virtual void ChangeBeamformingVector(const Ptr< const NetDevice > &device)
Change the beamforming vector for tx/rx to/from specified device.
virtual void SaveBeamformingVector(const BeamformingVector &bfv, const Ptr< const NetDevice > &device)
Function that saves the beamforming weights of the antenna for transmission or reception to/from a sp...
The BeamformingHelperBase class that is being used as the general interface for beamforming helper cl...
std::pair< PhasedArrayModel::ComplexVector, BeamId > BeamformingVector
Physical representation of a beam.