A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
single-model-spectrum-channel.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 CTTC
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Nicola Baldo <nbaldo@cttc.es>
18
*/
19
20
#ifndef SINGLE_MODEL_SPECTRUM_CHANNEL_H
21
#define SINGLE_MODEL_SPECTRUM_CHANNEL_H
22
23
#include <ns3/spectrum-channel.h>
24
#include <ns3/spectrum-model.h>
25
#include <ns3/traced-callback.h>
26
27
namespace
ns3
28
{
29
37
class
SingleModelSpectrumChannel
:
public
SpectrumChannel
38
{
39
public
:
40
SingleModelSpectrumChannel
();
41
46
static
TypeId
GetTypeId
();
47
48
// inherited from SpectrumChannel
49
void
RemoveRx
(
Ptr<SpectrumPhy>
phy
)
override
;
50
void
AddRx
(
Ptr<SpectrumPhy>
phy
)
override
;
51
void
StartTx
(
Ptr<SpectrumSignalParameters>
params
)
override
;
52
53
// inherited from Channel
54
std::size_t
GetNDevices
()
const override
;
55
Ptr<NetDevice>
GetDevice
(std::size_t i)
const override
;
56
58
typedef
std::vector<Ptr<SpectrumPhy>>
PhyList
;
59
60
private
:
61
void
DoDispose
()
override
;
62
69
void
StartRx
(
Ptr<SpectrumSignalParameters>
params
,
Ptr<SpectrumPhy>
receiver);
70
74
PhyList
m_phyList
;
75
79
Ptr<const SpectrumModel>
m_spectrumModel
;
80
};
81
82
}
// namespace ns3
83
84
#endif
/* SINGLE_MODEL_SPECTRUM_CHANNEL_H */
ns3::Ptr< SpectrumPhy >
ns3::SingleModelSpectrumChannel
SpectrumChannel implementation which handles a single spectrum model.
Definition:
single-model-spectrum-channel.h:38
ns3::SingleModelSpectrumChannel::m_spectrumModel
Ptr< const SpectrumModel > m_spectrumModel
SpectrumModel that this channel instance is supporting.
Definition:
single-model-spectrum-channel.h:79
ns3::SingleModelSpectrumChannel::m_phyList
PhyList m_phyList
List of SpectrumPhy instances attached to the channel.
Definition:
single-model-spectrum-channel.h:74
ns3::SingleModelSpectrumChannel::StartTx
void StartTx(Ptr< SpectrumSignalParameters > params) override
Used by attached PHY instances to transmit signals on the channel.
Definition:
single-model-spectrum-channel.cc:94
ns3::SingleModelSpectrumChannel::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
single-model-spectrum-channel.cc:53
ns3::SingleModelSpectrumChannel::RemoveRx
void RemoveRx(Ptr< SpectrumPhy > phy) override
Remove a SpectrumPhy from a channel.
Definition:
single-model-spectrum-channel.cc:73
ns3::SingleModelSpectrumChannel::SingleModelSpectrumChannel
SingleModelSpectrumChannel()
Definition:
single-model-spectrum-channel.cc:47
ns3::SingleModelSpectrumChannel::AddRx
void AddRx(Ptr< SpectrumPhy > phy) override
Add a SpectrumPhy to a channel, so it can receive packets.
Definition:
single-model-spectrum-channel.cc:84
ns3::SingleModelSpectrumChannel::GetDevice
Ptr< NetDevice > GetDevice(std::size_t i) const override
Definition:
single-model-spectrum-channel.cc:246
ns3::SingleModelSpectrumChannel::GetNDevices
std::size_t GetNDevices() const override
Definition:
single-model-spectrum-channel.cc:239
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:225
ns3::SingleModelSpectrumChannel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
single-model-spectrum-channel.cc:62
ns3::SingleModelSpectrumChannel::PhyList
std::vector< Ptr< SpectrumPhy > > PhyList
Container: SpectrumPhy objects.
Definition:
single-model-spectrum-channel.h:58
ns3::SpectrumChannel
Defines the interface for spectrum-aware channel implementations.
Definition:
spectrum-channel.h:48
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
third.phy
phy
Definition:
third.py:82
two-ray-to-three-gpp-ch-calibration.params
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.
Definition:
two-ray-to-three-gpp-ch-calibration.py:468
src
spectrum
model
single-model-spectrum-channel.h
Generated on Fri Mar 31 2023 13:30:50 for ns-3 by
1.9.1