A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
lr-wpan
model
lr-wpan-interference-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013 Fraunhofer FKIE
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:
19
* Sascha Alexander Jopen <jopen@cs.uni-bonn.de>
20
*/
21
#ifndef LR_WPAN_INTERFERENCE_HELPER_H
22
#define LR_WPAN_INTERFERENCE_HELPER_H
23
24
#include <ns3/simple-ref-count.h>
25
#include <ns3/ptr.h>
26
#include <set>
27
28
namespace
ns3
{
29
30
class
SpectrumValue;
31
class
SpectrumModel;
32
38
class
LrWpanInterferenceHelper
:
public
SimpleRefCount
<LrWpanInterferenceHelper>
39
{
40
public
:
46
LrWpanInterferenceHelper
(
Ptr<const SpectrumModel>
spectrumModel);
47
48
~LrWpanInterferenceHelper
(
void
);
49
59
bool
AddSignal
(
Ptr<const SpectrumValue>
signal);
60
68
bool
RemoveSignal
(
Ptr<const SpectrumValue>
signal);
69
73
void
ClearSignals
(
void
);
74
80
Ptr<SpectrumValue>
GetSignalPsd
(
void
)
const
;
81
87
Ptr<const SpectrumModel>
GetSpectrumModel
(
void
)
const
;
88
private
:
89
// Disable implicit copy constructors
93
LrWpanInterferenceHelper
(
LrWpanInterferenceHelper
const
&);
98
LrWpanInterferenceHelper
&
operator=
(
LrWpanInterferenceHelper
const
&);
102
Ptr<const SpectrumModel>
m_spectrumModel
;
103
107
std::set<Ptr<const SpectrumValue> >
m_signals
;
108
112
mutable
Ptr<SpectrumValue>
m_signal
;
113
118
mutable
bool
m_dirty
;
119
};
120
121
}
122
123
#endif
/* LR_WPAN_INTERFERENCE_HELPER_H */
ns3::LrWpanInterferenceHelper::operator=
LrWpanInterferenceHelper & operator=(LrWpanInterferenceHelper const &)
Copy constructor - defined and not implemented.
ns3::Ptr< const SpectrumModel >
ns3::LrWpanInterferenceHelper::m_signals
std::set< Ptr< const SpectrumValue > > m_signals
The set of accumulated signals.
Definition:
lr-wpan-interference-helper.h:107
ns3::LrWpanInterferenceHelper::GetSignalPsd
Ptr< SpectrumValue > GetSignalPsd(void) const
Get the sum of all accumulated signals.
Definition:
lr-wpan-interference-helper.cc:90
ns3::LrWpanInterferenceHelper::~LrWpanInterferenceHelper
~LrWpanInterferenceHelper(void)
Definition:
lr-wpan-interference-helper.cc:37
ns3::LrWpanInterferenceHelper::m_signal
Ptr< SpectrumValue > m_signal
The precomputed sum of all accumulated signals.
Definition:
lr-wpan-interference-helper.h:112
ns3::LrWpanInterferenceHelper::LrWpanInterferenceHelper
LrWpanInterferenceHelper(Ptr< const SpectrumModel > spectrumModel)
Create a new interference helper for the given SpectrumModel.
Definition:
lr-wpan-interference-helper.cc:30
ns3::LrWpanInterferenceHelper::m_spectrumModel
Ptr< const SpectrumModel > m_spectrumModel
The helpers SpectrumModel.
Definition:
lr-wpan-interference-helper.h:102
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::LrWpanInterferenceHelper::GetSpectrumModel
Ptr< const SpectrumModel > GetSpectrumModel(void) const
Get the SpectrumModel used by the helper.
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:63
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:118
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:45
ns3::LrWpanInterferenceHelper::ClearSignals
void ClearSignals(void)
Remove all currently accumulated signals.
Definition:
lr-wpan-interference-helper.cc:81
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:73
ns3::LrWpanInterferenceHelper
This class provides helper functions for LrWpan interference handling.
Definition:
lr-wpan-interference-helper.h:38
Generated on Wed Nov 7 2018 10:01:58 for ns-3 by
1.8.14