OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2011 The Boeing Company |
| 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: Gary Pei <guangyu.pei@boeing.com> |
| 19 */ |
| 20 #ifndef LR_WPAN_SPECTRUM_VALUE_HELPER_H |
| 21 #define LR_WPAN_SPECTRUM_VALUE_HELPER_H |
| 22 |
| 23 #include <ns3/ptr.h> |
| 24 |
| 25 namespace ns3 { |
| 26 |
| 27 class SpectrumValue; |
| 28 |
| 29 /** |
| 30 * \ingroup lr-wpan |
| 31 * |
| 32 * \brief This class defines all functions to create spectrum model for LrWpan |
| 33 */ |
| 34 class LrWpanSpectrumValueHelper |
| 35 { |
| 36 public: |
| 37 LrWpanSpectrumValueHelper (void); |
| 38 virtual ~LrWpanSpectrumValueHelper (void); |
| 39 |
| 40 /** |
| 41 * \brief create spectrum value |
| 42 * \param txPower the power transmission in dBm |
| 43 * \param channel the channel number per IEEE802.15.4 |
| 44 * \return a Ptr to a newly created SpectrumValue instance |
| 45 */ |
| 46 Ptr<SpectrumValue> CreateTxPowerSpectralDensity (double txPower, uint32_t chan
nel); |
| 47 |
| 48 /** |
| 49 * \brief create spectrum value for noise |
| 50 * \param channel the channel number per IEEE802.15.4 |
| 51 * \return a Ptr to a newly created SpectrumValue instance |
| 52 */ |
| 53 Ptr<SpectrumValue> CreateNoisePowerSpectralDensity (uint32_t channel); |
| 54 |
| 55 /** |
| 56 * \brief total average power of the signal is the integral of the PSD |
| 57 * \param power spectral density |
| 58 * \return total power (using composite trap. rule to numerally integrate |
| 59 */ |
| 60 static double TotalAvgPower (Ptr<const SpectrumValue> psd); |
| 61 |
| 62 private: |
| 63 double m_noiseFactor; |
| 64 |
| 65 }; |
| 66 |
| 67 } //namespace ns3 |
| 68 |
| 69 #endif /* LR_WPAN_SPECTRUM_VALUE_HELPER_H */ |
OLD | NEW |