OLD | NEW |
(Empty) | |
| 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2010 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 WAVEFORM_GENERATOR_HELPER_H |
| 22 #define WAVEFORM_GENERATOR_HELPER_H |
| 23 |
| 24 |
| 25 #include <string> |
| 26 #include <ns3/attribute.h> |
| 27 #include <ns3/object-factory.h> |
| 28 #include <ns3/node-container.h> |
| 29 #include <ns3/net-device-container.h> |
| 30 #include <ns3/queue.h> |
| 31 |
| 32 |
| 33 namespace ns3 { |
| 34 |
| 35 |
| 36 class SpectrumValue; |
| 37 class SpectrumChannel; |
| 38 |
| 39 |
| 40 class WaveformGeneratorHelper |
| 41 { |
| 42 public: |
| 43 WaveformGeneratorHelper (); |
| 44 ~WaveformGeneratorHelper (); |
| 45 |
| 46 /** |
| 47 * set the SpectrumChannel that will be used by SpectrumPhy instances created
by this helper |
| 48 * |
| 49 * @param channel |
| 50 */ |
| 51 void SetChannel (Ptr<SpectrumChannel> channel); |
| 52 |
| 53 /** |
| 54 * set the SpectrumChannel that will be used by SpectrumPhy instances created
by this helper |
| 55 * |
| 56 * @param channel |
| 57 */ |
| 58 void SetChannel (std::string channelName); |
| 59 |
| 60 |
| 61 /** |
| 62 * |
| 63 * @param txPsd the Power Spectral Density to be used for transmission by all
created PHY instances |
| 64 */ |
| 65 void SetTxPowerSpectralDensity (Ptr<SpectrumValue> txPsd); |
| 66 |
| 67 |
| 68 /** |
| 69 * @param name the name of the attribute to set |
| 70 * @param v the value of the attribute |
| 71 * |
| 72 * Set these attributes on each HdOfdmSpectrumPhy instance to be created |
| 73 */ |
| 74 void SetPhyAttribute (std::string name, const AttributeValue &v); |
| 75 |
| 76 /** |
| 77 * @param n1 the name of the attribute to set |
| 78 * @param v1 the value of the attribute to set |
| 79 * |
| 80 * Set these attributes on each AlohaNoackNetDevice created |
| 81 */ |
| 82 void SetDeviceAttribute (std::string n1, const AttributeValue &v1); |
| 83 |
| 84 |
| 85 /** |
| 86 * @param c the set of nodes on which a device must be created |
| 87 * @return a device container which contains all the devices created by this
method. |
| 88 */ |
| 89 NetDeviceContainer Install (NodeContainer c) const; |
| 90 /** |
| 91 * @param node the node on which a device must be created |
| 92 * \returns a device container which contains all the devices created by this
method. |
| 93 */ |
| 94 NetDeviceContainer Install (Ptr<Node> node) const; |
| 95 /** |
| 96 * @param nodeName the name of node on which a device must be created |
| 97 * @return a device container which contains all the devices created by this m
ethod. |
| 98 */ |
| 99 NetDeviceContainer Install (std::string nodeName) const; |
| 100 |
| 101 |
| 102 protected: |
| 103 ObjectFactory m_phy; |
| 104 ObjectFactory m_device; |
| 105 Ptr<SpectrumChannel> m_channel; |
| 106 Ptr<SpectrumValue> m_txPsd; |
| 107 }; |
| 108 |
| 109 |
| 110 } // namespace ns3 |
| 111 |
| 112 |
| 113 #endif /* WAVEFORM_GENERATOR_HELPER_H */ |
OLD | NEW |