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