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
spectrum-phy.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 SPECTRUM_PHY_H
10
#define SPECTRUM_PHY_H
11
12
#include <ns3/nstime.h>
13
#include <ns3/object.h>
14
15
namespace
ns3
16
{
17
18
class
PacketBurst;
19
class
SpectrumChannel;
20
class
MobilityModel;
21
class
AntennaModel;
22
class
PhasedArrayModel;
23
class
SpectrumValue;
24
class
SpectrumModel;
25
class
NetDevice;
26
struct
SpectrumSignalParameters;
27
28
/**
29
* \ingroup spectrum
30
*
31
* Abstract base class for Spectrum-aware PHY layers
32
*
33
*/
34
class
SpectrumPhy
:
public
Object
35
{
36
public
:
37
SpectrumPhy
();
38
~SpectrumPhy
()
override
;
39
40
// Delete copy constructor and assignment operator to avoid misuse
41
SpectrumPhy
(
const
SpectrumPhy
&) =
delete
;
42
SpectrumPhy
&
operator=
(
const
SpectrumPhy
&) =
delete
;
43
44
/**
45
* \brief Get the type ID.
46
* \return the object TypeId
47
*/
48
static
TypeId
GetTypeId
();
49
50
/**
51
* Set the associated NetDevice instance
52
*
53
* @param d the NetDevice instance
54
*/
55
virtual
void
SetDevice
(
Ptr<NetDevice>
d) = 0;
56
57
/**
58
* Get the associated NetDevice instance
59
*
60
* @return a Ptr to the associated NetDevice instance
61
*/
62
virtual
Ptr<NetDevice>
GetDevice
()
const
= 0;
63
64
/**
65
* Set the mobility model associated with this device.
66
*
67
* @param m the mobility model
68
*/
69
virtual
void
SetMobility
(
Ptr<MobilityModel>
m) = 0;
70
71
/**
72
* Get the associated MobilityModel instance
73
*
74
* @return a Ptr to the associated MobilityModel instance
75
*/
76
virtual
Ptr<MobilityModel>
GetMobility
()
const
= 0;
77
78
/**
79
* Set the channel attached to this device.
80
*
81
* @param c the channel
82
*/
83
virtual
void
SetChannel
(
Ptr<SpectrumChannel>
c) = 0;
84
85
/**
86
*
87
* @return returns the SpectrumModel that this SpectrumPhy expects to be used
88
* for all SpectrumValues that are passed to StartRx. If 0 is
89
* returned, it means that any model will be accepted.
90
*/
91
virtual
Ptr<const SpectrumModel>
GetRxSpectrumModel
()
const
= 0;
92
93
/**
94
* \brief Get the AntennaModel used by this SpectrumPhy instance for
95
* transmission and/or reception
96
*
97
* Note that in general and depending on each module design, there can be
98
* multiple SpectrumPhy instances per NetDevice.
99
*
100
* @return a Ptr to the AntennaModel used by this SpectrumPhy instance for
101
* transmission and/or reception
102
*/
103
virtual
Ptr<Object>
GetAntenna
()
const
= 0;
104
105
/**
106
* Notify the SpectrumPhy instance of an incoming signal
107
*
108
* @param params the parameters of the signals being received
109
*/
110
virtual
void
StartRx
(
Ptr<SpectrumSignalParameters>
params) = 0;
111
};
112
}
// namespace ns3
113
114
#endif
/* SPECTRUM_PHY_H */
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::SpectrumPhy
Abstract base class for Spectrum-aware PHY layers.
Definition
spectrum-phy.h:35
ns3::SpectrumPhy::GetMobility
virtual Ptr< MobilityModel > GetMobility() const =0
Get the associated MobilityModel instance.
ns3::SpectrumPhy::SetMobility
virtual void SetMobility(Ptr< MobilityModel > m)=0
Set the mobility model associated with this device.
ns3::SpectrumPhy::GetAntenna
virtual Ptr< Object > GetAntenna() const =0
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
ns3::SpectrumPhy::operator=
SpectrumPhy & operator=(const SpectrumPhy &)=delete
ns3::SpectrumPhy::SpectrumPhy
SpectrumPhy()
Definition
spectrum-phy.cc:32
ns3::SpectrumPhy::GetDevice
virtual Ptr< NetDevice > GetDevice() const =0
Get the associated NetDevice instance.
ns3::SpectrumPhy::StartRx
virtual void StartRx(Ptr< SpectrumSignalParameters > params)=0
Notify the SpectrumPhy instance of an incoming signal.
ns3::SpectrumPhy::~SpectrumPhy
~SpectrumPhy() override
Definition
spectrum-phy.cc:37
ns3::SpectrumPhy::SpectrumPhy
SpectrumPhy(const SpectrumPhy &)=delete
ns3::SpectrumPhy::GetRxSpectrumModel
virtual Ptr< const SpectrumModel > GetRxSpectrumModel() const =0
ns3::SpectrumPhy::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
spectrum-phy.cc:26
ns3::SpectrumPhy::SetChannel
virtual void SetChannel(Ptr< SpectrumChannel > c)=0
Set the channel attached to this device.
ns3::SpectrumPhy::SetDevice
virtual void SetDevice(Ptr< NetDevice > d)=0
Set the associated NetDevice instance.
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.
src
spectrum
model
spectrum-phy.h
Generated on Fri Nov 8 2024 13:59:06 for ns-3 by
1.11.0