A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
waveform-generator-helper.h
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 
45 {
46 public:
49 
55  void SetChannel (Ptr<SpectrumChannel> channel);
56 
62  void SetChannel (std::string channelName);
63 
64 
70 
71 
78  void SetPhyAttribute (std::string name, const AttributeValue &v);
79 
86  void SetDeviceAttribute (std::string n1, const AttributeValue &v1);
87 
109  void SetAntenna (std::string type,
110  std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (),
111  std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
112  std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
113  std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
114  std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue (),
115  std::string n5 = "", const AttributeValue &v5 = EmptyAttributeValue (),
116  std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (),
117  std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ());
118 
128  NetDeviceContainer Install (Ptr<Node> node) const;
133  NetDeviceContainer Install (std::string nodeName) const;
134 
135 
136 protected:
137  ObjectFactory m_phy;
138  ObjectFactory m_device;
139  ObjectFactory m_antenna;
140  Ptr<SpectrumChannel> m_channel;
141  Ptr<SpectrumValue> m_txPsd;
142 };
143 
144 
145 } // namespace ns3
146 
147 
148 #endif /* WAVEFORM_GENERATOR_HELPER_H */
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
Hold a value for an Attribute.
Definition: attribute.h:51
NetDeviceContainer Install(NodeContainer c) const
void SetPhyAttribute(std::string name, const AttributeValue &v)
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
A class for an empty attribute value.
Definition: attribute.h:204
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void SetAntenna(std::string type, std::string n0="", const AttributeValue &v0=EmptyAttributeValue(), std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue())
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
instantiate subclasses of ns3::Object.
void SetChannel(Ptr< SpectrumChannel > channel)