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 * 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
16namespace 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 */
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 */
Smart pointer class similar to boost::intrusive_ptr.
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.