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
uan-prop-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 University of Washington
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: Leonard Tracy <lentracy@gmail.com>
19
*/
20
21
#ifndef UAN_PROP_MODEL_H
22
#define UAN_PROP_MODEL_H
23
24
#include "ns3/object.h"
25
#include "ns3/mobility-model.h"
26
#include "ns3/nstime.h"
27
28
29
#include <vector>
30
#include <complex>
31
#include <utility>
32
33
namespace
ns3 {
34
35
class
UanTxMode;
36
41
class
Tap
42
{
43
public
:
47
Tap
();
52
Tap
(
Time
delay, std::complex<double> amp);
56
std::complex<double>
GetAmp
(
void
)
const
;
60
Time
GetDelay
(
void
)
const
;
61
62
private
:
63
std::complex<double>
m_amplitude
;
64
Time
m_delay
;
65
};
66
83
class
UanPdp
84
{
85
public
:
89
typedef
std::vector<Tap>::const_iterator
Iterator
;
93
UanPdp
();
99
UanPdp
(std::vector<Tap> taps,
Time
resolution);
105
UanPdp
(std::vector<std::complex<double > > arrivals,
Time
resolution);
111
UanPdp
(std::vector<double> arrivals,
Time
resolution);
112
~UanPdp
();
113
118
void
SetTap
(std::complex<double> arrival, uint32_t index);
122
void
SetNTaps
(uint32_t nTaps);
126
void
SetResolution
(
Time
resolution);
130
Iterator
GetBegin
(
void
)
const
;
134
Iterator
GetEnd
(
void
)
const
;
138
uint32_t
GetNTaps
(
void
)
const
;
143
const
Tap
&
GetTap
(uint32_t i)
const
;
147
Time
GetResolution
(
void
)
const
;
158
double
SumTapsNc
(
Time
begin,
Time
end)
const
;
169
std::complex<double>
SumTapsC
(
Time
begin,
Time
end)
const
;
179
double
SumTapsFromMaxNc
(
Time
delay,
Time
duration)
const
;
189
std::complex<double>
SumTapsFromMaxC
(
Time
delay,
Time
duration)
const
;
190
194
static
UanPdp
CreateImpulsePdp
(
void
);
195
private
:
196
friend
std::ostream &
operator<<
(std::ostream &os,
UanPdp
&pdp);
197
friend
std::istream &
operator>>
(std::istream &is,
UanPdp
&pdp);
198
std::vector<Tap>
m_taps
;
199
Time
m_resolution
;
200
201
};
205
std::ostream &
operator<<
(std::ostream &os,
UanPdp
&pdp);
209
std::istream &
operator>>
(std::ostream &is,
UanPdp
&pdp);
210
216
class
UanPropModel
:
public
Object
217
{
218
public
:
219
static
TypeId
GetTypeId
(
void
);
220
228
virtual
double
GetPathLossDb
(
Ptr<MobilityModel>
a,
Ptr<MobilityModel>
b,
UanTxMode
txMode) = 0;
229
236
virtual
UanPdp
GetPdp
(
Ptr<MobilityModel>
a,
Ptr<MobilityModel>
b,
UanTxMode
mode) = 0;
244
virtual
Time
GetDelay
(
Ptr<MobilityModel>
a,
Ptr<MobilityModel>
b,
UanTxMode
mode) = 0;
245
249
virtual
void
Clear
(
void
);
250
251
virtual
void
DoDispose
(
void
);
252
};
253
254
}
255
256
#endif
/* UAN_PROP_MODEL_H */
src
uan
model
uan-prop-model.h
Generated on Tue Oct 9 2012 16:45:47 for ns-3 by
1.8.1.2