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
* SPDX-License-Identifier: GPL-2.0-only
6
*
7
* Authors: Nicola Baldo <nbaldo@cttc.es>
8
* Giuseppe Piro <g.piro@poliba.it>
9
*/
10
11
#ifndef ISM_SPECTRUM_VALUE_HELPER_H
12
#define ISM_SPECTRUM_VALUE_HELPER_H
13
14
#include "
spectrum-value.h
"
15
16
namespace
ns3
17
{
18
19
/**
20
* \ingroup spectrum
21
*
22
* Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a
23
* 5 MHz spectrum resolution.
24
*
25
*/
26
class
SpectrumValue5MhzFactory
27
{
28
public
:
29
/**
30
* Destructor
31
*/
32
virtual
~SpectrumValue5MhzFactory
() =
default
;
33
/**
34
* Creates a SpectrumValue instance with a constant value for all frequencies
35
*
36
* @param psd the constant value
37
*
38
* @return a Ptr to a newly created SpectrumValue
39
*/
40
virtual
Ptr<SpectrumValue>
CreateConstant
(
double
psd);
41
/**
42
* Creates a SpectrumValue instance that represents the TX Power Spectral
43
* Density of a wifi device corresponding to the provided parameters
44
*
45
* Since the spectrum model has a resolution of 5 MHz, we model
46
* the transmitted signal with a constant density over a 20MHz
47
* bandwidth centered on the center frequency of the channel. The
48
* transmission power outside the transmission power density is
49
* calculated considering the transmit spectrum mask, see IEEE
50
* Std. 802.11-2007, Annex I. The two bands just outside of the main
51
* 20 MHz are allocated power at -28 dB down from the center 20 MHz,
52
* and the two bands outside of this are allocated power at -40 dB down
53
* (with a total bandwidth of 60 MHz containing non-zero power allocation).
54
*
55
* @param txPower the total TX power in W
56
* @param channel the number of the channel (1 <= channel <= 13)
57
*
58
* @return a Ptr to a newly created SpectrumValue
59
*/
60
virtual
Ptr<SpectrumValue>
CreateTxPowerSpectralDensity
(
double
txPower, uint8_t channel);
61
};
62
63
}
// namespace ns3
64
65
#endif
/* ISM_SPECTRUM_VALUE_HELPER_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
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:27
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:46
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:54
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 Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0