A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
spectrum
helper
spectrum-analyzer-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 SPECTRUM_ANALYZER_HELPER_H
22
#define SPECTRUM_ANALYZER_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
class
SpectrumModel;
39
44
class
SpectrumAnalyzerHelper
45
{
46
public
:
47
SpectrumAnalyzerHelper
();
48
~SpectrumAnalyzerHelper
();
49
55
void
SetChannel
(
Ptr<SpectrumChannel>
channel
);
56
62
void
SetChannel
(std::string channelName);
63
70
void
SetPhyAttribute
(std::string name,
const
AttributeValue
&v);
71
78
void
SetDeviceAttribute
(std::string n1,
const
AttributeValue
&v1);
79
101
void
SetAntenna
(std::string type,
102
std::string n0 =
""
,
const
AttributeValue
&v0 =
EmptyAttributeValue
(),
103
std::string n1 =
""
,
const
AttributeValue
&v1 =
EmptyAttributeValue
(),
104
std::string n2 =
""
,
const
AttributeValue
&v2 =
EmptyAttributeValue
(),
105
std::string n3 =
""
,
const
AttributeValue
&v3 =
EmptyAttributeValue
(),
106
std::string n4 =
""
,
const
AttributeValue
&v4 =
EmptyAttributeValue
(),
107
std::string n5 =
""
,
const
AttributeValue
&v5 =
EmptyAttributeValue
(),
108
std::string n6 =
""
,
const
AttributeValue
&v6 =
EmptyAttributeValue
(),
109
std::string n7 =
""
,
const
AttributeValue
&v7 =
EmptyAttributeValue
());
110
116
void
SetRxSpectrumModel
(
Ptr<SpectrumModel>
m);
117
118
124
void
EnableAsciiAll
(std::string prefix);
125
130
NetDeviceContainer
Install
(
NodeContainer
c)
const
;
135
NetDeviceContainer
Install
(
Ptr<Node>
node)
const
;
140
NetDeviceContainer
Install
(std::string nodeName)
const
;
141
142
143
private
:
144
ObjectFactory
m_phy
;
145
ObjectFactory
m_device
;
146
ObjectFactory
m_antenna
;
147
148
Ptr<SpectrumChannel>
m_channel
;
149
Ptr<SpectrumModel>
m_rxSpectrumModel
;
150
std::string
m_prefix
;
151
};
152
153
154
}
// namespace ns3
155
156
157
#endif
/* SPECTRUM_ANALYZER_HELPER_H */
ns3::SpectrumAnalyzerHelper
Class to allow the Spectrum Analysis.
Definition:
spectrum-analyzer-helper.h:44
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::SpectrumAnalyzerHelper::SpectrumAnalyzerHelper
SpectrumAnalyzerHelper()
Definition:
spectrum-analyzer-helper.cc:74
ns3::SpectrumAnalyzerHelper::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:
spectrum-analyzer-helper.cc:119
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:68
ns3::SpectrumAnalyzerHelper::SetDeviceAttribute
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Definition:
spectrum-analyzer-helper.cc:112
ns3::SpectrumAnalyzerHelper::m_device
ObjectFactory m_device
Object factory for the NetDevice objects.
Definition:
spectrum-analyzer-helper.h:145
third.channel
channel
Definition:
third.py:85
ns3::EmptyAttributeValue
A class for an empty attribute value.
Definition:
attribute.h:232
ns3::SpectrumAnalyzerHelper::m_rxSpectrumModel
Ptr< SpectrumModel > m_rxSpectrumModel
Spectrum model.
Definition:
spectrum-analyzer-helper.h:149
ns3::SpectrumAnalyzerHelper::m_phy
ObjectFactory m_phy
Object factory for the phy objects.
Definition:
spectrum-analyzer-helper.h:144
ns3::SpectrumAnalyzerHelper::m_prefix
std::string m_prefix
Prefix for the output files.
Definition:
spectrum-analyzer-helper.h:150
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:41
ns3::SpectrumAnalyzerHelper::~SpectrumAnalyzerHelper
~SpectrumAnalyzerHelper()
Definition:
spectrum-analyzer-helper.cc:82
ns3::SpectrumAnalyzerHelper::SetPhyAttribute
void SetPhyAttribute(std::string name, const AttributeValue &v)
Definition:
spectrum-analyzer-helper.cc:104
ns3::SpectrumAnalyzerHelper::Install
NetDeviceContainer Install(NodeContainer c) const
Definition:
spectrum-analyzer-helper.cc:160
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:38
ns3::SpectrumAnalyzerHelper::m_channel
Ptr< SpectrumChannel > m_channel
Channel.
Definition:
spectrum-analyzer-helper.h:148
ns3::SpectrumAnalyzerHelper::m_antenna
ObjectFactory m_antenna
Object factory for the Antenna objects.
Definition:
spectrum-analyzer-helper.h:146
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:47
ns3::SpectrumAnalyzerHelper::SetChannel
void SetChannel(Ptr< SpectrumChannel > channel)
Set the SpectrumChannel that will be used by SpectrumPhy instances created by this helper...
Definition:
spectrum-analyzer-helper.cc:88
ns3::SpectrumAnalyzerHelper::SetRxSpectrumModel
void SetRxSpectrumModel(Ptr< SpectrumModel > m)
Set the spectrum model used by the created SpectrumAnalyzer instances to represent incoming signals...
Definition:
spectrum-analyzer-helper.cc:144
ns3::SpectrumAnalyzerHelper::EnableAsciiAll
void EnableAsciiAll(std::string prefix)
Enable ASCII output.
Definition:
spectrum-analyzer-helper.cc:151
Generated on Wed Nov 7 2018 10:02:09 for ns-3 by
1.8.14