A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
waveform-generator-helper.h
Go to the documentation of this file.
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
class
WaveformGeneratorHelper
46
{
47
public
:
48
WaveformGeneratorHelper
();
49
~WaveformGeneratorHelper
();
50
56
void
SetChannel
(
Ptr<SpectrumChannel>
channel
);
57
63
void
SetChannel
(std::string channelName);
64
65
70
void
SetTxPowerSpectralDensity
(
Ptr<SpectrumValue>
txPsd);
71
72
79
void
SetPhyAttribute
(std::string name,
const
AttributeValue
&v);
80
87
void
SetDeviceAttribute
(std::string n1,
const
AttributeValue
&v1);
88
110
void
SetAntenna
(std::string type,
111
std::string n0 =
""
,
const
AttributeValue
&v0 =
EmptyAttributeValue
(),
112
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
113
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
114
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
115
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
116
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
117
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
118
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
());
119
124
NetDeviceContainer
Install
(
NodeContainer
c)
const
;
129
NetDeviceContainer
Install
(
Ptr<Node>
node)
const
;
134
NetDeviceContainer
Install
(std::string nodeName)
const
;
135
136
137
protected
:
138
ObjectFactory
m_phy
;
139
ObjectFactory
m_device
;
140
ObjectFactory
m_antenna
;
141
Ptr<SpectrumChannel>
m_channel
;
142
Ptr<SpectrumValue>
m_txPsd
;
143
};
144
145
146
}
// namespace ns3
147
148
149
#endif
/* WAVEFORM_GENERATOR_HELPER_H */
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:69
ns3::EmptyAttributeValue
A class for an empty attribute value.
Definition:
attribute.h:233
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:42
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:39
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::WaveformGeneratorHelper
Create a Waveform generator, which can be used to inject specific noise in the channel.
Definition:
waveform-generator-helper.h:46
ns3::WaveformGeneratorHelper::SetTxPowerSpectralDensity
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txPsd)
Definition:
waveform-generator-helper.cc:65
ns3::WaveformGeneratorHelper::m_txPsd
Ptr< SpectrumValue > m_txPsd
Tx power spectral density.
Definition:
waveform-generator-helper.h:142
ns3::WaveformGeneratorHelper::SetDeviceAttribute
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Definition:
waveform-generator-helper.cc:80
ns3::WaveformGeneratorHelper::~WaveformGeneratorHelper
~WaveformGeneratorHelper()
Definition:
waveform-generator-helper.cc:47
ns3::WaveformGeneratorHelper::m_phy
ObjectFactory m_phy
Object factory for the phy objects.
Definition:
waveform-generator-helper.h:138
ns3::WaveformGeneratorHelper::SetChannel
void SetChannel(Ptr< SpectrumChannel > channel)
set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper
Definition:
waveform-generator-helper.cc:52
ns3::WaveformGeneratorHelper::m_channel
Ptr< SpectrumChannel > m_channel
Channel.
Definition:
waveform-generator-helper.h:141
ns3::WaveformGeneratorHelper::Install
NetDeviceContainer Install(NodeContainer c) const
Definition:
waveform-generator-helper.cc:110
ns3::WaveformGeneratorHelper::SetPhyAttribute
void SetPhyAttribute(std::string name, const AttributeValue &v)
Definition:
waveform-generator-helper.cc:73
ns3::WaveformGeneratorHelper::m_device
ObjectFactory m_device
Object factory for the NetDevice objects.
Definition:
waveform-generator-helper.h:139
ns3::WaveformGeneratorHelper::m_antenna
ObjectFactory m_antenna
Object factory for the Antenna objects.
Definition:
waveform-generator-helper.h:140
ns3::WaveformGeneratorHelper::SetAntenna
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())
Definition:
waveform-generator-helper.cc:86
ns3::WaveformGeneratorHelper::WaveformGeneratorHelper
WaveformGeneratorHelper()
Definition:
waveform-generator-helper.cc:40
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
third.channel
channel
Definition:
third.py:92
src
spectrum
helper
waveform-generator-helper.h
Generated on Tue Feb 6 2024 19:21:27 for ns-3 by
1.9.1