A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
lte
model
rem-spectrum-phy.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2012 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 REM_SPECTRUM_PHY_H
22
#define REM_SPECTRUM_PHY_H
23
24
25
#include <ns3/spectrum-value.h>
26
#include <ns3/mobility-model.h>
27
#include <ns3/packet.h>
28
#include <ns3/nstime.h>
29
#include <ns3/net-device.h>
30
#include <ns3/spectrum-phy.h>
31
#include <ns3/spectrum-channel.h>
32
#include <string>
33
#include <fstream>
34
35
namespace
ns3
{
36
37
51
class
RemSpectrumPhy
:
public
SpectrumPhy
52
{
53
54
public
:
55
RemSpectrumPhy
();
56
virtual
~RemSpectrumPhy
();
57
58
// inherited from Object
59
void
DoDispose
();
64
static
TypeId
GetTypeId
(
void
);
65
66
// inherited from SpectrumPhy
67
void
SetChannel
(
Ptr<SpectrumChannel>
c);
68
void
SetMobility
(
Ptr<MobilityModel>
m);
69
void
SetDevice
(
Ptr<NetDevice>
d);
70
Ptr<MobilityModel>
GetMobility
();
71
Ptr<NetDevice>
GetDevice
()
const
;
72
Ptr<const SpectrumModel>
GetRxSpectrumModel
()
const
;
73
Ptr<AntennaModel>
GetRxAntenna
();
74
void
StartRx
(
Ptr<SpectrumSignalParameters>
params);
75
81
void
SetRxSpectrumModel
(
Ptr<const SpectrumModel>
m);
82
88
double
GetSinr
(
double
noisePower);
89
94
void
Deactivate
();
95
100
bool
IsActive
();
101
106
void
Reset
();
107
113
void
SetUseDataChannel
(
bool
value);
114
120
void
SetRbId
(int32_t rbId);
121
122
private
:
123
Ptr<MobilityModel>
m_mobility
;
124
Ptr<const SpectrumModel>
m_rxSpectrumModel
;
125
126
double
m_referenceSignalPower
;
127
double
m_sumPower
;
128
129
bool
m_active
;
130
131
bool
m_useDataChannel
;
132
int32_t
m_rbId
;
133
134
};
135
136
137
138
139
140
141
}
142
143
144
145
146
147
#endif
/* REM_SPECTRUM_PHY_H */
ns3::RemSpectrumPhy::GetMobility
Ptr< MobilityModel > GetMobility()
Get the associated MobilityModel instance.
Definition:
rem-spectrum-phy.cc:100
ns3::RemSpectrumPhy::GetSinr
double GetSinr(double noisePower)
Definition:
rem-spectrum-phy.cc:188
ns3::RemSpectrumPhy::GetDevice
Ptr< NetDevice > GetDevice() const
Get the associated NetDevice instance.
Definition:
rem-spectrum-phy.cc:106
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::SpectrumPhy
Abstract base class for Spectrum-aware PHY layers.
Definition:
spectrum-phy.h:45
ns3::RemSpectrumPhy::m_active
bool m_active
is active?
Definition:
rem-spectrum-phy.h:129
ns3::RemSpectrumPhy::SetRxSpectrumModel
void SetRxSpectrumModel(Ptr< const SpectrumModel > m)
set the RX spectrum model to be used
Definition:
rem-spectrum-phy.cc:181
ns3::RemSpectrumPhy::m_referenceSignalPower
double m_referenceSignalPower
reference signal power
Definition:
rem-spectrum-phy.h:126
ns3::RemSpectrumPhy::GetRxAntenna
Ptr< AntennaModel > GetRxAntenna()
Get the AntennaModel used by the NetDevice for reception.
Definition:
rem-spectrum-phy.cc:118
ns3::RemSpectrumPhy::~RemSpectrumPhy
virtual ~RemSpectrumPhy()
Definition:
rem-spectrum-phy.cc:53
ns3::RemSpectrumPhy::Reset
void Reset()
Reset the SINR calculator.
Definition:
rem-spectrum-phy.cc:206
ns3::RemSpectrumPhy
This minimal SpectrumPhy implementation calculates the SINR with respect to the strongest signal for ...
Definition:
rem-spectrum-phy.h:51
ns3::RemSpectrumPhy::Deactivate
void Deactivate()
make StartRx a no-op from now on, and mark instance as inactive
Definition:
rem-spectrum-phy.cc:194
ns3::RemSpectrumPhy::StartRx
void StartRx(Ptr< SpectrumSignalParameters > params)
Notify the SpectrumPhy instance of an incoming signal.
Definition:
rem-spectrum-phy.cc:125
ns3::RemSpectrumPhy::m_rxSpectrumModel
Ptr< const SpectrumModel > m_rxSpectrumModel
receive spectrum model
Definition:
rem-spectrum-phy.h:124
ns3::RemSpectrumPhy::m_sumPower
double m_sumPower
sum power
Definition:
rem-spectrum-phy.h:127
ns3::RemSpectrumPhy::m_mobility
Ptr< MobilityModel > m_mobility
the mobility model
Definition:
rem-spectrum-phy.h:123
ns3::RemSpectrumPhy::SetChannel
void SetChannel(Ptr< SpectrumChannel > c)
Set the channel attached to this device.
Definition:
rem-spectrum-phy.cc:80
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::RemSpectrumPhy::RemSpectrumPhy
RemSpectrumPhy()
Definition:
rem-spectrum-phy.cc:40
ns3::RemSpectrumPhy::GetRxSpectrumModel
Ptr< const SpectrumModel > GetRxSpectrumModel() const
Definition:
rem-spectrum-phy.cc:112
ns3::RemSpectrumPhy::IsActive
bool IsActive()
Definition:
rem-spectrum-phy.cc:200
ns3::RemSpectrumPhy::SetUseDataChannel
void SetUseDataChannel(bool value)
set usage of DataChannel
Definition:
rem-spectrum-phy.cc:213
ns3::RemSpectrumPhy::m_rbId
int32_t m_rbId
RBID.
Definition:
rem-spectrum-phy.h:132
ns3::RemSpectrumPhy::SetMobility
void SetMobility(Ptr< MobilityModel > m)
Set the mobility model associated with this device.
Definition:
rem-spectrum-phy.cc:86
ns3::RemSpectrumPhy::SetRbId
void SetRbId(int32_t rbId)
set RB Id
Definition:
rem-spectrum-phy.cc:219
ns3::RemSpectrumPhy::DoDispose
void DoDispose()
Destructor implementation.
Definition:
rem-spectrum-phy.cc:59
ns3::RemSpectrumPhy::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
rem-spectrum-phy.cc:67
ns3::RemSpectrumPhy::m_useDataChannel
bool m_useDataChannel
use data channel
Definition:
rem-spectrum-phy.h:131
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::RemSpectrumPhy::SetDevice
void SetDevice(Ptr< NetDevice > d)
Set the associated NetDevice instance.
Definition:
rem-spectrum-phy.cc:93
Generated on Wed Nov 7 2018 10:02:02 for ns-3 by
1.8.14