A Discrete-Event Network Simulator
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
27namespace 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 */
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 */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a 5 MHz spectrum resolution.
virtual Ptr< SpectrumValue > CreateConstant(double psd)
Creates a SpectrumValue instance with a constant value for all frequencies.
virtual ~SpectrumValue5MhzFactory()=default
Destructor.
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...
Every class exported by the ns3 library is enclosed in the ns3 namespace.