A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
rem-spectrum-phy.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 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 REM_SPECTRUM_PHY_H
21
#define REM_SPECTRUM_PHY_H
22
23
#include <ns3/mobility-model.h>
24
#include <ns3/net-device.h>
25
#include <ns3/nstime.h>
26
#include <ns3/packet.h>
27
#include <ns3/spectrum-channel.h>
28
#include <ns3/spectrum-phy.h>
29
#include <ns3/spectrum-value.h>
30
31
#include <fstream>
32
#include <string>
33
34
namespace
ns3
35
{
36
50
class
RemSpectrumPhy
:
public
SpectrumPhy
51
{
52
public
:
53
RemSpectrumPhy
();
54
~RemSpectrumPhy
()
override
;
55
56
// inherited from Object
57
void
DoDispose
()
override
;
62
static
TypeId
GetTypeId
();
63
64
// inherited from SpectrumPhy
65
void
SetChannel
(
Ptr<SpectrumChannel>
c)
override
;
66
void
SetMobility
(
Ptr<MobilityModel>
m
)
override
;
67
void
SetDevice
(
Ptr<NetDevice>
d)
override
;
68
Ptr<MobilityModel>
GetMobility
()
const override
;
69
Ptr<NetDevice>
GetDevice
()
const override
;
70
Ptr<const SpectrumModel>
GetRxSpectrumModel
()
const override
;
71
Ptr<Object>
GetAntenna
()
const override
;
72
void
StartRx
(
Ptr<SpectrumSignalParameters>
params
)
override
;
73
79
void
SetRxSpectrumModel
(
Ptr<const SpectrumModel>
m
);
80
86
double
GetSinr
(
double
noisePower)
const
;
87
92
void
Deactivate
();
93
98
bool
IsActive
()
const
;
99
104
void
Reset
();
105
111
void
SetUseDataChannel
(
bool
value);
112
118
void
SetRbId
(int32_t rbId);
119
120
private
:
121
Ptr<MobilityModel>
m_mobility
;
122
Ptr<const SpectrumModel>
m_rxSpectrumModel
;
123
124
double
m_referenceSignalPower
;
125
double
m_sumPower
;
126
127
bool
m_active
;
128
129
bool
m_useDataChannel
;
130
int32_t
m_rbId
;
131
};
132
133
}
// namespace ns3
134
135
#endif
/* REM_SPECTRUM_PHY_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::RemSpectrumPhy
This minimal SpectrumPhy implementation calculates the SINR with respect to the strongest signal for ...
Definition:
rem-spectrum-phy.h:51
ns3::RemSpectrumPhy::RemSpectrumPhy
RemSpectrumPhy()
Definition:
rem-spectrum-phy.cc:40
ns3::RemSpectrumPhy::m_referenceSignalPower
double m_referenceSignalPower
reference signal power
Definition:
rem-spectrum-phy.h:124
ns3::RemSpectrumPhy::m_mobility
Ptr< MobilityModel > m_mobility
the mobility model
Definition:
rem-spectrum-phy.h:121
ns3::RemSpectrumPhy::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
rem-spectrum-phy.cc:57
ns3::RemSpectrumPhy::m_rbId
int32_t m_rbId
RBID.
Definition:
rem-spectrum-phy.h:130
ns3::RemSpectrumPhy::Reset
void Reset()
Reset the SINR calculator.
Definition:
rem-spectrum-phy.cc:204
ns3::RemSpectrumPhy::GetSinr
double GetSinr(double noisePower) const
Definition:
rem-spectrum-phy.cc:186
ns3::RemSpectrumPhy::Deactivate
void Deactivate()
make StartRx a no-op from now on, and mark instance as inactive
Definition:
rem-spectrum-phy.cc:192
ns3::RemSpectrumPhy::m_rxSpectrumModel
Ptr< const SpectrumModel > m_rxSpectrumModel
receive spectrum model
Definition:
rem-spectrum-phy.h:122
ns3::RemSpectrumPhy::StartRx
void StartRx(Ptr< SpectrumSignalParameters > params) override
Notify the SpectrumPhy instance of an incoming signal.
Definition:
rem-spectrum-phy.cc:121
ns3::RemSpectrumPhy::GetAntenna
Ptr< Object > GetAntenna() const override
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
Definition:
rem-spectrum-phy.cc:115
ns3::RemSpectrumPhy::SetRbId
void SetRbId(int32_t rbId)
set RB Id
Definition:
rem-spectrum-phy.cc:217
ns3::RemSpectrumPhy::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
rem-spectrum-phy.cc:65
ns3::RemSpectrumPhy::m_sumPower
double m_sumPower
sum power
Definition:
rem-spectrum-phy.h:125
ns3::RemSpectrumPhy::SetRxSpectrumModel
void SetRxSpectrumModel(Ptr< const SpectrumModel > m)
set the RX spectrum model to be used
Definition:
rem-spectrum-phy.cc:179
ns3::RemSpectrumPhy::~RemSpectrumPhy
~RemSpectrumPhy() override
Definition:
rem-spectrum-phy.cc:51
ns3::RemSpectrumPhy::IsActive
bool IsActive() const
Definition:
rem-spectrum-phy.cc:198
ns3::RemSpectrumPhy::GetRxSpectrumModel
Ptr< const SpectrumModel > GetRxSpectrumModel() const override
Definition:
rem-spectrum-phy.cc:109
ns3::RemSpectrumPhy::GetDevice
Ptr< NetDevice > GetDevice() const override
Get the associated NetDevice instance.
Definition:
rem-spectrum-phy.cc:103
ns3::RemSpectrumPhy::m_active
bool m_active
is active?
Definition:
rem-spectrum-phy.h:127
ns3::RemSpectrumPhy::SetMobility
void SetMobility(Ptr< MobilityModel > m) override
Set the mobility model associated with this device.
Definition:
rem-spectrum-phy.cc:82
ns3::RemSpectrumPhy::SetUseDataChannel
void SetUseDataChannel(bool value)
set usage of DataChannel
Definition:
rem-spectrum-phy.cc:211
ns3::RemSpectrumPhy::GetMobility
Ptr< MobilityModel > GetMobility() const override
Get the associated MobilityModel instance.
Definition:
rem-spectrum-phy.cc:97
ns3::RemSpectrumPhy::SetChannel
void SetChannel(Ptr< SpectrumChannel > c) override
Set the channel attached to this device.
Definition:
rem-spectrum-phy.cc:75
ns3::RemSpectrumPhy::m_useDataChannel
bool m_useDataChannel
use data channel
Definition:
rem-spectrum-phy.h:129
ns3::RemSpectrumPhy::SetDevice
void SetDevice(Ptr< NetDevice > d) override
Set the associated NetDevice instance.
Definition:
rem-spectrum-phy.cc:89
ns3::SpectrumPhy
Abstract base class for Spectrum-aware PHY layers.
Definition:
spectrum-phy.h:46
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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:514
two-ray-to-three-gpp-ch-calibration.m
m
Definition:
two-ray-to-three-gpp-ch-calibration.py:591
src
lte
model
rem-spectrum-phy.h
Generated on Sun Mar 3 2024 17:11:03 for ns-3 by
1.9.1