OLD | NEW |
(Empty) | |
| 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 |
| 31 /**· |
| 32 * this abstract class defines the interface for interacting with all WifiSpectr
umValue implementations. |
| 33 * |
| 34 */ |
| 35 class WifiSpectrumValueHelper· |
| 36 { |
| 37 public: |
| 38 |
| 39 /* |
| 40 * |
| 41 * @param value the constant value |
| 42 *· |
| 43 * @return a Ptr to a newly created SpectrumValue instance which |
| 44 * has a constant value for all frequencies |
| 45 */ |
| 46 virtual Ptr<SpectrumValue> CreateConstant (double psd) = 0; |
| 47 |
| 48 /* |
| 49 * |
| 50 * @param txPower the total TX power in W |
| 51 * @param channel the number of the channel· |
| 52 *· |
| 53 * @return a Ptr to a newly created SpectrumValue instance which |
| 54 * represents the TX Power Spectral Density of a wifi device |
| 55 * corresponding to the provided parameters |
| 56 */ |
| 57 virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity (double txPower, uint3
2_t channel) = 0; |
| 58 |
| 59 /* |
| 60 * |
| 61 * @param channel the number of the channel· |
| 62 *· |
| 63 * @return a Ptr to a newly created SpectrumValue instance which |
| 64 * represents the frequency response of the RF filter which is used |
| 65 * by a wifi device to receive signals when tuned to a particular channel |
| 66 */ |
| 67 virtual Ptr<SpectrumValue> CreateRfFilter (uint32_t channel) = 0; |
| 68 ·· |
| 69 }; |
| 70 |
| 71 |
| 72 |
| 73 /**· |
| 74 * Implements WifiSpectrumValue for the 2.4 GHz ISM band only, with a |
| 75 * 5 MHz spectrum resolution. |
| 76 * |
| 77 */ |
| 78 class WifiSpectrumValue5MhzFactory |
| 79 { |
| 80 public: |
| 81 |
| 82 // inherited from WifiSpectrumValue |
| 83 virtual Ptr<SpectrumValue> CreateConstant (double psd); |
| 84 virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity (double txPower, uint3
2_t channel); |
| 85 virtual Ptr<SpectrumValue> CreateRfFilter (uint32_t channel); |
| 86 |
| 87 }; |
| 88 |
| 89 |
| 90 ·· |
| 91 } //namespace ns3 |
| 92 |
| 93 |
| 94 |
| 95 #endif /* WIFI_SPECTRUM_VALUE_HELPER_H */ |
OLD | NEW |