A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
17
namespace
ns3
18
{
19
20
struct
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
*/
34
class
PhasedArraySpectrumPropagationLossModel
:
public
Object
35
{
36
public
:
37
PhasedArraySpectrumPropagationLossModel
();
38
~PhasedArraySpectrumPropagationLossModel
()
override
;
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
*/
51
void
SetNext
(
Ptr<PhasedArraySpectrumPropagationLossModel>
next);
52
53
/**
54
* Return the pointer to the next PhasedArraySpectrumPropagationLossModel, if any.
55
*
56
* @return Pointer to the next model, if any
57
*/
58
Ptr<PhasedArraySpectrumPropagationLossModel>
GetNext
()
const
;
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
*/
74
Ptr<SpectrumSignalParameters>
CalcRxPowerSpectralDensity
(
75
Ptr<const SpectrumSignalParameters>
txPsd,
76
Ptr<const MobilityModel>
a,
77
Ptr<const MobilityModel>
b,
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
*/
120
virtual
Ptr<SpectrumSignalParameters>
DoCalcRxPowerSpectralDensity
(
121
Ptr<const SpectrumSignalParameters>
params,
122
Ptr<const MobilityModel>
a,
123
Ptr<const MobilityModel>
b,
124
Ptr<const PhasedArrayModel>
aPhasedArrayModel,
125
Ptr<const PhasedArrayModel>
bPhasedArrayModel)
const
= 0;
126
127
Ptr<PhasedArraySpectrumPropagationLossModel>
128
m_next
;
//!< PhasedArraySpectrumPropagationLossModel chained to this one.
129
};
130
131
}
// namespace ns3
132
133
#endif
/* PHASED_ARRAY_SPECTRUM_PROPAGATION_LOSS_MODEL_H */
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::PhasedArraySpectrumPropagationLossModel
spectrum-aware propagation loss model that is compatible with PhasedArrayModel type of ns-3 antenna
Definition
phased-array-spectrum-propagation-loss-model.h:35
ns3::PhasedArraySpectrumPropagationLossModel::SetNext
void SetNext(Ptr< PhasedArraySpectrumPropagationLossModel > next)
Used to chain various instances of PhasedArraySpectrumPropagationLossModel.
Definition
phased-array-spectrum-propagation-loss-model.cc:47
ns3::PhasedArraySpectrumPropagationLossModel::DoDispose
void DoDispose() override
Destructor implementation.
Definition
phased-array-spectrum-propagation-loss-model.cc:32
ns3::PhasedArraySpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity
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
ns3::PhasedArraySpectrumPropagationLossModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
phased-array-spectrum-propagation-loss-model.cc:38
ns3::PhasedArraySpectrumPropagationLossModel::DoAssignStreams
virtual int64_t DoAssignStreams(int64_t stream)=0
Assign a fixed random variable stream number to the random variables used by this model.
ns3::PhasedArraySpectrumPropagationLossModel::AssignStreams
int64_t AssignStreams(int64_t stream)
If this loss model uses objects of type RandomVariableStream, set the stream numbers to the integers ...
Definition
phased-array-spectrum-propagation-loss-model.cc:81
ns3::PhasedArraySpectrumPropagationLossModel::GetNext
Ptr< PhasedArraySpectrumPropagationLossModel > GetNext() const
Return the pointer to the next PhasedArraySpectrumPropagationLossModel, if any.
Definition
phased-array-spectrum-propagation-loss-model.cc:53
ns3::PhasedArraySpectrumPropagationLossModel::PhasedArraySpectrumPropagationLossModel
PhasedArraySpectrumPropagationLossModel()
Definition
phased-array-spectrum-propagation-loss-model.cc:22
ns3::PhasedArraySpectrumPropagationLossModel::CalcRxPowerSpectralDensity
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.
Definition
phased-array-spectrum-propagation-loss-model.cc:59
ns3::PhasedArraySpectrumPropagationLossModel::~PhasedArraySpectrumPropagationLossModel
~PhasedArraySpectrumPropagationLossModel() override
Definition
phased-array-spectrum-propagation-loss-model.cc:27
ns3::PhasedArraySpectrumPropagationLossModel::m_next
Ptr< PhasedArraySpectrumPropagationLossModel > m_next
PhasedArraySpectrumPropagationLossModel chained to this one.
Definition
phased-array-spectrum-propagation-loss-model.h:128
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
spectrum-value.h
src
spectrum
model
phased-array-spectrum-propagation-loss-model.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0