A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
waveform-generator.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 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_H
22
#define WAVEFORM_GENERATOR_H
23
24
25
#include <ns3/spectrum-value.h>
26
#include <ns3/mobility-model.h>
27
#include <ns3/packet.h>
28
#include <ns3/nstime.h>
29
#include <ns3/net-device.h>
30
#include <ns3/spectrum-phy.h>
31
#include <ns3/spectrum-channel.h>
32
#include <ns3/trace-source-accessor.h>
33
34
namespace
ns3 {
35
36
37
class
AntennaModel;
38
52
class
WaveformGenerator
:
public
SpectrumPhy
53
{
54
55
public
:
56
WaveformGenerator
();
57
virtual
~WaveformGenerator
();
58
59
static
TypeId
GetTypeId
(
void
);
60
61
// inherited from SpectrumPhy
62
void
SetChannel
(
Ptr<SpectrumChannel>
c);
63
void
SetMobility
(
Ptr<MobilityModel>
m);
64
void
SetDevice
(
Ptr<NetDevice>
d);
65
Ptr<MobilityModel>
GetMobility
();
66
Ptr<NetDevice>
GetDevice
();
67
Ptr<const SpectrumModel>
GetRxSpectrumModel
()
const
;
68
Ptr<AntennaModel>
GetRxAntenna
();
69
void
StartRx
(
Ptr<SpectrumSignalParameters>
params);
70
71
77
void
SetTxPowerSpectralDensity
(
Ptr<SpectrumValue>
txs);
78
85
void
SetPeriod
(
Time
period);
86
87
93
Time
GetPeriod
()
const
;
94
95
100
void
SetDutyCycle
(
double
value);
101
106
double
GetDutyCycle
()
const
;
107
113
void
SetAntenna
(
Ptr<AntennaModel>
a);
114
119
virtual
void
Start
();
120
125
virtual
void
Stop
();
126
127
128
private
:
129
virtual
void
DoDispose
(
void
);
130
131
Ptr<MobilityModel>
m_mobility
;
132
Ptr<AntennaModel>
m_antenna
;
133
Ptr<NetDevice>
m_netDevice
;
134
Ptr<SpectrumChannel>
m_channel
;
135
136
virtual
void
GenerateWaveform
();
137
138
Ptr<SpectrumValue>
m_txPowerSpectralDensity
;
139
Time
m_period
;
140
double
m_dutyCycle
;
141
Time
m_startTime
;
142
bool
m_active
;
143
144
TracedCallback<Ptr<const Packet>
>
m_phyTxStartTrace
;
145
TracedCallback<Ptr<const Packet>
>
m_phyTxEndTrace
;
146
};
147
148
149
150
151
152
153
}
// namespace ns3
154
155
156
157
158
159
#endif
/* WAVEFORM_GENERATOR_H */
ns3::WaveformGenerator::DoDispose
virtual void DoDispose(void)
Definition:
waveform-generator.cc:56
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::SpectrumPhy
Definition:
spectrum-phy.h:45
ns3::WaveformGenerator::SetDevice
void SetDevice(Ptr< NetDevice > d)
Definition:
waveform-generator.cc:116
ns3::WaveformGenerator::m_antenna
Ptr< AntennaModel > m_antenna
Definition:
waveform-generator.h:132
ns3::WaveformGenerator::m_mobility
Ptr< MobilityModel > m_mobility
Definition:
waveform-generator.h:131
ns3::WaveformGenerator::m_active
bool m_active
Definition:
waveform-generator.h:142
ns3::TracedCallback
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
Definition:
traced-callback.h:43
ns3::WaveformGenerator::m_phyTxStartTrace
TracedCallback< Ptr< const Packet > > m_phyTxStartTrace
Definition:
waveform-generator.h:144
ns3::WaveformGenerator::m_txPowerSpectralDensity
Ptr< SpectrumValue > m_txPowerSpectralDensity
Definition:
waveform-generator.h:138
ns3::WaveformGenerator::StartRx
void StartRx(Ptr< SpectrumSignalParameters > params)
Definition:
waveform-generator.cc:139
ns3::WaveformGenerator::SetChannel
void SetChannel(Ptr< SpectrumChannel > c)
Definition:
waveform-generator.cc:130
ns3::WaveformGenerator::GetPeriod
Time GetPeriod() const
Definition:
waveform-generator.cc:171
ns3::WaveformGenerator::SetTxPowerSpectralDensity
void SetTxPowerSpectralDensity(Ptr< SpectrumValue > txs)
Definition:
waveform-generator.cc:145
ns3::WaveformGenerator::SetDutyCycle
void SetDutyCycle(double value)
Definition:
waveform-generator.cc:179
ns3::WaveformGenerator::Start
virtual void Start()
Definition:
waveform-generator.cc:215
ns3::WaveformGenerator::m_period
Time m_period
Definition:
waveform-generator.h:139
ns3::WaveformGenerator::m_startTime
Time m_startTime
Definition:
waveform-generator.h:141
ns3::WaveformGenerator
Definition:
waveform-generator.h:52
ns3::WaveformGenerator::GetRxAntenna
Ptr< AntennaModel > GetRxAntenna()
Definition:
waveform-generator.cc:152
ns3::WaveformGenerator::GenerateWaveform
virtual void GenerateWaveform()
Definition:
waveform-generator.cc:192
ns3::WaveformGenerator::WaveformGenerator
WaveformGenerator()
Definition:
waveform-generator.cc:37
ns3::WaveformGenerator::GetTypeId
static TypeId GetTypeId(void)
Definition:
waveform-generator.cc:65
ns3::WaveformGenerator::SetPeriod
void SetPeriod(Time period)
Definition:
waveform-generator.cc:165
ns3::WaveformGenerator::m_phyTxEndTrace
TracedCallback< Ptr< const Packet > > m_phyTxEndTrace
Definition:
waveform-generator.h:145
ns3::WaveformGenerator::SetAntenna
void SetAntenna(Ptr< AntennaModel > a)
Definition:
waveform-generator.cc:158
ns3::WaveformGenerator::Stop
virtual void Stop()
Definition:
waveform-generator.cc:229
ns3::WaveformGenerator::GetMobility
Ptr< MobilityModel > GetMobility()
Definition:
waveform-generator.cc:102
ns3::WaveformGenerator::m_channel
Ptr< SpectrumChannel > m_channel
Definition:
waveform-generator.h:134
ns3::WaveformGenerator::~WaveformGenerator
virtual ~WaveformGenerator()
Definition:
waveform-generator.cc:49
ns3::WaveformGenerator::m_netDevice
Ptr< NetDevice > m_netDevice
Definition:
waveform-generator.h:133
ns3::WaveformGenerator::SetMobility
void SetMobility(Ptr< MobilityModel > m)
Definition:
waveform-generator.cc:123
ns3::WaveformGenerator::m_dutyCycle
double m_dutyCycle
Definition:
waveform-generator.h:140
ns3::WaveformGenerator::GetDevice
Ptr< NetDevice > GetDevice()
Definition:
waveform-generator.cc:95
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::WaveformGenerator::GetDutyCycle
double GetDutyCycle() const
Definition:
waveform-generator.cc:184
ns3::WaveformGenerator::GetRxSpectrumModel
Ptr< const SpectrumModel > GetRxSpectrumModel() const
Definition:
waveform-generator.cc:109
src
spectrum
model
waveform-generator.h
Generated on Sat Nov 16 2013 16:17:52 for ns-3 by
1.8.5