RINASim
October 2016
Documentation of framework for OMNeT++
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
AEVoice.h
Go to the documentation of this file.
1
//
2
// This program is free software: you can redistribute it and/or modify
3
// it under the terms of the GNU Lesser General Public License as published by
4
// the Free Software Foundation, either version 3 of the License, or
5
// (at your option) any later version.
6
//
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU Lesser General Public License for more details.
11
//
12
// You should have received a copy of the GNU Lesser General Public License
13
// along with this program. If not, see http://www.gnu.org/licenses/.
14
//
15
16
#ifndef __RINA_AEVoice_H_
17
#define __RINA_AEVoice_H_
18
19
#include "
AESInt.h
"
20
#include <vector>
21
22
namespace
AEVoice
{
23
24
using namespace
std
;
25
26
typedef
double (*
RNG_function
)(double, double,
int
rng);
27
28
class
Stream
{
29
public
:
30
Stream
();
31
32
void
setWt(
double
);
33
void
setBrt(
double
);
34
void
setAvgSTime(
double
);
35
void
setAvgWTime(
double
);
36
void
setVarSTime(
double
);
37
void
setVarWTime(
double
);
38
void
setRNG(
RNG_function
);
39
void
setState(
bool
);
40
41
int
getid();
42
double
nexSendT();
43
double
nexWaitT();
44
double
getWt();
45
int
getDataSize();
46
bool
getState();
47
48
void
compute();
49
50
51
private
:
52
static
int
nextId
;
53
int
id
;
54
bool
state
;
55
56
double
wt
, brt;
57
58
int
packetSize
;
59
60
double
minSTime
, maxSTime;
61
double
minWTime
, maxWTime;
62
63
double
avgSTime,
avgWTime
;
64
double
varSTime,
varWTime
;
65
RNG_function
rng
;
66
};
67
68
typedef
vector<Stream>
sVec
;
69
typedef
sVec::iterator
sVecIt
;
70
71
class
State_Change
:
public
_AESInt_self
{
72
public
:
73
int
streamId
;
74
bool
newState
;
75
State_Change
(
int
,
bool
);
76
};
77
78
class
Stream_Timer
:
public
_AESInt_self
{
79
public
:
80
int
streamId
;
81
Stream_Timer
(
int
);
82
};
83
84
class
AEVoice
:
public
AESInt
{
85
protected
:
86
sVec
streams
;
87
simtime_t
startVar
;
88
89
void
doIni();
90
void
doFin();
91
void
iniCom();
92
93
void
processMsg(
_AESInt_self
*);
94
};
95
96
}
97
#endif
AEVoice::Stream::varWTime
double varWTime
Definition:
AEVoice.h:64
AEVoice::State_Change::streamId
int streamId
Definition:
AEVoice.h:73
AEVoice::State_Change::newState
bool newState
Definition:
AEVoice.h:74
AEVoice::sVecIt
sVec::iterator sVecIt
Definition:
AEVoice.h:69
AEVoice::AEVoice::startVar
simtime_t startVar
Definition:
AEVoice.h:87
AEVoice::Stream::minSTime
double minSTime
Definition:
AEVoice.h:60
AEVoice::Stream
Definition:
AEVoice.h:28
std
AEVoice::Stream::nextId
static int nextId
Definition:
AEVoice.h:52
AEVoice::Stream::minWTime
double minWTime
Definition:
AEVoice.h:61
AEVoice::Stream::avgWTime
double avgWTime
Definition:
AEVoice.h:63
AESInt
Definition:
AESInt.h:47
AEVoice::sVec
vector< Stream > sVec
Definition:
AEVoice.h:68
AEVoice::State_Change
Definition:
AEVoice.h:71
AEVoice::RNG_function
double(* RNG_function)(double, double, int rng)
Definition:
AEVoice.h:26
_AESInt_self
Definition:
AESInt.h:28
AEVoice::Stream_Timer::streamId
int streamId
Definition:
AEVoice.h:80
AEVoice::Stream::packetSize
int packetSize
Definition:
AEVoice.h:58
AEVoice::Stream_Timer
Definition:
AEVoice.h:78
AEVoice
Definition:
AEVoice.cc:18
AESInt.h
AEVoice::Stream::state
bool state
Definition:
AEVoice.h:54
AEVoice::Stream::id
int id
Definition:
AEVoice.h:53
AEVoice::Stream::wt
double wt
Definition:
AEVoice.h:56
AEVoice::Stream::rng
RNG_function rng
Definition:
AEVoice.h:65
AEVoice::AEVoice::streams
sVec streams
Definition:
AEVoice.h:86
src
DAF
AE
AEVoice
AEVoice.h
Generated on Tue Oct 25 2016 21:09:00 for RINASim by
1.8.10