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
single-model-spectrum-channel.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 SINGLE_MODEL_SPECTRUM_CHANNEL_H
22
#define SINGLE_MODEL_SPECTRUM_CHANNEL_H
23
24
25
#include <ns3/spectrum-channel.h>
26
#include <ns3/spectrum-model.h>
27
#include <ns3/traced-callback.h>
28
29
namespace
ns3
{
30
31
32
40
class
SingleModelSpectrumChannel
:
public
SpectrumChannel
41
{
42
43
public
:
44
SingleModelSpectrumChannel
();
45
50
static
TypeId
GetTypeId
(
void
);
51
52
// inherited from SpectrumChannel
53
virtual
void
AddPropagationLossModel
(
Ptr<PropagationLossModel>
loss);
54
virtual
void
AddSpectrumPropagationLossModel
(
Ptr<SpectrumPropagationLossModel>
loss);
55
virtual
void
SetPropagationDelayModel
(
Ptr<PropagationDelayModel>
delay);
56
virtual
void
AddRx
(
Ptr<SpectrumPhy>
phy
);
57
virtual
void
StartTx
(
Ptr<SpectrumSignalParameters>
params);
58
59
60
// inherited from Channel
61
virtual
uint32_t
GetNDevices
(
void
)
const
;
62
virtual
Ptr<NetDevice>
GetDevice
(uint32_t i)
const
;
63
65
typedef
std::vector<Ptr<SpectrumPhy> >
PhyList
;
66
71
virtual
Ptr<SpectrumPropagationLossModel>
GetSpectrumPropagationLossModel
(
void
);
72
73
private
:
74
virtual
void
DoDispose
();
75
82
void
StartRx
(
Ptr<SpectrumSignalParameters>
params,
Ptr<SpectrumPhy>
receiver);
83
87
PhyList
m_phyList
;
88
92
Ptr<const SpectrumModel>
m_spectrumModel
;
93
94
98
Ptr<PropagationDelayModel>
m_propagationDelay
;
99
100
104
Ptr<PropagationLossModel>
m_propagationLoss
;
105
109
Ptr<SpectrumPropagationLossModel>
m_spectrumPropagationLoss
;
110
111
117
double
m_maxLossDb
;
118
124
TracedCallback<Ptr<SpectrumPhy>
,
Ptr<SpectrumPhy>
,
double
>
m_pathLossTrace
;
125
};
126
127
128
129
}
130
131
132
133
#endif
/* SINGLE_MODEL_SPECTRUM_CHANNEL_H */
ns3::Ptr< PropagationLossModel >
ns3::SingleModelSpectrumChannel::GetSpectrumPropagationLossModel
virtual Ptr< SpectrumPropagationLossModel > GetSpectrumPropagationLossModel(void)
Get the frequency-dependent propagation loss model.
Definition:
single-model-spectrum-channel.cc:271
ns3::SingleModelSpectrumChannel::m_propagationDelay
Ptr< PropagationDelayModel > m_propagationDelay
Propagation delay model to be used with this channel.
Definition:
single-model-spectrum-channel.h:98
ns3::TracedCallback
Forward calls to a chain of Callback.
Definition:
traced-callback.h:62
ns3::SingleModelSpectrumChannel::AddRx
virtual void AddRx(Ptr< SpectrumPhy > phy)
Add a SpectrumPhy to a channel, so it can receive packets.
Definition:
single-model-spectrum-channel.cc:106
ns3::SingleModelSpectrumChannel::AddSpectrumPropagationLossModel
virtual void AddSpectrumPropagationLossModel(Ptr< SpectrumPropagationLossModel > loss)
Add the frequency-dependent propagation loss model to be used.
Definition:
single-model-spectrum-channel.cc:251
ns3::SingleModelSpectrumChannel::AddPropagationLossModel
virtual void AddPropagationLossModel(Ptr< PropagationLossModel > loss)
Add the single-frequency propagation loss model to be used.
Definition:
single-model-spectrum-channel.cc:239
ns3::SingleModelSpectrumChannel::GetDevice
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
Definition:
single-model-spectrum-channel.cc:231
ns3::SingleModelSpectrumChannel::m_propagationLoss
Ptr< PropagationLossModel > m_propagationLoss
Single-frequency propagation loss model to be used with this channel.
Definition:
single-model-spectrum-channel.h:104
ns3::SingleModelSpectrumChannel::m_pathLossTrace
TracedCallback< Ptr< SpectrumPhy >, Ptr< SpectrumPhy >, double > m_pathLossTrace
Definition:
single-model-spectrum-channel.h:124
ns3::SingleModelSpectrumChannel::StartRx
void StartRx(Ptr< SpectrumSignalParameters > params, Ptr< SpectrumPhy > receiver)
Used internally to reschedule transmission after the propagation delay.
Definition:
single-model-spectrum-channel.cc:214
third.phy
tuple phy
Definition:
third.py:86
ns3::SingleModelSpectrumChannel::DoDispose
virtual void DoDispose()
Destructor implementation.
Definition:
single-model-spectrum-channel.cc:53
ns3::SingleModelSpectrumChannel::GetNDevices
virtual uint32_t GetNDevices(void) const
Definition:
single-model-spectrum-channel.cc:223
ns3::SingleModelSpectrumChannel::PhyList
std::vector< Ptr< SpectrumPhy > > PhyList
Container: SpectrumPhy objects.
Definition:
single-model-spectrum-channel.h:65
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::SingleModelSpectrumChannel::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
single-model-spectrum-channel.cc:65
ns3::SingleModelSpectrumChannel::m_maxLossDb
double m_maxLossDb
Maximum loss [dB].
Definition:
single-model-spectrum-channel.h:117
ns3::SingleModelSpectrumChannel::StartTx
virtual void StartTx(Ptr< SpectrumSignalParameters > params)
Used by attached PHY instances to transmit signals on the channel.
Definition:
single-model-spectrum-channel.cc:114
ns3::SingleModelSpectrumChannel::m_spectrumPropagationLoss
Ptr< SpectrumPropagationLossModel > m_spectrumPropagationLoss
Frequency-dependent propagation loss model to be used with this channel.
Definition:
single-model-spectrum-channel.h:109
ns3::SingleModelSpectrumChannel::SingleModelSpectrumChannel
SingleModelSpectrumChannel()
Definition:
single-model-spectrum-channel.cc:47
ns3::SingleModelSpectrumChannel
SpectrumChannel implementation which handles a single spectrum model.
Definition:
single-model-spectrum-channel.h:40
ns3::SingleModelSpectrumChannel::SetPropagationDelayModel
virtual void SetPropagationDelayModel(Ptr< PropagationDelayModel > delay)
Set the propagation delay model to be used.
Definition:
single-model-spectrum-channel.cc:262
ns3::SpectrumChannel
Defines the interface for spectrum-aware channel implementations.
Definition:
spectrum-channel.h:46
ns3::SingleModelSpectrumChannel::m_phyList
PhyList m_phyList
List of SpectrumPhy instances attached to the channel.
Definition:
single-model-spectrum-channel.h:87
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::SingleModelSpectrumChannel::m_spectrumModel
Ptr< const SpectrumModel > m_spectrumModel
SpectrumModel that this channel instance is supporting.
Definition:
single-model-spectrum-channel.h:92
src
spectrum
model
single-model-spectrum-channel.h
Generated on Wed Mar 21 2018 14:24:27 for ns-3 by
1.8.9.1