OverSim
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ChurnGenerator.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2006 Institut fuer Telematik, Universitaet Karlsruhe (TH)
3
//
4
// This program is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU General Public License
6
// as published by the Free Software Foundation; either version 2
7
// of the License, or (at your option) any later version.
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
24
#ifndef __CHURNGENERATOR_H_
25
#define __CHURNGENERATOR_H_
26
27
#define MAX_NODETYPES 100
28
29
#include <string>
30
#include <vector>
31
#include <omnetpp.h>
32
33
#include <
InitStages.h
>
34
35
class
UnderlayConfigurator
;
36
42
class
NodeType
43
{
44
public
:
45
NodeType
() :
typeID
(-1),
context
(NULL) {};
46
int32_t
typeID
;
47
std::string
terminalType
;
48
std::vector<std::string>
channelTypesRx
,
channelTypesTx
;
49
cObject**
context
;
50
};
51
52
57
class
ChurnGenerator
:
public
cSimpleModule
58
{
59
public
:
60
virtual
int
numInitStages
()
const
{
return
MAX_STAGE_UNDERLAY
+ 1; }
61
virtual
void
initialize
(
int
stage);
62
virtual
void
initializeChurn
() = 0;
63
virtual
void
handleMessage
(cMessage* msg) = 0;
64
void
setNodeType
(
const
NodeType
& t) {
type
= t; }
65
const
NodeType
&
getNodeType
() {
return
type
; }
66
bool
init
;
67
int
terminalCount
;
68
69
protected
:
70
UnderlayConfigurator
*
underlayConfigurator
;
71
virtual
void
updateDisplayString
() = 0;
72
int
targetOverlayTerminalNum
;
73
NodeType
type
;
74
};
75
76
#endif
src
common
ChurnGenerator.h
Generated on Fri Dec 7 2012 13:37:52 for OverSim by
1.8.1.2