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
ism-spectrum-value-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 CTTC
3
* Copyright (c) 2017 Orange Labs
4
*
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;
8
*
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.
13
*
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
17
*
18
* Authors: Nicola Baldo <nbaldo@cttc.es>
19
* Giuseppe Piro <g.piro@poliba.it>
20
*/
21
22
#ifndef ISM_SPECTRUM_VALUE_HELPER_H
23
#define ISM_SPECTRUM_VALUE_HELPER_H
24
25
#include "
spectrum-value.h
"
26
27
namespace
ns3
28
{
29
30
/**
31
* \ingroup spectrum
32
*
33
* Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a
34
* 5 MHz spectrum resolution.
35
*
36
*/
37
class
SpectrumValue5MhzFactory
38
{
39
public
:
40
/**
41
* Destructor
42
*/
43
virtual
~SpectrumValue5MhzFactory
() =
default
;
44
/**
45
* Creates a SpectrumValue instance with a constant value for all frequencies
46
*
47
* @param psd the constant value
48
*
49
* @return a Ptr to a newly created SpectrumValue
50
*/
51
virtual
Ptr<SpectrumValue>
CreateConstant
(
double
psd);
52
/**
53
* Creates a SpectrumValue instance that represents the TX Power Spectral
54
* Density of a wifi device corresponding to the provided parameters
55
*
56
* Since the spectrum model has a resolution of 5 MHz, we model
57
* the transmitted signal with a constant density over a 20MHz
58
* bandwidth centered on the center frequency of the channel. The
59
* transmission power outside the transmission power density is
60
* calculated considering the transmit spectrum mask, see IEEE
61
* Std. 802.11-2007, Annex I. The two bands just outside of the main
62
* 20 MHz are allocated power at -28 dB down from the center 20 MHz,
63
* and the two bands outside of this are allocated power at -40 dB down
64
* (with a total bandwidth of 60 MHz containing non-zero power allocation).
65
*
66
* @param txPower the total TX power in W
67
* @param channel the number of the channel (1 <= channel <= 13)
68
*
69
* @return a Ptr to a newly created SpectrumValue
70
*/
71
virtual
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
(
double
txPower, uint8_t channel);
72
};
73
74
}
// namespace ns3
75
76
#endif
/* ISM_SPECTRUM_VALUE_HELPER_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::SpectrumValue5MhzFactory
Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a 5 MHz spectrum resolution.
Definition:
ism-spectrum-value-helper.h:38
ns3::SpectrumValue5MhzFactory::CreateConstant
virtual Ptr< SpectrumValue > CreateConstant(double psd)
Creates a SpectrumValue instance with a constant value for all frequencies.
Definition:
ism-spectrum-value-helper.cc:57
ns3::SpectrumValue5MhzFactory::~SpectrumValue5MhzFactory
virtual ~SpectrumValue5MhzFactory()=default
Destructor.
ns3::SpectrumValue5MhzFactory::CreateTxPowerSpectralDensity
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint8_t channel)
Creates a SpectrumValue instance that represents the TX Power Spectral Density of a wifi device corre...
Definition:
ism-spectrum-value-helper.cc:65
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
spectrum-value.h
src
spectrum
model
ism-spectrum-value-helper.h
Generated on Tue May 28 2024 23:39:17 for ns-3 by
1.9.6