A Discrete-Event Network Simulator
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:
48 
50 
61 
70 
74  void ClearSignals();
75 
82 
89 
90  private:
91  // Disable implicit copy constructors
105 
109  std::set<Ptr<const SpectrumValue>> m_signals;
110 
115 
120  mutable bool m_dirty;
121 };
122 
123 } // namespace ns3
124 
125 #endif /* LR_WPAN_INTERFERENCE_HELPER_H */
This class provides helper functions for LrWpan interference handling.
bool RemoveSignal(Ptr< const SpectrumValue > signal)
Remove the given signal to the set of accumulated signals.
LrWpanInterferenceHelper(const LrWpanInterferenceHelper &)
Copy constructor - defined and not implemented.
std::set< Ptr< const SpectrumValue > > m_signals
The set of accumulated signals.
Ptr< SpectrumValue > GetSignalPsd() const
Get the sum of all accumulated signals.
void ClearSignals()
Remove all currently accumulated signals.
Ptr< const SpectrumModel > m_spectrumModel
The helpers SpectrumModel.
bool m_dirty
Mark m_signal as dirty, whenever a signal is added or removed.
LrWpanInterferenceHelper(Ptr< const SpectrumModel > spectrumModel)
Create a new interference helper for the given SpectrumModel.
Ptr< SpectrumValue > m_signal
The precomputed sum of all accumulated signals.
LrWpanInterferenceHelper & operator=(const LrWpanInterferenceHelper &)
Copy constructor - defined and not implemented.
Ptr< const SpectrumModel > GetSpectrumModel() const
Get the SpectrumModel used by the helper.
bool AddSignal(Ptr< const SpectrumValue > signal)
Add the given signal to the set of accumulated signals.
A template-based reference counting class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.