author | Mitch Watrous <watrous@u.washington.edu> |
Wed, 18 May 2011 17:24:04 -0700 | |
changeset 7241 | 0a7a16b599e8 |
parent 6801 | f07f7f809160 |
permissions | -rw-r--r-- |
6349 | 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_PHY_HELPER_H |
|
22 |
#define ADHOC_ALOHA_NOACK_IDEAL_PHY_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 |
/** |
|
7241
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6801
diff
changeset
|
39 |
* \ingroup spectrum |
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6801
diff
changeset
|
40 |
* |
6349 | 41 |
* |
42 |
* create the NetDevice depicted in the figure |
|
43 |
* @image html HdOfdmAlohaNoAck.png |
|
44 |
* |
|
45 |
*/ |
|
46 |
class AdhocAlohaNoackIdealPhyHelper |
|
47 |
{ |
|
48 |
public: |
|
49 |
AdhocAlohaNoackIdealPhyHelper (); |
|
50 |
~AdhocAlohaNoackIdealPhyHelper (); |
|
51 |
||
52 |
/** |
|
53 |
* set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper |
|
54 |
* |
|
55 |
* @param channel |
|
56 |
*/ |
|
57 |
void SetChannel (Ptr<SpectrumChannel> channel); |
|
58 |
||
59 |
/** |
|
60 |
* set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper |
|
61 |
* |
|
6445 | 62 |
* @param channelName |
6349 | 63 |
*/ |
64 |
void SetChannel (std::string channelName); |
|
65 |
||
66 |
||
67 |
/** |
|
68 |
* |
|
69 |
* @param txPsd the Power Spectral Density to be used for transmission by all created PHY instances |
|
70 |
*/ |
|
71 |
void SetTxPowerSpectralDensity (Ptr<SpectrumValue> txPsd); |
|
72 |
||
73 |
/** |
|
74 |
* |
|
75 |
* @param noisePsd the Power Spectral Density to be used for transmission by all created PHY instances |
|
76 |
*/ |
|
77 |
void SetNoisePowerSpectralDensity (Ptr<SpectrumValue> noisePsd); |
|
78 |
||
79 |
/** |
|
80 |
* @param name the name of the attribute to set |
|
81 |
* @param v the value of the attribute |
|
82 |
* |
|
83 |
* Set these attributes on each HdOfdmSpectrumPhy instance to be created |
|
84 |
*/ |
|
85 |
void SetPhyAttribute (std::string name, const AttributeValue &v); |
|
86 |
||
87 |
/** |
|
88 |
* @param n1 the name of the attribute to set |
|
89 |
* @param v1 the value of the attribute to set |
|
90 |
* |
|
91 |
* Set these attributes on each AlohaNoackNetDevice created |
|
92 |
*/ |
|
93 |
void SetDeviceAttribute (std::string n1, const AttributeValue &v1); |
|
94 |
||
95 |
||
96 |
/** |
|
97 |
* @param c the set of nodes on which a device must be created |
|
98 |
* @return a device container which contains all the devices created by this method. |
|
99 |
*/ |
|
100 |
NetDeviceContainer Install (NodeContainer c) const; |
|
101 |
/** |
|
102 |
* @param node the node on which a device must be created |
|
103 |
* \returns a device container which contains all the devices created by this method. |
|
104 |
*/ |
|
105 |
NetDeviceContainer Install (Ptr<Node> node) const; |
|
106 |
/** |
|
107 |
* @param nodeName the name of node on which a device must be created |
|
108 |
* @return a device container which contains all the devices created by this method. |
|
109 |
*/ |
|
110 |
NetDeviceContainer Install (std::string nodeName) const; |
|
111 |
||
112 |
||
113 |
protected: |
|
114 |
ObjectFactory m_phy; |
|
115 |
ObjectFactory m_device; |
|
116 |
ObjectFactory m_queue; |
|
117 |
Ptr<SpectrumChannel> m_channel; |
|
118 |
Ptr<SpectrumValue> m_txPsd; |
|
119 |
Ptr<SpectrumValue> m_noisePsd; |
|
120 |
}; |
|
121 |
||
122 |
||
123 |
||
124 |
} // namespace ns3 |
|
125 |
||
126 |
#endif /* ADHOC_ALOHA_NOACK_IDEAL_PHY_HELPER_H */ |