RINASim  October 2016
Documentation of framework for OMNeT++
AEVideo.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_AEVideo_H_
17 #define __RINA_AEVideo_H_
18 
19 #include "AESInt.h"
20 #include <vector>
21 
22 namespace AEVideo {
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 setFps(double);
33  void setBrt(double);
34  void setVarFrameS(double);
35  void setRNG(RNG_function);
36 
37  int getid();
38  double getWt();
39  int getNextFrame();
40 
41  void compute();
42 
43 
44 private:
45  static int nextId;
46  int id;
47 
48  double wt, brt;
49 
50  double varFrameS;
51  double minFrameS, maxFrameS;
52 
54 };
55 
56 typedef vector<Stream> sVec;
57 typedef sVec::iterator sVecIt;
58 
59 class Stream_Timer : public _AESInt_self {
60 public:
61  int streamId;
62  Stream_Timer(int);
63 };
64 
65 class AEVideo : public AESInt {
66 protected :
67  sVec streams;
68  simtime_t startVar;
69 
70  int k;
71 
72  void doIni();
73  void doFin();
74  void iniCom();
75 
76  void processMsg(_AESInt_self *);
77 };
78 
79 }
80 #endif
simtime_t startVar
Definition: AEVideo.h:68
double varFrameS
Definition: AEVideo.h:50
double minFrameS
Definition: AEVideo.h:51
RNG_function rng
Definition: AEVideo.h:53
Definition: AESInt.h:47
double(* RNG_function)(double, double, int rng)
Definition: AEVideo.h:26
sVec::iterator sVecIt
Definition: AEVideo.h:57
vector< Stream > sVec
Definition: AEVideo.h:56
static int nextId
Definition: AEVideo.h:45
double wt
Definition: AEVideo.h:48