A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
single-model-spectrum-channel.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 CTTC
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Nicola Baldo <nbaldo@cttc.es>
7
*/
8
9
#ifndef SINGLE_MODEL_SPECTRUM_CHANNEL_H
10
#define SINGLE_MODEL_SPECTRUM_CHANNEL_H
11
12
#include "
spectrum-channel.h
"
13
#include "
spectrum-model.h
"
14
15
#include <ns3/traced-callback.h>
16
17
namespace
ns3
18
{
19
20
/**
21
* \ingroup spectrum
22
*
23
* \brief SpectrumChannel implementation which handles a single spectrum model
24
*
25
* All SpectrumPhy layers attached to this SpectrumChannel
26
*/
27
class
SingleModelSpectrumChannel
:
public
SpectrumChannel
28
{
29
public
:
30
SingleModelSpectrumChannel
();
31
32
/**
33
* \brief Get the type ID.
34
* \return the object TypeId
35
*/
36
static
TypeId
GetTypeId
();
37
38
// inherited from SpectrumChannel
39
void
RemoveRx
(
Ptr<SpectrumPhy>
phy)
override
;
40
void
AddRx
(
Ptr<SpectrumPhy>
phy)
override
;
41
void
StartTx
(
Ptr<SpectrumSignalParameters>
params)
override
;
42
43
// inherited from Channel
44
std::size_t
GetNDevices
()
const override
;
45
Ptr<NetDevice>
GetDevice
(std::size_t i)
const override
;
46
47
/// Container: SpectrumPhy objects
48
typedef
std::vector<Ptr<SpectrumPhy>>
PhyList
;
49
50
private
:
51
void
DoDispose
()
override
;
52
53
/**
54
* Used internally to reschedule transmission after the propagation delay.
55
*
56
* \param params
57
* \param receiver
58
*/
59
void
StartRx
(
Ptr<SpectrumSignalParameters>
params,
Ptr<SpectrumPhy>
receiver);
60
61
/**
62
* List of SpectrumPhy instances attached to the channel.
63
*/
64
PhyList
m_phyList
;
65
66
/**
67
* SpectrumModel that this channel instance is supporting.
68
*/
69
Ptr<const SpectrumModel>
m_spectrumModel
;
70
};
71
72
}
// namespace ns3
73
74
#endif
/* SINGLE_MODEL_SPECTRUM_CHANNEL_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SingleModelSpectrumChannel
SpectrumChannel implementation which handles a single spectrum model.
Definition
single-model-spectrum-channel.h:28
ns3::SingleModelSpectrumChannel::m_spectrumModel
Ptr< const SpectrumModel > m_spectrumModel
SpectrumModel that this channel instance is supporting.
Definition
single-model-spectrum-channel.h:69
ns3::SingleModelSpectrumChannel::m_phyList
PhyList m_phyList
List of SpectrumPhy instances attached to the channel.
Definition
single-model-spectrum-channel.h:64
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:90
ns3::SingleModelSpectrumChannel::DoDispose
void DoDispose() override
Destructor implementation.
Definition
single-model-spectrum-channel.cc:44
ns3::SingleModelSpectrumChannel::RemoveRx
void RemoveRx(Ptr< SpectrumPhy > phy) override
Remove a SpectrumPhy from a channel.
Definition
single-model-spectrum-channel.cc:64
ns3::SingleModelSpectrumChannel::SingleModelSpectrumChannel
SingleModelSpectrumChannel()
Definition
single-model-spectrum-channel.cc:38
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:75
ns3::SingleModelSpectrumChannel::GetDevice
Ptr< NetDevice > GetDevice(std::size_t i) const override
Definition
single-model-spectrum-channel.cc:245
ns3::SingleModelSpectrumChannel::GetNDevices
std::size_t GetNDevices() const override
Definition
single-model-spectrum-channel.cc:238
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:224
ns3::SingleModelSpectrumChannel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
single-model-spectrum-channel.cc:53
ns3::SingleModelSpectrumChannel::PhyList
std::vector< Ptr< SpectrumPhy > > PhyList
Container: SpectrumPhy objects.
Definition
single-model-spectrum-channel.h:48
ns3::SpectrumChannel
Defines the interface for spectrum-aware channel implementations.
Definition
spectrum-channel.h:39
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
spectrum-channel.h
spectrum-model.h
src
spectrum
model
single-model-spectrum-channel.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0