A Discrete-Event Network Simulator
API
wifi-spectrum-value-helper.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 CTTC
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  * Author: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 #ifndef WIFI_SPECTRUM_VALUE_HELPER_H
22 #define WIFI_SPECTRUM_VALUE_HELPER_H
23 
24 
25 #include <ns3/spectrum-value.h>
26 
27 namespace ns3 {
28 
37 {
38 public:
42  virtual ~WifiSpectrumValueHelper ();
43 
54  static Ptr<SpectrumModel> GetSpectrumModel (uint32_t centerFrequency, uint32_t channelWidth);
55 
65  static Ptr<SpectrumValue> CreateHtOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint32_t channelWidth, double txPowerW);
66 
75  static Ptr<SpectrumValue> CreateOfdmTxPowerSpectralDensity (uint32_t centerFrequency, uint32_t channelWidth, double txPowerW);
76 
86  static Ptr<SpectrumValue> CreateDsssTxPowerSpectralDensity (uint32_t centerFrequency, double txPowerW);
87 
95  static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (uint32_t centerFrequency, uint32_t channelWidth, double noiseFigure);
96 
102  static Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (double noiseFigure, Ptr<SpectrumModel> spectrumModel);
103 
110  static Ptr<SpectrumValue> CreateRfFilter (uint32_t centerFrequency, uint32_t channelWidth);
111 };
112 
121 {
122 public:
134  virtual Ptr<SpectrumValue> CreateConstant (double psd);
154  virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity (double txPower, uint32_t channel);
164  virtual Ptr<SpectrumValue> CreateRfFilter (uint32_t channel);
165 };
166 
167 } // namespace ns3
168 
169 #endif /* WIFI_SPECTRUM_VALUE_HELPER_H */
tuple channel
Definition: third.py:85
static Ptr< SpectrumModel > GetSpectrumModel(uint32_t centerFrequency, uint32_t channelWidth)
Return a SpectrumModel instance corresponding to the center frequency and channel width...
static Ptr< SpectrumValue > CreateHtOfdmTxPowerSpectralDensity(uint32_t centerFrequency, uint32_t channelWidth, double txPowerW)
Create a transmit power spectral density corresponding to OFDM High Throughput (HT) (802...
static Ptr< SpectrumValue > CreateDsssTxPowerSpectralDensity(uint32_t centerFrequency, double txPowerW)
Create a transmit power spectral density corresponding to DSSS.
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint32_t channel)
Creates a SpectrumValue instance that represents the TX Power Spectral Density of a wifi device corre...
This class defines all functions to create a spectrum model for Wi-Fi based on a a spectral model ali...
static Ptr< SpectrumValue > CreateRfFilter(uint32_t centerFrequency, uint32_t channelWidth)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ptr< SpectrumValue > CreateConstant(double psd)
Creates a SpectrumValue instance with a constant value for all frequencies.
static Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t centerFrequency, uint32_t channelWidth, double noiseFigure)
virtual Ptr< SpectrumValue > CreateRfFilter(uint32_t channel)
Creates a SpectrumValue instance which represents the frequency response of the RF filter which is us...
static Ptr< SpectrumValue > CreateOfdmTxPowerSpectralDensity(uint32_t centerFrequency, uint32_t channelWidth, double txPowerW)
Create a transmit power spectral density corresponding to OFDM (802.11a/g).
virtual ~WifiSpectrumValueHelper()
Destructor.
Implements Wifi SpectrumValue for the 2.4 GHz ISM band only, with a 5 MHz spectrum resolution...