1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
3
* Copyright (c) 2009 CTTC
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
* Author: Nicola Baldo <nbaldo@cttc.es>
21
#ifndef SPECTRUM_PROPAGATION_LOSS_MODEL_H
22
#define SPECTRUM_PROPAGATION_LOSS_MODEL_H
25
#include <ns3/object.h>
26
#include <ns3/mobility-model.h>
27
#include <ns3/spectrum-value.h>
37
* \brief spectrum-aware propagation loss model
39
* Interface for propagation loss models to be adopted when
40
* transmissions are modeled with a power spectral density by means of
41
* the SpectrumValue class.
44
class SpectrumPropagationLossModel : public Object
47
SpectrumPropagationLossModel ();
48
virtual ~SpectrumPropagationLossModel ();
50
static TypeId GetTypeId ();
54
* used to chain various instances of SpectrumPropagationLossModel
58
void SetNext (Ptr<SpectrumPropagationLossModel> next);
61
* This method is to be called to calculate
63
* @param txPsd the SpectrumValue representing the power spectral
64
* density of the transmission. Watt units are to be used for radio
65
* communications, and Pascal units for acoustic communications
68
* @param a sender mobility
69
* @param b receiver mobility
71
* @return set of values vs frequency representing the received
72
* power in the same units used for the txPower parameter.
74
Ptr<SpectrumValue> CalcRxPowerSpectralDensity (Ptr<const SpectrumValue> txPsd,
75
Ptr<const MobilityModel> a,
76
Ptr<const MobilityModel> b) const;
79
virtual void DoDispose ();
86
* @param txPsd set of values vs frequency representing the
87
* transmission power. See SpectrumChannel for details.
88
* @param a sender mobility
89
* @param b receiver mobility
91
* @return set of values vs frequency representing the received
92
* power in the same units used for the txPower parameter.
94
virtual Ptr<SpectrumValue> DoCalcRxPowerSpectralDensity (Ptr<const SpectrumValue> txPsd,
95
Ptr<const MobilityModel> a,
96
Ptr<const MobilityModel> b) const = 0;
98
Ptr<SpectrumPropagationLossModel> m_next;
108
#endif /* SPECTRUM_PROPAGATION_LOSS_MODEL_H */