A Discrete-Event Network Simulator
API
lr-wpan-spectrum-value-helper.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 The Boeing Company
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Gary Pei <guangyu.pei@boeing.com>
18  */
19 #ifndef LR_WPAN_SPECTRUM_VALUE_HELPER_H
20 #define LR_WPAN_SPECTRUM_VALUE_HELPER_H
21 
22 #include <ns3/ptr.h>
23 
24 namespace ns3
25 {
26 
27 class SpectrumValue;
28 
35 {
36  public:
39 
47 
54 
59  void SetNoiseFactor(double f);
60 
68  static double TotalAvgPower(Ptr<const SpectrumValue> psd, uint32_t channel);
69 
70  private:
76  double m_noiseFactor;
77 };
78 
79 } // namespace ns3
80 
81 #endif /* LR_WPAN_SPECTRUM_VALUE_HELPER_H */
double f(double x, void *params)
Definition: 80211b.c:70
This class defines all functions to create spectrum model for LrWpan.
Ptr< SpectrumValue > CreateNoisePowerSpectralDensity(uint32_t channel)
create spectrum value for noise
double m_noiseFactor
A scaling factor for the noise power.
static double TotalAvgPower(Ptr< const SpectrumValue > psd, uint32_t channel)
total average power of the signal is the integral of the PSD using the limits of the given channel
Ptr< SpectrumValue > CreateTxPowerSpectralDensity(double txPower, uint32_t channel)
create spectrum value
void SetNoiseFactor(double f)
Set the noise factor added to the thermal noise.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
channel
Definition: third.py:88