A Discrete-Event Network Simulator
API
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
28namespace ns3 {
29
30class SpectrumValue;
31class SpectrumModel;
32
38class LrWpanInterferenceHelper : public SimpleRefCount<LrWpanInterferenceHelper>
39{
40public:
47
49
60
69
73 void ClearSignals (void);
74
81
88private:
89 // Disable implicit copy constructors
103
107 std::set<Ptr<const SpectrumValue> > m_signals;
108
113
118 mutable bool m_dirty;
119};
120
121}
122
123#endif /* LR_WPAN_INTERFERENCE_HELPER_H */
This class provides helper functions for LrWpan interference handling.
LrWpanInterferenceHelper(LrWpanInterferenceHelper const &)
Copy constructor - defined and not implemented.
bool RemoveSignal(Ptr< const SpectrumValue > signal)
Remove the given signal to the set of accumulated signals.
Ptr< const SpectrumModel > GetSpectrumModel(void) const
Get the SpectrumModel used by the helper.
std::set< Ptr< const SpectrumValue > > m_signals
The set of accumulated signals.
Ptr< const SpectrumModel > m_spectrumModel
The helpers SpectrumModel.
Ptr< SpectrumValue > GetSignalPsd(void) const
Get the sum of all accumulated signals.
void ClearSignals(void)
Remove all currently accumulated signals.
bool m_dirty
Mark m_signal as dirty, whenever a signal is added or removed.
LrWpanInterferenceHelper & operator=(LrWpanInterferenceHelper const &)
Copy constructor - defined and not implemented.
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.
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.