A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
29 
30 
38 {
39 public:
40  virtual ~WifiSpectrumValueHelper ();
41  /*
42  *
43  * @param value the constant value
44  *
45  * @return a Ptr to a newly created SpectrumValue instance which
46  * has a constant value for all frequencies
47  */
48  virtual Ptr<SpectrumValue> CreateConstant (double psd) = 0;
49 
50  /*
51  *
52  * @param txPower the total TX power in W
53  * @param channel the number of the channel
54  *
55  * @return a Ptr to a newly created SpectrumValue instance which
56  * represents the TX Power Spectral Density of a wifi device
57  * corresponding to the provided parameters
58  */
59  virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity (double txPower, uint32_t channel) = 0;
60 
61  /*
62  *
63  * @param channel the number of the channel
64  *
65  * @return a Ptr to a newly created SpectrumValue instance which
66  * represents the frequency response of the RF filter which is used
67  * by a wifi device to receive signals when tuned to a particular channel
68  */
69  virtual Ptr<SpectrumValue> CreateRfFilter (uint32_t channel) = 0;
70 
71 };
72 
73 
74 
83 {
84 public:
86  // inherited from WifiSpectrumValue
87  virtual Ptr<SpectrumValue> CreateConstant (double psd);
88  virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity (double txPower, uint32_t channel);
89  virtual Ptr<SpectrumValue> CreateRfFilter (uint32_t channel);
90 
91 };
92 
93 
94 
95 } // namespace ns3
96 
97 
98 
99 #endif /* WIFI_SPECTRUM_VALUE_HELPER_H */
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint32_t channel)=0
virtual Ptr< SpectrumValue > CreateConstant(double psd)=0
virtual Ptr< SpectrumValue > CreateRfFilter(uint32_t channel)=0
virtual Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint32_t channel)
this abstract class defines the interface for interacting with all WifiSpectrumValue implementations...
virtual Ptr< SpectrumValue > CreateConstant(double psd)
virtual Ptr< SpectrumValue > CreateRfFilter(uint32_t channel)
Implements WifiSpectrumValue for the 2.4 GHz ISM band only, with a 5 MHz spectrum resolution...