A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
spectrum-sensing.h
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License version 2 as
4
* published by the Free Software Foundation;
5
*
6
* This program is distributed in the hope that it will be useful,
7
* but WITHOUT ANY WARRANTY; without even the implied warranty of
8
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
* GNU General Public License for more details.
10
*
11
* You should have received a copy of the GNU General Public License
12
* along with this program; if not, write to the Free Software
13
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14
*
15
* Author: Abdulla K. Al-Ali <abdulla.alali@qu.edu.qa>
16
*/
17
18
#ifndef SPECTRUM_SENSING_H
19
#define SPECTRUM_SENSING_H
20
21
//#include <mobilenode.h>
22
23
#include "pu-model.h"
24
#include "spectrum-manager.h"
25
#include "ns3/node-container.h"
26
#include "ns3/log.h"
27
28
namespace
ns3 {
29
class
SpectrumManager;
30
31
// Implementation of the Spectrum Sensing activity performed by CRs
32
class
SpectrumSensing
{
33
34
public
:
35
36
// Initialitation method: PUmodel off
37
SpectrumSensing
(
SpectrumManager
*sm);
38
39
// Initialization method: PUmodel on
40
SpectrumSensing
(
SpectrumManager
*sm,
double
prob,
Ptr<PUModel>
p);
41
42
// Perform sensing and return true if PU activity is detected on the current channel
43
bool
GetSenseResultsFuture(
int
id
,
Time
sense_time,
Time
transmit_time,
int
channel);
44
45
46
private
:
47
48
// Primary User Map and Model
49
Ptr<PUModel>
m_puModel;
50
51
// Spectrum Manager reference
52
SpectrumManager
*m_specManager;
53
54
// Probability to have false negative detection of PUs.
55
double
m_probMisdetect;
56
};
57
58
}
59
#endif
ns3::SpectrumManager
APIs for Cognitive Radio extension.
Definition:
spectrum-manager.h:69
ns3::Time
keep track of time unit.
Definition:
nstime.h:149
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::SpectrumSensing
Definition:
spectrum-sensing.h:32
src
cognitive
model
spectrum-sensing.h
Generated on Sun Mar 16 2014 11:25:01 for ns-3 by
1.8.6