A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
lr-wpan-interference-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Fraunhofer FKIE
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:
18
* Sascha Alexander Jopen <jopen@cs.uni-bonn.de>
19
*/
20
#ifndef LR_WPAN_INTERFERENCE_HELPER_H
21
#define LR_WPAN_INTERFERENCE_HELPER_H
22
23
#include <ns3/ptr.h>
24
#include <ns3/simple-ref-count.h>
25
26
#include <set>
27
28
namespace
ns3
29
{
30
31
class
SpectrumValue;
32
class
SpectrumModel;
33
39
class
LrWpanInterferenceHelper
:
public
SimpleRefCount
<LrWpanInterferenceHelper>
40
{
41
public
:
47
LrWpanInterferenceHelper
(
Ptr<const SpectrumModel>
spectrumModel);
48
49
~LrWpanInterferenceHelper
();
50
60
bool
AddSignal
(
Ptr<const SpectrumValue>
signal);
61
69
bool
RemoveSignal
(
Ptr<const SpectrumValue>
signal);
70
74
void
ClearSignals
();
75
81
Ptr<SpectrumValue>
GetSignalPsd
()
const
;
82
88
Ptr<const SpectrumModel>
GetSpectrumModel
()
const
;
89
90
private
:
91
// Disable implicit copy constructors
95
LrWpanInterferenceHelper
(
const
LrWpanInterferenceHelper
&);
100
LrWpanInterferenceHelper
&
operator=
(
const
LrWpanInterferenceHelper
&);
104
Ptr<const SpectrumModel>
m_spectrumModel
;
105
109
std::set<Ptr<const SpectrumValue>>
m_signals
;
110
114
mutable
Ptr<SpectrumValue>
m_signal
;
115
120
mutable
bool
m_dirty
;
121
};
122
123
}
// namespace ns3
124
125
#endif
/* LR_WPAN_INTERFERENCE_HELPER_H */
ns3::LrWpanInterferenceHelper
This class provides helper functions for LrWpan interference handling.
Definition:
lr-wpan-interference-helper.h:40
ns3::LrWpanInterferenceHelper::RemoveSignal
bool RemoveSignal(Ptr< const SpectrumValue > signal)
Remove the given signal to the set of accumulated signals.
Definition:
lr-wpan-interference-helper.cc:64
ns3::LrWpanInterferenceHelper::LrWpanInterferenceHelper
LrWpanInterferenceHelper(const LrWpanInterferenceHelper &)
Copy constructor - defined and not implemented.
ns3::LrWpanInterferenceHelper::m_signals
std::set< Ptr< const SpectrumValue > > m_signals
The set of accumulated signals.
Definition:
lr-wpan-interference-helper.h:109
ns3::LrWpanInterferenceHelper::GetSignalPsd
Ptr< SpectrumValue > GetSignalPsd() const
Get the sum of all accumulated signals.
Definition:
lr-wpan-interference-helper.cc:91
ns3::LrWpanInterferenceHelper::ClearSignals
void ClearSignals()
Remove all currently accumulated signals.
Definition:
lr-wpan-interference-helper.cc:82
ns3::LrWpanInterferenceHelper::m_spectrumModel
Ptr< const SpectrumModel > m_spectrumModel
The helpers SpectrumModel.
Definition:
lr-wpan-interference-helper.h:104
ns3::LrWpanInterferenceHelper::m_dirty
bool m_dirty
Mark m_signal as dirty, whenever a signal is added or removed.
Definition:
lr-wpan-interference-helper.h:120
ns3::LrWpanInterferenceHelper::~LrWpanInterferenceHelper
~LrWpanInterferenceHelper()
Definition:
lr-wpan-interference-helper.cc:38
ns3::LrWpanInterferenceHelper::LrWpanInterferenceHelper
LrWpanInterferenceHelper(Ptr< const SpectrumModel > spectrumModel)
Create a new interference helper for the given SpectrumModel.
Definition:
lr-wpan-interference-helper.cc:31
ns3::LrWpanInterferenceHelper::m_signal
Ptr< SpectrumValue > m_signal
The precomputed sum of all accumulated signals.
Definition:
lr-wpan-interference-helper.h:114
ns3::LrWpanInterferenceHelper::operator=
LrWpanInterferenceHelper & operator=(const LrWpanInterferenceHelper &)
Copy constructor - defined and not implemented.
ns3::LrWpanInterferenceHelper::GetSpectrumModel
Ptr< const SpectrumModel > GetSpectrumModel() const
Get the SpectrumModel used by the helper.
ns3::LrWpanInterferenceHelper::AddSignal
bool AddSignal(Ptr< const SpectrumValue > signal)
Add the given signal to the set of accumulated signals.
Definition:
lr-wpan-interference-helper.cc:46
ns3::Ptr< const SpectrumModel >
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:81
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
lr-wpan
model
lr-wpan-interference-helper.h
Generated on Sun Mar 3 2024 17:11:00 for ns-3 by
1.9.1