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
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
spectrum-model.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 CTTC
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: Nicola Baldo <nbaldo@cttc.es>
19
*/
20
21
#ifndef SPECTRUM_MODEL_H
22
#define SPECTRUM_MODEL_H
23
24
#include <ns3/simple-ref-count.h>
25
#include <vector>
26
27
namespace
ns3 {
28
45
struct
BandInfo
46
{
47
double
fl
;
48
double
fc
;
49
double
fh
;
50
};
51
52
53
typedef
std::vector<BandInfo>
Bands
;
54
typedef
uint32_t
SpectrumModelUid_t
;
55
63
class
SpectrumModel
:
public
SimpleRefCount
<SpectrumModel>
64
{
65
public
:
66
friend
bool
operator==
(
const
SpectrumModel
& lhs,
const
SpectrumModel
& rhs);
67
79
SpectrumModel
(std::vector<double> centerFreqs);
80
81
90
SpectrumModel
(
Bands
bands);
91
96
size_t
GetNumBands
()
const
;
97
98
103
SpectrumModelUid_t
GetUid
()
const
;
104
105
106
Bands::const_iterator
Begin
()
const
;
107
Bands::const_iterator
End
()
const
;
108
109
private
:
110
Bands
m_bands
;
111
SpectrumModelUid_t
m_uid
;
113
static
SpectrumModelUid_t
m_uidCount
;
114
};
115
116
117
}
// namespace ns3
118
119
#endif
/* SPECTRUM_MODEL_H */
ns3::SpectrumModelUid_t
uint32_t SpectrumModelUid_t
Definition:
spectrum-model.h:54
ns3::SpectrumModel::GetNumBands
size_t GetNumBands() const
Definition:
spectrum-model.cc:96
ns3::SpectrumModel::m_uid
SpectrumModelUid_t m_uid
unique id for a given set of frequencies
Definition:
spectrum-model.h:112
ns3::SpectrumModel::operator==
friend bool operator==(const SpectrumModel &lhs, const SpectrumModel &rhs)
Definition:
spectrum-model.cc:37
ns3::SpectrumModel
Set of frequency values implementing the domain of the functions in the Function Space defined by Spe...
Definition:
spectrum-model.h:63
ns3::Bands
std::vector< BandInfo > Bands
Definition:
spectrum-model.h:53
ns3::SpectrumModel::End
Bands::const_iterator End() const
Definition:
spectrum-model.cc:90
ns3::SpectrumModel::GetUid
SpectrumModelUid_t GetUid() const
Definition:
spectrum-model.cc:102
ns3::BandInfo::fc
double fc
center frequency
Definition:
spectrum-model.h:48
ns3::SpectrumModel::m_uidCount
static SpectrumModelUid_t m_uidCount
counter to assign m_uids
Definition:
spectrum-model.h:113
ns3::BandInfo::fl
double fl
lower limit of subband
Definition:
spectrum-model.h:47
ns3::SpectrumModel::m_bands
Bands m_bands
actual definition of frequency bands within this SpectrumModel
Definition:
spectrum-model.h:110
ns3::SpectrumModel::Begin
Bands::const_iterator Begin() const
Definition:
spectrum-model.cc:84
ns3::BandInfo::fh
double fh
upper limit of subband
Definition:
spectrum-model.h:49
ns3::SpectrumModel::SpectrumModel
SpectrumModel(std::vector< double > centerFreqs)
This constructs a SpectrumModel based on a given set of frequencies, which is assumed to be sorted by...
Definition:
spectrum-model.cc:44
ns3::BandInfo
The building block of a SpectrumModel.
Definition:
spectrum-model.h:45
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:64
src
spectrum
model
spectrum-model.h
Generated on Sat Apr 19 2014 14:07:08 for ns-3 by
1.8.6