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
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
46
static
TypeId
GetTypeId
(
void
);
47
48
49
// inherited from SpectrumChannel
50
virtual
void
AddPropagationLossModel
(
Ptr<PropagationLossModel>
loss);
51
virtual
void
AddSpectrumPropagationLossModel
(
Ptr<SpectrumPropagationLossModel>
loss);
52
virtual
void
SetPropagationDelayModel
(
Ptr<PropagationDelayModel>
delay);
53
virtual
void
AddRx
(
Ptr<SpectrumPhy>
phy);
54
virtual
void
StartTx
(
Ptr<SpectrumSignalParameters>
params);
55
56
57
// inherited from Channel
58
virtual
uint32_t
GetNDevices
(
void
)
const
;
59
virtual
Ptr<NetDevice>
GetDevice
(uint32_t i)
const
;
60
61
62
typedef
std::vector<Ptr<SpectrumPhy> >
PhyList
;
63
64
virtual
Ptr<SpectrumPropagationLossModel>
GetSpectrumPropagationLossModel
(
void
);
65
66
private
:
67
virtual
void
DoDispose
();
68
75
void
StartRx
(
Ptr<SpectrumSignalParameters>
params,
Ptr<SpectrumPhy>
receiver);
76
81
PhyList
m_phyList
;
82
87
Ptr<const SpectrumModel>
m_spectrumModel
;
88
89
94
Ptr<PropagationDelayModel>
m_propagationDelay
;
95
96
101
Ptr<PropagationLossModel>
m_propagationLoss
;
102
107
Ptr<SpectrumPropagationLossModel>
m_spectrumPropagationLoss
;
108
109
110
double
m_maxLossDb
;
111
112
TracedCallback<Ptr<SpectrumPhy>
,
Ptr<SpectrumPhy>
,
double
>
m_pathLossTrace
;
113
};
114
115
116
117
}
118
119
120
121
#endif
/* SINGLE_MODEL_SPECTRUM_CHANNEL_H */
ns3::Ptr< PropagationLossModel >
ns3::SingleModelSpectrumChannel::GetSpectrumPropagationLossModel
virtual Ptr< SpectrumPropagationLossModel > GetSpectrumPropagationLossModel(void)
Definition:
single-model-spectrum-channel.cc:261
ns3::SingleModelSpectrumChannel::m_propagationDelay
Ptr< PropagationDelayModel > m_propagationDelay
propagation delay model to be used with this channel
Definition:
single-model-spectrum-channel.h:94
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::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:102
ns3::SingleModelSpectrumChannel::AddSpectrumPropagationLossModel
virtual void AddSpectrumPropagationLossModel(Ptr< SpectrumPropagationLossModel > loss)
set the frequency-dependent propagation loss model to be used
Definition:
single-model-spectrum-channel.cc:244
ns3::SingleModelSpectrumChannel::AddPropagationLossModel
virtual void AddPropagationLossModel(Ptr< PropagationLossModel > loss)
set the single-frequency propagation loss model to be used
Definition:
single-model-spectrum-channel.cc:235
ns3::SingleModelSpectrumChannel::GetDevice
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
Definition:
single-model-spectrum-channel.cc:227
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:101
ns3::SingleModelSpectrumChannel::m_pathLossTrace
TracedCallback< Ptr< SpectrumPhy >, Ptr< SpectrumPhy >, double > m_pathLossTrace
Definition:
single-model-spectrum-channel.h:112
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:210
ns3::SingleModelSpectrumChannel::DoDispose
virtual void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
single-model-spectrum-channel.cc:56
ns3::SingleModelSpectrumChannel::GetNDevices
virtual uint32_t GetNDevices(void) const
Definition:
single-model-spectrum-channel.cc:219
ns3::SingleModelSpectrumChannel::PhyList
std::vector< Ptr< SpectrumPhy > > PhyList
Definition:
single-model-spectrum-channel.h:62
ns3::SingleModelSpectrumChannel::GetTypeId
static TypeId GetTypeId(void)
Definition:
single-model-spectrum-channel.cc:68
ns3::SingleModelSpectrumChannel::m_maxLossDb
double m_maxLossDb
Definition:
single-model-spectrum-channel.h:110
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:110
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:107
ns3::SingleModelSpectrumChannel::SingleModelSpectrumChannel
SingleModelSpectrumChannel()
Definition:
single-model-spectrum-channel.cc:50
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:252
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:81
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::SingleModelSpectrumChannel::m_spectrumModel
Ptr< const SpectrumModel > m_spectrumModel
SpectrumModel that this channel instance is supporting.
Definition:
single-model-spectrum-channel.h:87
src
spectrum
model
single-model-spectrum-channel.h
Generated on Sat Apr 19 2014 14:07:08 for ns-3 by
1.8.6