A Discrete-Event Network Simulator
API
three-gpp-spectrum-propagation-loss-model.h
Go to the documentation of this file.
1/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2015, NYU WIRELESS, Tandon School of Engineering,
4 * New York University
5 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
6 * University of Padova
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
23#define THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
24
25#include <complex.h>
26#include <map>
27#include <unordered_map>
28#include "ns3/matrix-based-channel-model.h"
29#include "ns3/random-variable-stream.h"
30#include "ns3/phased-array-spectrum-propagation-loss-model.h"
31
32namespace ns3 {
33
34class NetDevice;
35
51{
52public:
57
62
63 void DoDispose () override;
64
69 static TypeId GetTypeId ();
70
76
82
89 void SetChannelModelAttribute (const std::string &name, const AttributeValue &value);
90
97 void GetChannelModelAttribute (const std::string &name, AttributeValue &value) const;
98
123 Ptr<const PhasedArrayModel> aPhasedArrayModel,
124 Ptr<const PhasedArrayModel> bPhasedArrayModel) const override;
125
126private:
130 struct LongTerm : public SimpleRefCount<LongTerm>
131 {
136 };
137
142 double GetFrequency () const;
143
154 Ptr<const PhasedArrayModel> aPhasedArrayModel,
155 Ptr<const PhasedArrayModel> bPhasedArrayModel) const;
165 const PhasedArrayModel::ComplexVector &uW) const;
166
181 const Vector &sSpeed, const Vector &uSpeed) const;
182
183 mutable std::unordered_map < uint64_t, Ptr<const LongTerm> > m_longTermMap;
185};
186} // namespace ns3
187
188#endif /* THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H */
Hold a value for an Attribute.
Definition: attribute.h:69
std::vector< std::complex< double > > ComplexVector
type definition for complex vectors
spectrum-aware propagation loss model that is compatible with PhasedArrayModel type of ns-3 antenna
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
A template-based reference counting class.
void GetChannelModelAttribute(const std::string &name, AttributeValue &value) const
Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumValue > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const override
Computes the received PSD.
PhasedArrayModel::ComplexVector GetLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
Looks for the long term component in m_longTermMap.
Ptr< MatrixBasedChannelModel > m_channelModel
the model to generate the channel matrix
void SetChannelModel(Ptr< MatrixBasedChannelModel > channel)
Set the channel model object.
std::unordered_map< uint64_t, Ptr< const LongTerm > > m_longTermMap
map containing the long term components
void SetChannelModelAttribute(const std::string &name, const AttributeValue &value)
Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< MatrixBasedChannelModel > GetChannelModel() const
Get the channel model object.
Ptr< SpectrumValue > CalcBeamformingGain(Ptr< SpectrumValue > txPsd, PhasedArrayModel::ComplexVector longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, const Vector &sSpeed, const Vector &uSpeed) const
Computes the beamforming gain and applies it to the tx PSD.
PhasedArrayModel::ComplexVector CalcLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, const PhasedArrayModel::ComplexVector &sW, const PhasedArrayModel::ComplexVector &uW) const
Computes the long term component.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
channel
Definition: third.py:92
Data structure that stores the long term component for a tx-rx pair.
PhasedArrayModel::ComplexVector m_uW
the beamforming vector for the node u used to compute the long term
Ptr< const MatrixBasedChannelModel::ChannelMatrix > m_channel
pointer to the channel matrix used to compute the long term
PhasedArrayModel::ComplexVector m_longTerm
vector containing the long term component for each cluster
PhasedArrayModel::ComplexVector m_sW
the beamforming vector for the node s used to compute the long term