OverSim
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ConnectivityProbe.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 __CONNECTIVITYPROBE_H__
25
#define __CONNECTIVITYPROBE_H__
26
27
#include <omnetpp.h>
28
#include <
NodeHandle.h
>
29
#include <
VastDefs.h
>
30
//#include <NeighborsList.h>
31
#include <
Vast.h
>
32
#include <fstream>
33
#include <sstream>
34
#include "
GlobalStatisticsAccess.h
"
35
36
//typedef std::set<NodeHandle> NodeSet;
37
38
class
VTopologyNode
39
{
40
public
:
41
VTopologyNode
(
int
moduleID
);
42
Vast
*
getModule
()
const
;
43
44
bool
visited
;
45
int
moduleID
;
46
};
47
48
typedef
std::map<OverlayKey, VTopologyNode>
VTopology
;
49
50
class
ConnectivityProbe
:
public
cSimpleModule
51
{
52
public
:
53
void
initialize
();
54
void
handleMessage
(cMessage* msg);
55
~ConnectivityProbe
();
56
57
private
:
58
std::fstream
pltNetwork
,
pltData
,
pltVector
;
59
void
extractTopology
();
60
void
resetTopologyNodes
();
61
unsigned
int
getComponentSize
(
OverlayKey
key);
62
63
simtime_t
probeIntervall
;
64
simtime_t
plotIntervall
;
65
bool
plotConnections
;
66
bool
plotMissing
;
67
cMessage*
probeTimer
;
68
cMessage*
plotTimer
;
69
VTopology
Topology
;
70
GlobalStatistics
*
globalStatistics
;
71
72
// statistics
73
cOutVector
cOV_NodeCount
;
74
cOutVector
cOV_MaximumComponent
;
75
cOutVector
cOV_MaxConnectivity
;
76
cOutVector
cOV_ZeroMissingNeighbors
;
77
cOutVector
cOV_AverageMissingNeighbors
;
78
cOutVector
cOV_MaxMissingNeighbors
;
79
cOutVector
cOV_AverageDrift
;
80
};
81
82
#endif
src
overlay
vast
ConnectivityProbe.h
Generated on Fri Dec 7 2012 13:37:52 for OverSim by
1.8.1.2