5G-LENA nr-v3.0-33-g7aea1e4
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
beamforming-helper-base.h
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
3// Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4//
5// SPDX-License-Identifier: GPL-2.0-only
6
7#include <ns3/beamforming-vector.h>
8#include <ns3/object-factory.h>
9#include <ns3/object.h>
10#include <ns3/vector.h>
11
12#ifndef SRC_NR_HELPER_BEAMFORMING_HELPER_BASE_H_
13#define SRC_NR_HELPER_BEAMFORMING_HELPER_BASE_H_
14
15namespace ns3
16{
17
18class NrSpectrumPhy;
19class NrGnbNetDevice;
20class NrUeNetDevice;
21
30class BeamformingHelperBase : public Object
31{
32 public:
40 ~BeamformingHelperBase() override;
41
46 static TypeId GetTypeId();
47
56 virtual void AddBeamformingTask(const Ptr<NrGnbNetDevice>& gNbDev,
57 const Ptr<NrUeNetDevice>& ueDev) = 0;
58
64 virtual void SetBeamformingMethod(const TypeId& beamformingMethod) = 0;
65
71 void SetBeamformingAlgorithmAttribute(const std::string& n, const AttributeValue& v);
72
73 protected:
80 virtual void RunTask(const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
81 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const;
82
91 virtual BeamformingVectorPair GetBeamformingVectors(
92 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
93 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const = 0;
94
95 typedef std::pair<Ptr<NrSpectrumPhy>, Ptr<NrSpectrumPhy>> SpectrumPhyPair;
96
97 ObjectFactory
99};
100
101}; // namespace ns3
102
103#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,...