5G-LENA nr-v3.1-69-g2dd513a7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
beamforming-helper-base.h
1// Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#include <ns3/beamforming-vector.h>
6#include <ns3/object-factory.h>
7#include <ns3/object.h>
8#include <ns3/vector.h>
9
10#ifndef SRC_NR_HELPER_BEAMFORMING_HELPER_BASE_H_
11#define SRC_NR_HELPER_BEAMFORMING_HELPER_BASE_H_
12
13namespace ns3
14{
15
16class NrSpectrumPhy;
17class NrGnbNetDevice;
18class NrUeNetDevice;
19
28class BeamformingHelperBase : public Object
29{
30 public:
38 ~BeamformingHelperBase() override;
39
44 static TypeId GetTypeId();
45
54 virtual void AddBeamformingTask(const Ptr<NrGnbNetDevice>& gNbDev,
55 const Ptr<NrUeNetDevice>& ueDev) = 0;
56
62 virtual void SetBeamformingMethod(const TypeId& beamformingMethod) = 0;
63
69 void SetBeamformingAlgorithmAttribute(const std::string& n, const AttributeValue& v);
70
71 protected:
78 virtual void RunTask(const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
79 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const;
80
89 virtual BeamformingVectorPair GetBeamformingVectors(
90 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
91 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const = 0;
92
93 typedef std::pair<Ptr<NrSpectrumPhy>, Ptr<NrSpectrumPhy>> SpectrumPhyPair;
94
95 ObjectFactory
97};
98
99}; // namespace ns3
100
101#endif /* SRC_NR_HELPER_BEAMFORMING_HELPER_BASE_H_ */
The BeamformingHelperBase class that is being used as the general interface for beamforming helper cl...
BeamformingHelperBase()
BeamformingHelperBase constructor.
static TypeId GetTypeId()
Get the Type ID.
void SetBeamformingAlgorithmAttribute(const std::string &n, const AttributeValue &v)
Set an attribute for the beafmorming algorithm that will be created.
virtual void AddBeamformingTask(const Ptr< NrGnbNetDevice > &gNbDev, const Ptr< NrUeNetDevice > &ueDev)=0
Creates a new beamforming task, which means the pair of devices for which the configured algorithm fo...
ObjectFactory m_algorithmFactory
Object factory that will be used to create beamforming algorithms.
virtual BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const =0
Function that will call the configured algorithm for the specified devices and obtain the beamforming...
virtual void SetBeamformingMethod(const TypeId &beamformingMethod)=0
Set the beamforming method that will be executed each time when is necessary to update the beamformin...
~BeamformingHelperBase() override
~BeamformingHelperBase destructor
virtual void RunTask(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const
This function runs the beamforming algorithm among the provided gNB and UE device,...