A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
phased-array-spectrum-propagation-loss-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 CTTC
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#ifndef PHASED_ARRAY_SPECTRUM_PROPAGATION_LOSS_MODEL_H
9#define PHASED_ARRAY_SPECTRUM_PROPAGATION_LOSS_MODEL_H
10
11#include "spectrum-value.h"
12
13#include <ns3/mobility-model.h>
14#include <ns3/object.h>
15#include <ns3/phased-array-model.h>
16
17namespace ns3
18{
19
20struct SpectrumSignalParameters;
21
22/**
23 * \ingroup spectrum
24 *
25 * \brief spectrum-aware propagation loss model that is
26 * compatible with PhasedArrayModel type of ns-3 antenna
27 *
28 * Interface for propagation loss models to be adopted when
29 * transmissions are modeled with a power spectral density by means of
30 * the SpectrumValue class, and when PhasedArrayModel type of atenna
31 * is being used for TX and RX.
32 *
33 */
35{
36 public:
39
40 /**
41 * \brief Get the type ID.
42 * \return the object TypeId
43 */
44 static TypeId GetTypeId();
45
46 /**
47 * Used to chain various instances of PhasedArraySpectrumPropagationLossModel
48 *
49 * @param next
50 */
52
53 /**
54 * Return the pointer to the next PhasedArraySpectrumPropagationLossModel, if any.
55 *
56 * @return Pointer to the next model, if any
57 */
59
60 /**
61 * This method is to be called to calculate
62 *
63 * @param txPsd the spectrum signal parameters.
64 * @param a sender mobility
65 * @param b receiver mobility
66 * @param aPhasedArrayModel the instance of the phased antenna array of the sender
67 * @param bPhasedArrayModel the instance of the phased antenna array of the receiver
68 *
69 * @return SpectrumSignalParameters in which is updated the PSD to contain
70 * a set of values Vs frequency representing the received
71 * power in the same units used for the txPower parameter,
72 * and additional chanSpectrumMatrix is computed to support MIMO systems.
73 */
78 Ptr<const PhasedArrayModel> aPhasedArrayModel,
79 Ptr<const PhasedArrayModel> bPhasedArrayModel) const;
80
81 /**
82 * If this loss model uses objects of type RandomVariableStream,
83 * set the stream numbers to the integers starting with the offset
84 * 'stream'. Return the number of streams (possibly zero) that
85 * have been assigned. If there are PhasedArraySpectrumPropagationLossModels
86 * chained together, this method will also assign streams to the
87 * downstream models.
88 *
89 * \param stream the stream index offset start
90 * \return the number of stream indices assigned by this model
91 */
92 int64_t AssignStreams(int64_t stream);
93
94 protected:
95 void DoDispose() override;
96 /**
97 * Assign a fixed random variable stream number to the random variables used by this model.
98 *
99 * Subclasses must implement this; those not using random variables can return zero.
100 *
101 * \param stream first stream index to use
102 * \return the number of stream indices assigned by this model
103 */
104 virtual int64_t DoAssignStreams(int64_t stream) = 0;
105
106 private:
107 /**
108 *
109 * @param params the spectrum signal parameters.
110 * @param a sender mobility
111 * @param b receiver mobility
112 * @param aPhasedArrayModel the instance of the phased antenna array of the sender
113 * @param bPhasedArrayModel the instance of the phased antenna array of the receiver
114 *
115 * @return SpectrumSignalParameters in which is updated the PSD to contain
116 * a set of values Vs frequency representing the received
117 * power in the same units used for the txPower parameter,
118 * and additional chanSpectrumMatrix is set.
119 */
124 Ptr<const PhasedArrayModel> aPhasedArrayModel,
125 Ptr<const PhasedArrayModel> bPhasedArrayModel) const = 0;
126
128 m_next; //!< PhasedArraySpectrumPropagationLossModel chained to this one.
129};
130
131} // namespace ns3
132
133#endif /* PHASED_ARRAY_SPECTRUM_PROPAGATION_LOSS_MODEL_H */
A base class which provides memory management and object aggregation.
Definition object.h:78
spectrum-aware propagation loss model that is compatible with PhasedArrayModel type of ns-3 antenna
void SetNext(Ptr< PhasedArraySpectrumPropagationLossModel > next)
Used to chain various instances of PhasedArraySpectrumPropagationLossModel.
virtual Ptr< SpectrumSignalParameters > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > params, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const =0
virtual int64_t DoAssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model.
int64_t AssignStreams(int64_t stream)
If this loss model uses objects of type RandomVariableStream, set the stream numbers to the integers ...
Ptr< PhasedArraySpectrumPropagationLossModel > GetNext() const
Return the pointer to the next PhasedArraySpectrumPropagationLossModel, if any.
Ptr< SpectrumSignalParameters > CalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
This method is to be called to calculate.
Ptr< PhasedArraySpectrumPropagationLossModel > m_next
PhasedArraySpectrumPropagationLossModel chained to this one.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.