OverSim
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
OverSim
OverSim API Reference
GPL
Todo List
Namespaces
Classes
Files
File List
AbstractLookup.h
AbstractSendStrategy.cc
AbstractSendStrategy.h
AccessNet.cc
AccessNet.h
ALMTest.cc
ALMTest.h
ALMTestTracedMessage_m.h
apptunoutscheduler.cc
apptunoutscheduler.h
AreaDataContainer.cc
AreaDataContainer.h
Bamboo.cc
Bamboo.h
base64.h
BaseApp.cc
BaseApp.h
BaseLocation.h
BaseOverlay.cc
BaseOverlay.h
BasePastry.cc
BasePastry.h
BaseRpc.cc
BaseRpc.h
BaseTcpSupport.cc
BaseTcpSupport.h
BinaryValue.cc
BinaryValue.h
BootstrapList.cc
BootstrapList.h
BootstrapListAccess.h
BootstrapNodeHandle.h
BoundingBox2D.cc
BoundingBox2D.h
Broose.cc
Broose.h
BrooseBucket.cc
BrooseBucket.h
BrooseHandle.cc
BrooseHandle.h
BrooseMessage_m.h
CBR-DHT.cc
CBR-DHT.h
CBR-DHTMessage_m.h
Chord.cc
Chord.h
ChordFingerTable.cc
ChordFingerTable.h
ChordMessage_m.h
ChordSuccessorList.cc
ChordSuccessorList.h
Churn_m.h
ChurnGenerator.cc
ChurnGenerator.h
ChurnGeneratorAccess.h
cnetcommbuffer.cc
cnetcommbuffer.h
combination.h
CommonMessages_m.h
Comparator.h
ConnectivityProbe.cc
ConnectivityProbe.h
ConnectivityProbeApp.cc
ConnectivityProbeApp.h
ConnectivityProbeQuon.cc
ConnectivityProbeQuon.h
ConnectReaSE.cc
ConnectReaSE.h
CoordBasedRouting.cc
CoordBasedRouting.h
CoordBasedRoutingAccess.h
CoordDataContainer.cc
CoordDataContainer.h
CoordinateSystem.cc
CoordinateSystem.h
CoordMessages_m.h
CryptoModule.cc
CryptoModule.h
DHT.cc
DHT.h
DHTDataStorage.cc
DHTDataStorage.h
DHTMessage_m.h
DHTTestApp.cc
DHTTestApp.h
DHTTestAppMessages_m.h
DiscoveryMode.cc
DiscoveryMode.h
DiscoveryMode_m.h
ExtAPIMessages_m.h
ExtTCPSocketMap.cc
ExtTCPSocketMap.h
FinisherModule.cc
FinisherModule.h
GenericPacketParser.cc
GenericPacketParser.h
Gia.cc
Gia.h
GiaKeyList.cc
GiaKeyList.h
GiaKeyListModule.cc
GiaKeyListModule.h
GiaMessage_m.h
GiaMessageBookkeeping.cc
GiaMessageBookkeeping.h
GiaNeighborCandidateList.cc
GiaNeighborCandidateList.h
GiaNeighbors.cc
GiaNeighbors.h
GiaNode.cc
GiaNode.h
GIASearchApp.cc
GIASearchApp.h
GiaTokenFactory.cc
GiaTokenFactory.h
GlobalCoordinator.cc
GlobalCoordinator.h
GlobalDhtTestMap.cc
GlobalDhtTestMap.h
GlobalNodeList.cc
GlobalNodeList.h
GlobalNodeListAccess.h
GlobalParameters.cc
GlobalParameters.h
GlobalParametersAccess.h
GlobalStatistics.cc
GlobalStatistics.h
GlobalStatisticsAccess.h
GlobalTraceManager.cc
GlobalTraceManager.h
GlobalTraceManager_m.h
GlobalViewBuilder.cc
GlobalViewBuilder.h
greatGathering.cc
greatGathering.h
groupRoaming.cc
groupRoaming.h
HashFunc.h
hashWatch.h
hotspotRoaming.cc
hotspotRoaming.h
I3.cc
I3.h
I3Anycast.cc
I3BaseApp.cc
I3BaseApp.h
I3Composite.cc
I3HostMobility.cc
I3Identifier.cc
I3Identifier.h
I3IdentifierStack.cc
I3IdentifierStack.h
I3IPAddress.cc
I3IPAddress.h
I3LatencyStretch.cc
I3Message.cc
I3Message.h
I3Message_m.h
I3Multicast.cc
I3Session.cc
I3SessionMessage_m.h
I3SubIdentifier.cc
I3SubIdentifier.h
I3Trigger.cc
I3Trigger.h
I3TriggerRoutingTime.cc
I3Triggers.cc
I3TriggersMessage_m.h
index.h
InetInfo.cc
InetInfo.h
InetUnderlayConfigurator.cc
InetUnderlayConfigurator.h
InitStages.h
IterativeLookup.cc
IterativeLookup.h
IterativeLookupConfiguration.h
Kademlia.cc
Kademlia.h
KademliaBucket.cc
KademliaBucket.h
KademliaMessage_m.h
KademliaNodeHandle.cc
KademliaNodeHandle.h
KBRTestApp.cc
KBRTestApp.h
KBRTestMessage_m.h
Koorde.cc
Koorde.h
Landmark.cc
Landmark.h
LifetimeChurn.cc
LifetimeChurn.h
LoginCache.cc
LoginCache.h
LookupListener.h
MessageObserver.cc
MessageObserver.h
MovementGenerator.cc
MovementGenerator.h
MyApplication.cc
MyApplication.h
MyMessage_m.h
MyOverlay.cc
MyOverlay.h
MyOverlay_m.h
NeighborCache.cc
NeighborCache.h
Nice.cc
Nice.h
NiceCluster.cc
NiceCluster.h
NiceMessage_m.h
NicePeerInfo.cc
NicePeerInfo.h
NoChurn.cc
NoChurn.h
NodeHandle.cc
NodeHandle.h
NodeVector.cc
NodeVector.h
Nps.cc
Nps.h
Nps_m.h
NTree.cc
NTree.h
NTree_m.h
NTreeHelper.cc
NTreeHelper.h
OverlayAccess.h
OverlayDummy.cc
OverlayKey.cc
OverlayKey.h
oversim_byteswap.h
oversim_mapset.h
OverSimMessage.cc
OverSimMessage.h
OverSimMessage_m.h
P2pns.cc
P2pns.h
P2pnsCache.cc
P2pnsCache.h
P2pnsMessage_m.h
PacketParser.h
ParetoChurn.cc
ParetoChurn.h
Pastry.cc
Pastry.h
PastryLeafSet.cc
PastryLeafSet.h
PastryMessage_m.h
PastryNeighborhoodSet.cc
PastryNeighborhoodSet.h
PastryRoutingTable.cc
PastryRoutingTable.h
PastryStateObject.cc
PastryStateObject.h
PastryTypes.h
PeerInfo.cc
PeerInfo.h
PeerStorage.cc
PeerStorage.h
ProximityLookupMessages_m.h
ProxNodeHandle.cc
ProxNodeHandle.h
PubSubLobby.cc
PubSubLobby.h
PubSubMessage_m.h
PubSubMMOG.cc
PubSubMMOG.h
PubSubSubspace.cc
PubSubSubspace.h
PubSubSubspaceId.cc
PubSubSubspaceId.h
Quon.cc
Quon.h
Quon_m.h
QuonDefs.h
QuonHelper.cc
QuonHelper.h
RandomChurn.cc
RandomChurn.h
randomRoaming.cc
randomRoaming.h
realtimescheduler.cc
realtimescheduler.h
RealworldApp.cc
RealworldApp.h
RealworldConnector.cc
RealworldConnector.h
RealworldDevice.cc
RealworldDevice.h
realWorldRoaming.cc
realWorldRoaming.h
RealWorldTestApp.cc
RealWorldTestApp.h
RealWorldTestMessage_m.h
RealWorldTestPacketParser.cc
RealWorldTestPacketParser.h
ReaSEInfo.cc
ReaSEInfo.h
ReaSEUnderlayConfigurator.cc
ReaSEUnderlayConfigurator.h
RecursiveLookup.cc
RecursiveLookup.h
RegionDataContainer.cc
RegionDataContainer.h
RpcListener.cc
RpcListener.h
RpcMacros.h
RpcState.h
RUNetworkConfigurator.cc
RUNetworkConfigurator.h
SCPacket.h
Scribe.cc
Scribe.h
ScribeGroup.cc
ScribeGroup.h
ScribeMessage_m.h
SearchMsgBookkeeping.cc
SearchMsgBookkeeping.h
SendStrategyFactory.cc
SendStrategyFactory.h
SHA1.cc
SHA1.h
SimMud.cc
SimMud.h
SimMud_m.h
SimpleCoordDataContainer.cc
SimpleCoordDataContainer.h
SimpleGameClient.cc
SimpleGameClient.h
SimpleGameClient_m.h
SimpleInfo.cc
SimpleInfo.h
SimpleNcs.cc
SimpleNcs.h
SimpleNodeEntry.cc
SimpleNodeEntry.h
SimpleTCP.cc
SimpleTCP.h
SimpleUDP.cc
SimpleUDP.h
SimpleUnderlayConfigurator.cc
SimpleUnderlayConfigurator.h
SimpleUnderlayNCS.cc
SimpleUnderlayNCS.h
simplex.cc
simplex.h
SingleHostUnderlayConfigurator.cc
SingleHostUnderlayConfigurator.h
StrategyRegions.cc
StrategyRegions.h
StrategyRemoveCoords.cc
StrategyRemoveCoords.h
StrategyRemoveInaccurate.cc
StrategyRemoveInaccurate.h
StrategyRemoveRandom.cc
StrategyRemoveRandom.h
StrategySendAll.cc
StrategySendAll.h
StrategySimplifyCoords.cc
StrategySimplifyCoords.h
StrategyTreeTest.cc
StrategyTreeTest.h
StringConvert.h
SVivaldi.cc
SVivaldi.h
TCPExampleApp.cc
TCPExampleApp.h
TCPExampleMessage_m.h
TierDummy.cc
TierDummy.h
TopologyVis.cc
TopologyVis.h
TraceChurn.cc
TraceChurn.h
TransportAddress.cc
TransportAddress.h
traverseRoaming.cc
traverseRoaming.h
TreeManagement.cc
TreeManagement.h
TreeManagementMessage_m.h
TriggerTable.cc
TriggerTable.h
TunOutDevice.cc
TunOutDevice.h
tunoutscheduler.cc
tunoutscheduler.h
UdpOutDevice.cc
UdpOutDevice.h
udpoutscheduler.cc
udpoutscheduler.h
UnderlayConfigurator.cc
UnderlayConfigurator.h
UnderlayConfiguratorAccess.h
Vast.cc
Vast.h
Vast_m.h
VastDefs.cc
VastDefs.h
Vector2D.cc
Vector2D.h
Vivaldi.cc
Vivaldi.h
XmlRpc.h
XmlRpcClient.cc
XmlRpcClient.h
XmlRpcDispatch.cc
XmlRpcDispatch.h
XmlRpcException.h
XmlRpcInterface.cc
XmlRpcInterface.h
XmlRpcMutex.cc
XmlRpcMutex.h
XmlRpcServer.cc
XmlRpcServer.h
XmlRpcServerConnection.cc
XmlRpcServerConnection.h
XmlRpcServerMethod.cc
XmlRpcServerMethod.h
XmlRpcSocket.cc
XmlRpcSocket.h
XmlRpcSource.cc
XmlRpcSource.h
XmlRpcThread.cc
XmlRpcThread.h
XmlRpcThreadedServer.cc
XmlRpcThreadedServer.h
XmlRpcUtil.cc
XmlRpcUtil.h
XmlRpcValue.cc
XmlRpcValue.h
yang.cc
yang.h
ZeroconfConnector.cc
ZeroconfConnector.h
File Members
UnderlayConfigurator.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 _UNDERLAYCONFIGURATOR_H_
25
#define _UNDERLAYCONFIGURATOR_H_
26
27
#include <omnetpp.h>
28
29
class
PeerInfo
;
30
class
ChurnGenerator
;
31
class
NodeType
;
32
class
TransportAddress
;
33
class
GlobalNodeList
;
34
class
GlobalStatistics
;
35
36
#ifndef timersub
37
# define timersub(a, b, result) \
38
do { \
39
(result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
40
(result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
41
if ((result)->tv_usec < 0) { \
42
--(result)->tv_sec; \
43
(result)->tv_usec += 1000000; \
44
} \
45
} while (0)
46
#endif
47
53
class
UnderlayConfigurator
:
public
cSimpleModule
54
{
55
public
:
56
57
UnderlayConfigurator
();
58
virtual
~UnderlayConfigurator
();
59
63
bool
isInInitPhase
() {
return
init
; };
64
68
bool
isSimulationEndingSoon
() {
return
simulationEndingSoon
; };
69
73
simtime_t
getGracefulLeaveDelay
() {
return
gracefulLeaveDelay
; };
74
75
76
bool
isTransitionTimeFinished
() {
return
transitionTimeFinished
; };
77
84
virtual
TransportAddress
*
createNode
(
NodeType
type,
bool
initialize
=
false
) = 0;
85
92
virtual
void
preKillNode
(
NodeType
type,
TransportAddress
* addr=NULL) = 0;
93
100
virtual
void
migrateNode
(
NodeType
type,
TransportAddress
* addr=NULL) = 0;
101
102
void
initFinished
();
103
104
ChurnGenerator
*
getChurnGenerator
(
int
typeID);
105
106
uint8_t
getChurnGeneratorNum
();
107
108
int
getOverlayTerminalCount
(){
return
overlayTerminalCount
;}
109
110
protected
:
111
115
int
numInitStages
()
const
;
116
120
virtual
void
initialize
(
int
stage);
121
125
virtual
void
initializeUnderlay
(
int
stage) = 0;
126
127
virtual
void
handleTimerEvent
(cMessage* msg);
128
132
void
finish
();
133
137
virtual
void
finishUnderlay
();
138
142
virtual
void
setDisplayString
() = 0;
143
149
void
handleMessage
(cMessage* msg);
150
151
int
overlayTerminalCount
;
152
int
firstNodeId
;
153
simtime_t
gracefulLeaveDelay
;
154
double
gracefulLeaveProbability
;
155
156
GlobalNodeList
*
globalNodeList
;
157
GlobalStatistics
*
globalStatistics
;
158
std::vector<ChurnGenerator*>
churnGenerator
;
159
160
cMessage*
endSimulationTimer
;
161
cMessage*
endSimulationNotificationTimer
;
162
cMessage*
endTransitionTimer
;
163
164
struct
timeval
initFinishedTime
;
165
struct
timeval
initStartTime
;
166
167
simtime_t
transitionTime
;
168
simtime_t
measurementTime
;
169
170
static
const
int
NUM_COLORS
;
171
static
const
char
*
colorNames
[];
172
173
private
:
174
bool
init
;
175
bool
simulationEndingSoon
;
176
bool
transitionTimeFinished
;
177
unsigned
int
initCounter
;
178
179
void
consoleOut
(
const
std::string& text);
180
};
181
182
#endif
src
common
UnderlayConfigurator.h
Generated on Fri Dec 7 2012 13:37:53 for OverSim by
1.8.1.2