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
spectrum-propagation-loss-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 CTTC
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Nicola Baldo <nbaldo@cttc.es>
7
*/
8
9
#ifndef SPECTRUM_PROPAGATION_LOSS_MODEL_H
10
#define SPECTRUM_PROPAGATION_LOSS_MODEL_H
11
12
#include "
spectrum-value.h
"
13
14
#include <ns3/mobility-model.h>
15
#include <ns3/object.h>
16
17
namespace
ns3
18
{
19
20
struct
SpectrumSignalParameters;
21
22
/**
23
* @ingroup spectrum
24
*
25
* @brief spectrum-aware propagation loss model
26
*
27
* Interface for propagation loss models to be adopted when
28
* transmissions are modeled with a power spectral density by means of
29
* the SpectrumValue class.
30
*
31
*/
32
class
SpectrumPropagationLossModel
:
public
Object
33
{
34
public
:
35
SpectrumPropagationLossModel
();
36
~SpectrumPropagationLossModel
()
override
;
37
38
/**
39
* @brief Get the type ID.
40
* @return the object TypeId
41
*/
42
static
TypeId
GetTypeId
();
43
44
/**
45
* Used to chain various instances of SpectrumPropagationLossModel
46
*
47
* @param next
48
*/
49
void
SetNext
(
Ptr<SpectrumPropagationLossModel>
next);
50
51
/**
52
* Return the pointer to the next SpectrumPropagationLossModel, if any.
53
*
54
* @return Pointer to the next model, if any.
55
*/
56
Ptr<SpectrumPropagationLossModel>
GetNext
()
const
;
57
58
/**
59
* This method is to be called to calculate
60
*
61
* @param params the spectrum signal parameters.
62
* @param a sender mobility
63
* @param b receiver mobility
64
*
65
* @return set of values Vs frequency representing the received
66
* power in the same units used for the txPower parameter.
67
*/
68
Ptr<SpectrumValue>
CalcRxPowerSpectralDensity
(
Ptr<const SpectrumSignalParameters>
params,
69
Ptr<const MobilityModel>
a,
70
Ptr<const MobilityModel>
b)
const
;
71
72
/**
73
* If this loss model uses objects of type RandomVariableStream,
74
* set the stream numbers to the integers starting with the offset
75
* 'stream'. Return the number of streams (possibly zero) that
76
* have been assigned. If there are SpectrumPropagationLossModels chained
77
* together, this method will also assign streams to the
78
* downstream models.
79
*
80
* @param stream the stream index offset start
81
* @return the number of stream indices assigned by this model
82
*/
83
int64_t
AssignStreams
(int64_t stream);
84
85
protected
:
86
void
DoDispose
()
override
;
87
/**
88
* Assign a fixed random variable stream number to the random variables used by this model.
89
*
90
* Subclasses must implement this; those not using random variables can return zero.
91
*
92
* @param stream first stream index to use
93
* @return the number of stream indices assigned by this model
94
*/
95
virtual
int64_t
DoAssignStreams
(int64_t stream) = 0;
96
97
private
:
98
/**
99
*
100
* @param params the spectrum signal parameters.
101
* @param a sender mobility
102
* @param b receiver mobility
103
*
104
* @return set of values Vs frequency representing the received
105
* power in the same units used for the txPower parameter.
106
*/
107
virtual
Ptr<SpectrumValue>
DoCalcRxPowerSpectralDensity
(
108
Ptr<const SpectrumSignalParameters>
params,
109
Ptr<const MobilityModel>
a,
110
Ptr<const MobilityModel>
b)
const
= 0;
111
112
Ptr<SpectrumPropagationLossModel>
m_next
;
//!< SpectrumPropagationLossModel chained to this one.
113
};
114
115
}
// namespace ns3
116
117
#endif
/* SPECTRUM_PROPAGATION_LOSS_MODEL_H */
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SpectrumPropagationLossModel
spectrum-aware propagation loss model
Definition
spectrum-propagation-loss-model.h:33
ns3::SpectrumPropagationLossModel::SpectrumPropagationLossModel
SpectrumPropagationLossModel()
Definition
spectrum-propagation-loss-model.cc:22
ns3::SpectrumPropagationLossModel::CalcRxPowerSpectralDensity
Ptr< SpectrumValue > CalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > params, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
This method is to be called to calculate.
Definition
spectrum-propagation-loss-model.cc:58
ns3::SpectrumPropagationLossModel::DoCalcRxPowerSpectralDensity
virtual Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > params, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
ns3::SpectrumPropagationLossModel::~SpectrumPropagationLossModel
~SpectrumPropagationLossModel() override
Definition
spectrum-propagation-loss-model.cc:27
ns3::SpectrumPropagationLossModel::SetNext
void SetNext(Ptr< SpectrumPropagationLossModel > next)
Used to chain various instances of SpectrumPropagationLossModel.
Definition
spectrum-propagation-loss-model.cc:46
ns3::SpectrumPropagationLossModel::m_next
Ptr< SpectrumPropagationLossModel > m_next
SpectrumPropagationLossModel chained to this one.
Definition
spectrum-propagation-loss-model.h:112
ns3::SpectrumPropagationLossModel::AssignStreams
int64_t AssignStreams(int64_t stream)
If this loss model uses objects of type RandomVariableStream, set the stream numbers to the integers ...
Definition
spectrum-propagation-loss-model.cc:71
ns3::SpectrumPropagationLossModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
spectrum-propagation-loss-model.cc:38
ns3::SpectrumPropagationLossModel::GetNext
Ptr< SpectrumPropagationLossModel > GetNext() const
Return the pointer to the next SpectrumPropagationLossModel, if any.
Definition
spectrum-propagation-loss-model.cc:52
ns3::SpectrumPropagationLossModel::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::SpectrumPropagationLossModel::DoDispose
void DoDispose() override
Destructor implementation.
Definition
spectrum-propagation-loss-model.cc:32
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
spectrum-propagation-loss-model.h
Generated on Sun Dec 8 2024 18:20:48 for ns-3 by
1.11.0