OverSim
Gia Class Reference

Gia overlay module. More...

#include <Gia.h>

Inheritance diagram for Gia:
BaseOverlay BaseRpc BaseTcpSupport TopologyVis RpcListener

Public Member Functions

void initializeOverlay (int stage)
 initializes base class-attributes
void finishOverlay ()
 Writes statistical data and removes node from bootstrap oracle.
virtual void changeState (int toStage)
 Set state to toStage.
void updateTooltip ()
 Marks nodes if they are ready.
 ~Gia ()
 Destructor.
void handleTimerEvent (cMessage *msg)
void handleUDPMessage (BaseOverlayMessage *msg)
 Processes messages from underlay.
virtual void getRoute (const OverlayKey &key, CompType destComp, CompType srcComp, cPacket *msg, const std::vector< TransportAddress > &sourceRoute=TransportAddress::UNSPECIFIED_NODES, RoutingType routingType=DEFAULT_ROUTING)
void handleAppMessage (cMessage *msg)
 Processes "timer" self-messages.
void sendToken (const GiaNode &dst)
- Public Member Functions inherited from BaseOverlay
 BaseOverlay ()
virtual ~BaseOverlay ()
 Virtual destructor.
States getState ()
bool isMalicious ()
 Returns true, if node is malicious.
bool isInSimpleMultiOverlayHost ()
 Returns true if overlay is one in an array, inside a SimpleMultiOverlayHost.
const simtime_t & getCreationTime ()
void join (const OverlayKey &nodeID=OverlayKey::UNSPECIFIED_KEY)
 Join the overlay with a given nodeID.
virtual NodeVectorlocal_lookup (const OverlayKey &key, int num, bool safe)
 finds nodes closest to the given OverlayKey
virtual NodeVectorneighborSet (int num)
virtual bool isSiblingFor (const NodeHandle &node, const OverlayKey &key, int numSiblings, bool *err)
 Query if a node is among the siblings for a given key.
virtual int getMaxNumSiblings ()
 Query the maximum number of siblings (nodes close to a key) that are maintained by this overlay protocol.
virtual int getMaxNumRedundantNodes ()
 Query the maximum number of redundant next hop nodes that are returned by findNode().
void sendMessageToUDP (const TransportAddress &dest, cPacket *msg, simtime_t delay=SIMTIME_ZERO)
 Sends message to underlay.
void sendToKey (const OverlayKey &key, BaseOverlayMessage *message, int numSiblings=1, const std::vector< TransportAddress > &sourceRoute=TransportAddress::UNSPECIFIED_NODES, RoutingType routingType=DEFAULT_ROUTING)
 Sends a message to an overlay node, with the generic routing algorithm.
virtual OverlayKey distance (const OverlayKey &x, const OverlayKey &y, bool useAlternative=false) const
 This method should implement the distance between two keys.
void registerComp (CompType compType, cModule *module)
cModule * getCompModule (CompType compType)
cGate * getCompRpcGate (CompType compType)
void sendMessageToAllComp (cMessage *msg, CompType srcComp)
bool providesKbr ()
virtual uint8_t getBitsPerDigit ()
bool getMeasureAuthBlock ()
BootstrapListgetBootstrapList () const
virtual OverlayKey estimateMeanDistance ()
 returns mean distance between OverlayKeys in the network
virtual uint32_t estimateOverlaySize ()
 estimates the current number of nodes online
- Public Member Functions inherited from BaseRpc
 BaseRpc ()
const NodeHandlegetThisNode ()
 Returns the NodeHandle of this node.
simtime_t getUdpTimeout ()
- Public Member Functions inherited from RpcListener
virtual ~RpcListener ()
 destructor
- Public Member Functions inherited from BaseTcpSupport
virtual void socketDataArrived (int connId, void *yourPtr, cPacket *msg, bool urgent)
virtual void socketEstablished (int connId, void *yourPtr)
virtual void socketPeerClosed (int connId, void *yourPtr)
virtual void socketFailure (int connId, void *yourPtr, int code)
virtual void socketStatusArrived (int connId, void *yourPtr, TCPStatusInfo *status)
- Public Member Functions inherited from TopologyVis
 TopologyVis ()
void showOverlayNeighborArrow (const NodeHandle &neighbor, bool flush=true, const char *displayString=NULL)
 Draws an arrow from this node to neighbor.
void deleteOverlayNeighborArrow (const NodeHandle &neighbor)
 Removes an arrow from this node to neighbor.

Protected Member Functions

void joinOverlay ()
 Join the overlay with a given nodeID in thisNode.key.
bool acceptNode (const GiaNode &newNode, unsigned int degree)
 Decides if Node newNode will be accepted as new neighor.
void addNeighbor (GiaNode &newNode, unsigned int degree)
 Adds newNode as new neighbor.
void removeNeighbor (const GiaNode &newNode)
 Removes newNode from our NeighborList.
double calculateLevelOfSatisfaction ()
 Calculates level of satisfaction.
void sendMessage_JOIN_REQ (const NodeHandle &dst)
 Sends JOIN_REQ_Message from node src to node dst.
void sendMessage_JOIN_RSP (const NodeHandle &dst)
 Sends JOIN_RSP_Message from node src to node dst.
void sendMessage_JOIN_ACK (const NodeHandle &dst)
 Sends JOIN_ACK_Message from node src to node dst.
void sendMessage_JOIN_DNY (const NodeHandle &dst)
 Sends JOIN_DNY_Message from node src to node dst.
void sendMessage_DISCONNECT (const NodeHandle &dst)
 Sends DISCONNECT_Message from node src to node dst.
void sendMessage_UPDATE (const NodeHandle &dst)
 Sends UPDATE_Message from node src to node dst.
void sendKeyListToNeighbor (const NodeHandle &dst)
 Sends KeyList to node dst.
void updateNeighborList (GiaMessage *msg)
 Updates neighborlist with new capacity and connectiondegree informations from received message msg.
void forwardSearchResponseMessage (SearchResponseMessage *msg)
 Forwards a search response message to the next node in reverse-path.
void forwardMessage (GiaIDMessage *msg, bool fromApplication)
 Forwards a message to the next random selected node, biased random walk.
void processSearchMessage (SearchMessage *msg, bool fromApplication)
 Processes search message msg.
void sendSearchResponseMessage (const GiaNode &srcNode, SearchMessage *msg)
 Sends a response message to a received search query.
void deliverSearchResult (SearchResponseMessage *msg)
 Delivers search result to application layer.
- Protected Member Functions inherited from BaseOverlay
int numInitStages () const
 Sets init stage.
void bindToPort (int port)
 Tells UDP we want to get all packets arriving on the given port.
virtual void route (const OverlayKey &key, CompType destComp, CompType srcComp, cPacket *msg, const std::vector< TransportAddress > &sourceRoute=TransportAddress::UNSPECIFIED_NODES, RoutingType routingType=DEFAULT_ROUTING)
 Routes message through overlay.
void callDeliver (BaseOverlayMessage *msg, const OverlayKey &destKey)
 Calls deliver function in application.
void callForward (const OverlayKey &key, BaseRouteMessage *msg, const NodeHandle &nextHopNode)
 Calls forward function in application.
void callUpdate (const NodeHandle &node, bool joined)
 Informs application about state changes of nodes or newly joined nodes.
void handleMessage (cMessage *msg)
 Checks for message type and calls corresponding method.
void handleBaseOverlayMessage (BaseOverlayMessage *msg, const OverlayKey &destKey=OverlayKey::UNSPECIFIED_KEY)
 Handles a BaseOverlayMessage

virtual void receiveChangeNotification (int category, const cPolymorphic *details)
 callback-method for events at the NotificationBoard
virtual void handleTransportAddressChangedNotification ()
 This method gets call if the node has a new TransportAddress (IP address) because he changed his access network.
virtual void handleNodeLeaveNotification ()
 This method gets call **.gracefulLeaveDelay seconds before it is killed.
virtual void handleNodeGracefulLeaveNotification ()
 This method gets call **.gracefulLeaveDelay seconds before it is killed if this node is among the gracefulLeaveProbability nodes.
virtual void recordOverlaySentStats (BaseOverlayMessage *msg)
 Collect overlay specific sent messages statistics.
void setOverlayReady (bool ready)
 Sets the overlay ready icon and register/deregisters the node at the GlobalNodeList.
virtual AbstractLookupcreateLookup (RoutingType routingType=DEFAULT_ROUTING, const BaseOverlayMessage *msg=NULL, const cPacket *findNodeExt=NULL, bool appLookup=false)
 Creates an abstract iterative lookup instance.
virtual void removeLookup (AbstractLookup *lookup)
 Removes the abstract lookup instance.
virtual NodeVectorfindNode (const OverlayKey &key, int numRedundantNodes, int numSiblings, BaseOverlayMessage *msg=NULL)
 Implements the find node call.
virtual void joinForeignPartition (const NodeHandle &node)
 Join another overlay partition with the given node as bootstrap node.
virtual bool handleFailedNode (const TransportAddress &failed)
 Handles a failed node.
virtual void lookupRpc (LookupCall *call)
virtual void nextHopRpc (NextHopCall *call)
void countFindNodeCall (const FindNodeCall *call)
void countFailedNodeCall (const FailedNodeCall *call)
bool internalHandleRpcCall (BaseCallMessage *msg)
 Handles internal rpc requests.
void internalHandleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt)
 Handles rpc responses internal in base classes

void internalHandleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey)
 Handles rpc timeouts internal in base classes

void internalSendRouteRpc (BaseRpcMessage *message, const OverlayKey &destKey, const std::vector< TransportAddress > &sourceRoute, RoutingType routingType)
CompType getThisCompType ()
 Return the component type of this module.
- Protected Member Functions inherited from BaseRpc
void initRpcs ()
 Initializes Remote-Procedure state.
void finishRpcs ()
 Deinitializes Remote-Procedure state.
virtual void internalHandleRpcMessage (BaseRpcMessage *msg)
 Handles incoming rpc messages and delegates them to the corresponding listeners or handlers.
uint32_t sendRouteRpcCall (CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Routes a Remote-Procedure-Call message to an OverlayKey.
uint32_t sendRouteRpcCall (CompType destComp, const OverlayKey &destKey, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Routes a Remote-Procedure-Call message to an OverlayKey.
uint32_t sendRouteRpcCall (CompType destComp, const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, RoutingType routingType=DEFAULT_ROUTING, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Sends a Remote-Procedure-Call message using the overlay's UDP port
This replaces ROUTE_DIRECT calls!
uint32_t sendUdpRpcCall (const TransportAddress &dest, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Sends a Remote-Procedure-Call message to the underlay

uint32_t sendInternalRpcCall (CompType destComp, BaseCallMessage *msg, cPolymorphic *context=NULL, simtime_t timeout=-1, int retries=0, int rpcId=-1, RpcListener *rpcListener=NULL)
 Sends an internal Remote-Procedure-Call between two tiers

void cancelRpcMessage (uint32_t nonce)
 Cancels a Remote-Procedure-Call.
void cancelAllRpcs ()
 Cancels all RPCs.
void sendRpcResponse (TransportType transportType, CompType destComp, const TransportAddress &dest, const OverlayKey &destKey, BaseCallMessage *call, BaseResponseMessage *response)
 Send Remote-Procedure response message and deletes call message.
void sendRpcResponse (BaseCallMessage *call, BaseResponseMessage *response)
 Send Remote-Procedure response message to UDP and deletes call message.
int pingNode (const TransportAddress &dest, simtime_t timeout=-1, int retries=0, cPolymorphic *context=NULL, const char *caption="PING", RpcListener *rpcListener=NULL, int rpcId=-1, TransportType transportType=INVALID_TRANSPORT)
 ping a node by its TransportAddress
virtual bool handleRpcCall (BaseCallMessage *msg)
 Processes Remote-Procedure-Call invocation messages.
virtual void pingResponse (PingResponse *pingResponse, cPolymorphic *context, int rpcId, simtime_t rtt)
virtual void pingTimeout (PingCall *pingCall, const TransportAddress &dest, cPolymorphic *context, int rpcId)
bool internalHandleMessage (cMessage *msg)
- Protected Member Functions inherited from RpcListener
virtual void handleRpcResponse (BaseResponseMessage *msg, cPolymorphic *context, int rpcId, simtime_t rtt)
 This method is called if an RPC response has been received.
virtual void handleRpcResponse (BaseResponseMessage *msg, const RpcState &rpcState, simtime_t rtt)
 This method is called if an RPC response has been received.
virtual void handleRpcTimeout (BaseCallMessage *msg, const TransportAddress &dest, cPolymorphic *context, int rpcId, const OverlayKey &destKey)
 This method is called if an RPC timeout has been reached.
virtual void handleRpcTimeout (const RpcState &rpcState)
 This method is called if an RPC timeout has been reached.
- Protected Member Functions inherited from BaseTcpSupport
void handleTCPMessage (cMessage *msg)
 Member function to handle incoming TCP messages.
void bindAndListenTcp (int port)
 Member function to bind service to the specified port and listen afterwards.
bool isAlreadyConnected (TransportAddress address)
 Member function to check if the service is already connected.
void establishTcpConnection (TransportAddress address)
 Member function to establish a connection to the specified node.
void sendTcpData (cPacket *msg, TransportAddress address)
 Member function to send TCP data to the specified node.
virtual void handleConnectionEvent (EvCode code, TransportAddress address)
 Member function to handle passive connection events.
virtual void handleDataReceived (TransportAddress address, cPacket *msg, bool urgent)
 Member function to handle incoming data.
virtual void handleIncomingConnection (TransportAddress address)
 Member function to handle newly opened connections.
void closeTcpConnection (TransportAddress address)
 Member function to close an established connection.
void setTcpOut (cGate *gate)
 Member function to set local gate towards the TCP module during init phase.
cGate * getTcpOut ()
 Member function to get local gate towards the TCP module.
- Protected Member Functions inherited from TopologyVis
void initVis (cModule *terminal)

Protected Attributes

uint32_t maxNeighbors
 maximum number of neighbors
uint32_t minNeighbors
 minimum number of neighbors
uint32_t maxTopAdaptionInterval
 maximum topology adaption interval
uint32_t topAdaptionAggressiveness
 the topology adaption aggressiveness
double maxLevelOfSatisfaction
 maximum level of satisfaction
double updateDelay
 time between to update messages (in ms)
uint32_t maxHopCount
 maximum time to live for sent messages
uint32_t messageTimeout
 timeout for messages
uint32_t neighborTimeout
 timeout for neighbors
uint32_t sendTokenTimeout
 timeout for tokens
uint32_t tokenWaitTime
 delay to send a new token
double keyListDelay
 delay to send the keylist to our neighbors
bool outputNodeDetails
 output of node details? (on std::cout)
bool optimizeReversePath
 use optimized reverse path?
double levelOfSatisfaction
 current level of statisfaction
unsigned int connectionDegree
unsigned int receivedTokens
unsigned int sentTokens
GiaNode thisGiaNode
 this node
NodeHandle bootstrapNode
 next possible neighbor candidate
GiaMessageBookkeepingmsgBookkeepingList
 pointer to a message bookkeeping list
uint32_t stat_joinCount
 number of sent join messages
uint32_t stat_joinBytesSent
 number of sent bytes of join messages
uint32_t stat_joinREQ
 number of sent join request messages
uint32_t stat_joinREQBytesSent
 number of sent bytes of join request messages
uint32_t stat_joinRSP
 number of sent join response messages
uint32_t stat_joinRSPBytesSent
 number of sent bytes of join response messages
uint32_t stat_joinACK
 number of sent join acknowledge messages
uint32_t stat_joinACKBytesSent
 number of sent bytes of join acknowledge messages
uint32_t stat_joinDNY
 number of sent join deny messages
uint32_t stat_joinDNYBytesSent
 number of sent bytes of join deny messages
uint32_t stat_disconnectMessages
 number of sent disconnect messages
uint32_t stat_disconnectMessagesBytesSent
 number of sent bytes of disconnect messages
uint32_t stat_updateMessages
 number of sent update messages
uint32_t stat_updateMessagesBytesSent
 number of sent bytes of update messages
uint32_t stat_tokenMessages
 number of sent token messages
uint32_t stat_tokenMessagesBytesSent
 number of sent bytes of token messages
uint32_t stat_keyListMessages
 number of sent keylist messages
uint32_t stat_keyListMessagesBytesSent
 number of sent bytes of keylist messages
uint32_t stat_routeMessages
 number of sent route messages
uint32_t stat_routeMessagesBytesSent
 number of sent bytes of route messages
uint32_t stat_maxNeighbors
 maximum number of neighbors
uint32_t stat_addedNeighbors
 number of added neighbors during life cycle of this node
uint32_t stat_removedNeighbors
 number of removed neighbors during life cycle of this node
uint32_t stat_numSatisfactionMessages
 number of satisfaction self-messages
double stat_sumLevelOfSatisfaction
 sum of level of satisfaction
double stat_maxLevelOfSatisfaction
 maximum level of satisfaction
cMessage * satisfaction_timer
 timer for satisfaction self-message
cMessage * update_timer
 timer for update self-message
cMessage * timedoutMessages_timer
 timer for message timeout
cMessage * timedoutNeighbors_timer
 timer for neighbors timeout
cMessage * sendKeyList_timer
 timer for send keylist
cMessage * sendToken_timer
 timer for send token
GiaKeyListModulekeyListModule
 pointer to KeyListModule
GiaNeighborsneighbors
 pointer to neighbor list
GiaTokenFactorytokenFactory
 pointer to TokenFactory
GiaNeighborCandidateList neighCand
 list of all neighbor candidates
GiaNeighborCandidateList knownNodes
 list of known nodes in the overlay
GiaKeyList keyList
 key list of this node
- Protected Attributes inherited from BaseOverlay
int numAppDataForwarded
 number of forwarded app data packets
int bytesAppDataForwarded
 number of forwarded app data bytes at out-gate
int numAppLookupForwarded
 number of forwarded app lookup packets
int bytesAppLookupForwarded
 number of forwarded app lookup bytes at out-gate
int numMaintenanceForwarded
 number of forwarded maintenance packets
int bytesMaintenanceForwarded
 number of forwarded maintenance bytes at out-gate
int numFindNodeSent
int bytesFindNodeSent
int numFindNodeResponseSent
int bytesFindNodeResponseSent
int numFailedNodeSent
int bytesFailedNodeSent
int numFailedNodeResponseSent
int bytesFailedNodeResponseSent
std::vector< HopDelayRecord * > singleHopDelays
simtime_t creationTime
 simtime when the node has been created
GlobalNodeListglobalNodeList
 pointer to GlobalNodeList in this node
NotificationBoard * notificationBoard
 pointer to NotificationBoard in this node
UnderlayConfiguratorunderlayConfigurator
 pointer to UnderlayConfigurator in this node
BootstrapListbootstrapList
 pointer to the BootstrapList module
GlobalParametersglobalParameters
 pointer to the GlobalParameters module
uint32_t overlayId
 identifies the overlay this node belongs to (used for multiple overlays)
bool debugOutput
 debug output ?
RoutingType defaultRoutingType
bool useCommonAPIforward
 forward messages to applications?
bool collectPerHopDelay
 collect delay for single hops
bool routeMsgAcks
 send ACK when receiving route message
uint32_t recNumRedundantNodes
 numRedundantNodes for recursive routing
bool recordRoute
 record visited hops on route
bool drawOverlayTopology
bool rejoinOnFailure
bool sendRpcResponseToLastHop
 needed by KBR protocols for NAT support
bool dropFindNodeAttack
 if node is malicious, it tries a findNode attack
bool isSiblingAttack
 if node is malicious, it tries a isSibling attack
bool invalidNodesAttack
 if node is malicious, it tries a invalidNode attack
bool dropRouteMessageAttack
 if node is malicious, it drops all received BaseRouteMessages
int localPort
 used UDP-port
int hopCountMax
 maximum hop count
bool measureAuthBlock
 if true, measure the overhead of signatures in rpc messages
bool restoreContext
 if true, a node rejoins with its old nodeId and malicious state
int numDropped
 number of dropped packets
int bytesDropped
 number of dropped bytes
cOutVector delayVector
 statistical output vector for packet-delays
cOutVector hopCountVector
 statistical output vector for hop-counts
States state
IterativeLookupConfiguration iterativeLookupConfig
RecursiveLookupConfiguration recursiveLookupConfig
LookupSet lookups
bool kbr
 set this to true, if the overlay provides KBR services
- Protected Attributes inherited from BaseRpc
NodeHandle thisNode
 NodeHandle to this node.
BaseOverlayoverlay
bool debugOutput
 debug output ?
GlobalStatisticsglobalStatistics
 pointer to GlobalStatistics module in this node
CompType thisCompType
NeighborCacheneighborCache
 pointer to the neighbor cache
CryptoModulecryptoModule
 pointer to CryptoModule
int numPingSent
int bytesPingSent
int numPingResponseSent
int bytesPingResponseSent
- Protected Attributes inherited from TopologyVis
cModule * thisTerminal
GlobalNodeListglobalNodeList
 pointer to corresponding node

Additional Inherited Members

- Public Types inherited from BaseOverlay
enum  States {
  INIT = 0, BOOTSTRAP = 1, DISCOVERY = 2, PREJOIN = 3,
  JOIN = 4, POSTJOIN = 5, READY = 6, REFRESH = 7,
  SHUTDOWN = 8, FAILED = 9, RSET = JOIN, BSET = POSTJOIN
}
- Protected Types inherited from BaseOverlay
typedef UNORDERED_SET
< AbstractLookup
*, lookupHashFcn,
lookupHashFcn
LookupSet

Detailed Description

Gia overlay module.

Implementation of the Gia overlay as described in "Making Gnutella-like P2P Systems Scalable" by Y. Chawathe et al. published at SIGCOMM'03

Author
Robert Palmer

Definition at line 61 of file Gia.h.

Constructor & Destructor Documentation

Gia::~Gia ( )

Destructor.

Definition at line 1248 of file Gia.cc.

{
cancelAndDelete(satisfaction_timer);
cancelAndDelete(update_timer);
cancelAndDelete(timedoutMessages_timer);
cancelAndDelete(timedoutNeighbors_timer);
cancelAndDelete(sendKeyList_timer);
cancelAndDelete(sendToken_timer);
}

Member Function Documentation

bool Gia::acceptNode ( const GiaNode newNode,
unsigned int  degree 
)
protected

Decides if Node newNode will be accepted as new neighor.

Parameters
newNodeNode to accept or deny
degreethe node's connection degree
Returns
boolean true or false

Definition at line 569 of file Gia.cc.

Referenced by handleUDPMessage().

{
if (neighbors->contains(nNode))
return false;
// we have room for new node: accept node
return true;
}
// we need to drop a neighbor
NodeHandle dropCandidate = neighbors->getDropCandidate(nNode.getCapacity(), degree);
if(!dropCandidate.isUnspecified()) {
EV << "(Gia) " << thisGiaNode << " drops "
<< dropCandidate << endl;
neighbors->remove(dropCandidate);
sendMessage_DISCONNECT(dropCandidate);
return true;
}
return false;
}
void Gia::addNeighbor ( GiaNode newNode,
unsigned int  degree 
)
protected

Adds newNode as new neighbor.

Parameters
newNodethe node to add as a neighbor
degreethe node's connection degree

Definition at line 592 of file Gia.cc.

Referenced by handleUDPMessage().

{
EV << "(Gia) " << thisGiaNode << " accepted new neighbor " << node << endl;
getParentModule()->getParentModule()->bubble("New neighbor");
if (stat_maxNeighbors < neighbors->getSize()) {
}
cancelEvent(update_timer);
scheduleAt(simTime() + updateDelay, update_timer);
//node.setSentTokens(5);
//node.setReceivedTokens(5);
// send keyList to new Neighbor
if (keyList.getSize() > 0)
neighbors->add(node, degree);
"m=m,50,0,50,0;ls=red,1");
}
double Gia::calculateLevelOfSatisfaction ( )
protected

Calculates level of satisfaction.

Returns
levelOfSatisfaction value

Definition at line 643 of file Gia.cc.

Referenced by handleTimerEvent().

{
uint32_t neighborsCount = neighbors->getSize();
if(neighborsCount < minNeighbors)
return 0.0;
double total = 0.0;
double levelOfSatisfaction = 0.0;
for (uint32_t i=0; i < neighborsCount; i++)
total += neighbors->get(i).getCapacity() / neighborsCount;
assert(thisGiaNode.getCapacity() != 0);
levelOfSatisfaction = total / thisGiaNode.getCapacity();
if ((levelOfSatisfaction > 1.0) || (neighborsCount >= maxNeighbors))
return 1.0;
}
void Gia::changeState ( int  toStage)
virtual

Set state to toStage.

Parameters
toStagethe stage to change to

Definition at line 124 of file Gia.cc.

Referenced by addNeighbor(), handleTimerEvent(), joinOverlay(), and removeNeighbor().

{
switch (toState) {
case INIT: {
// set up local nodehandle
//thisGiaNode.setNodeHandle(thisNode);
// get possible bandwidth from ppp-Module
double capacity = 0;
cModule* nodeModule = getParentModule()->getParentModule();
if(!nodeModule->hasGate("pppg$i"))
capacity += uniform(1,800000);
else {
// this relies on IPv4Underlay
int gateSize = nodeModule->gateSize("pppg$i");
for (int i=0; i<gateSize; i++) {
cGate* currentGate = nodeModule->gate("pppg$i",i);
if (currentGate->isConnected())
capacity += check_and_cast<cDatarateChannel *>
(currentGate->getPreviousGate()->getChannel())->getDatarate()
- uniform(0,800000);
}
}
//thisGiaNode.setConnectionDegree(0);
//thisGiaNode.setReceivedTokens(0);
//thisGiaNode.setSentTokens(0);
EV << "(Gia) Node details: " << thisGiaNode << endl;
// get our entry point to GIA-Overlay
//else {
//assert(!(thisGiaNode.getNodeHandle().isUnspecified()));
//globalNodeList->registerPeer(thisGiaNode.getNodeHandle());
//}
// register node at TokenFactory
//tokenFactory->setNode(&thisGiaNode);
EV << "(Gia) Node " << thisGiaNode.getKey()
<< " (" << thisGiaNode.getIp() << ":"
<< thisGiaNode.getPort() << ") with capacity: "
<< thisGiaNode.getCapacity() << " entered INIT state." << endl;
getParentModule()->getParentModule()->bubble("Enter INIT state.");
// schedule satisfaction_timer
cancelEvent(satisfaction_timer);
scheduleAt(simTime(), satisfaction_timer);
// schedule timedoutMessages_timer
cancelEvent(timedoutMessages_timer);
scheduleAt(simTime() + messageTimeout,
scheduleAt(simTime() + neighborTimeout,
cancelEvent(sendToken_timer);
scheduleAt(simTime() + sendTokenTimeout,
break;
}
case READY:
break;
}
}
void Gia::deliverSearchResult ( SearchResponseMessage msg)
protected

Delivers search result to application layer.

Parameters
msgSearch response message

Definition at line 1190 of file Gia.cc.

Referenced by forwardSearchResponseMessage(), and sendSearchResponseMessage().

{
OverlayCtrlInfo* overlayCtrlInfo = new OverlayCtrlInfo();
overlayCtrlInfo->setHopCount(msg->getSearchHopCount());
overlayCtrlInfo->setSrcNode(msg->getSrcNode());
overlayCtrlInfo->setTransportType(ROUTE_TRANSPORT);
GIAanswer* deliverMsg = new GIAanswer("GIA-Answer");
deliverMsg->setCommand(GIA_ANSWER);
deliverMsg->setControlInfo(overlayCtrlInfo);
deliverMsg->setSearchKey(msg->getSearchKey());
deliverMsg->setNode(msg->getFoundNode());
deliverMsg->setBitLength(GIAGETRSP_L(msg));
send(deliverMsg, "appOut");
EV << "(Gia) Deliver search response " << msg
<< " to application at " << thisGiaNode << endl;
delete msg;
}
void Gia::finishOverlay ( )
virtual

Writes statistical data and removes node from bootstrap oracle.

Reimplemented from BaseOverlay.

Definition at line 1212 of file Gia.cc.

{
// statistics
globalStatistics->addStdDev("GIA: JOIN-Messages Count", stat_joinCount);
globalStatistics->addStdDev("GIA: JOIN Bytes sent", stat_joinBytesSent);
globalStatistics->addStdDev("GIA: JOIN::REQ Messages", stat_joinREQ);
globalStatistics->addStdDev("GIA: JOIN::REQ Bytes sent", stat_joinREQBytesSent);
globalStatistics->addStdDev("GIA: JOIN::RSP Messages", stat_joinRSP);
globalStatistics->addStdDev("GIA: JOIN::RSP Bytes sent", stat_joinRSPBytesSent);
globalStatistics->addStdDev("GIA: JOIN::ACK Messages", stat_joinACK);
globalStatistics->addStdDev("GIA: JOIN::ACK Bytes sent", stat_joinACKBytesSent);
globalStatistics->addStdDev("GIA: JOIN::DNY Messages", stat_joinDNY);
globalStatistics->addStdDev("GIA: JOIN::DNY Bytes sent", stat_joinDNYBytesSent);
globalStatistics->addStdDev("GIA: DISCONNECT:IND Messages", stat_disconnectMessages);
globalStatistics->addStdDev("GIA: DISCONNECT:IND Bytes sent",
globalStatistics->addStdDev("GIA: UPDATE:IND Messages", stat_updateMessages);
globalStatistics->addStdDev("GIA: UPDATE:IND Bytes sent", stat_updateMessagesBytesSent);
globalStatistics->addStdDev("GIA: TOKEN:IND Messages", stat_tokenMessages);
globalStatistics->addStdDev("GIA: TOKEN:IND Bytes sent", stat_tokenMessagesBytesSent);
globalStatistics->addStdDev("GIA: KEYLIST:IND Messages", stat_keyListMessages);
globalStatistics->addStdDev("GIA: KEYLIST:IND Bytes sent", stat_keyListMessagesBytesSent);
globalStatistics->addStdDev("GIA: ROUTE:IND Messages", stat_routeMessages);
globalStatistics->addStdDev("GIA: ROUTE:IND Bytes sent", stat_routeMessagesBytesSent);
globalStatistics->addStdDev("GIA: Neighbors max", stat_maxNeighbors);
globalStatistics->addStdDev("GIA: Neighbors added", stat_addedNeighbors);
globalStatistics->addStdDev("GIA: Neighbors removed", stat_removedNeighbors);
globalStatistics->addStdDev("GIA: Level of satisfaction messages ",
globalStatistics->addStdDev("GIA: Level of satisfaction max ",stat_maxLevelOfSatisfaction);
globalStatistics->addStdDev("GIA: Level of satisfaction avg ",
}
void Gia::forwardMessage ( GiaIDMessage msg,
bool  fromApplication 
)
protected

Forwards a message to the next random selected node, biased random walk.

Parameters
msgMessage to forward to next node
fromApplicationMarks if message is from application layer

Definition at line 872 of file Gia.cc.

Referenced by getRoute(), handleTimerEvent(), handleUDPMessage(), and processSearchMessage().

{
if (msg->getHopCount() == 0) {
// Max-Hopcount reached. Discard message
if (!fromApplication)
RECORD_STATS(numDropped++; bytesDropped += msg->getByteLength());
delete msg;
} else {
// local delivery?
if (msg->getDestKey() == thisGiaNode.getKey()) {
if(!fromApplication)
EV << "(Gia) Deliver messsage " << msg
<< " to application at " << thisGiaNode << endl;
OverlayCtrlInfo* overlayCtrlInfo =
overlayCtrlInfo->setHopCount(msg->getHopCount());
overlayCtrlInfo->setSrcNode(msg->getSrcNode());
overlayCtrlInfo->setTransportType(ROUTE_TRANSPORT);
overlayCtrlInfo->setDestComp(TIER1_COMP); // workaround
overlayCtrlInfo->setSrcComp(TIER1_COMP);
msg->setControlInfo(overlayCtrlInfo);
callDeliver(msg, msg->getDestKey());
} else {
// forward message to next hop
// do we know the destination-node?
if (neighbors->contains(msg->getDestKey())) {
// yes, destination-Node is our neighbor
NodeHandle targetNode = neighbors->get(msg->getDestKey());
GiaNeighborInfo* targetInfo= neighbors->get(targetNode);
if (targetInfo->receivedTokens == 0) {
// wait for free token
EV << "(Gia) No free Node, wait for free token" << endl;
//bad code
std::string id;
if (!fromApplication)
id = "wait-for-token: " + msg->getID().toString();
else
id = "wait-for-token-fromapp: " +
msg->getID().toString();
cPacket* wait_timer = new cPacket(id.c_str());
wait_timer->encapsulate(msg);
scheduleAt(simTime() + tokenWaitTime,wait_timer);
return;
} else {
// decrease nextHop-tokencount
//targetInfo->receivedTokens = targetInfo->receivedTokens - 1;
// forward msg to nextHop
msg->setHopCount(msg->getHopCount()-1);
EV << "(Gia) Forwarding message " << msg
<< " to neighbor " << targetNode << endl;
if (!fromApplication)
stat_routeMessagesBytesSent += msg->getByteLength();
if(msg->getHopCount() > 0)
msg->getByteLength());
sendMessageToUDP(targetNode, msg);
}
} else {
// no => pick node with at least one token and highest capacity
// do we have a neighbor who send us a token?
if(nextHop.isUnspecified()) {
// wait for free token
EV << "(Gia) No free Node, wait for free token" << endl;
std::string id;
if (!fromApplication)
id = "wait-for-token: " + msg->getID().toString();
else
id = "wait-for-token-fromapp: " +
msg->getID().toString();
cPacket* wait_timer = new cPacket(id.c_str());
wait_timer->encapsulate(msg);
scheduleAt(simTime() + tokenWaitTime,wait_timer);
return;
} else {
GiaNeighborInfo* nextHopInfo = neighbors->get(nextHop);
if(nextHopInfo == NULL) {
delete msg;
return; //???
}
// decrease nextHop-tokencount
//nextHopInfo->receivedTokens--;
// forward msg to nextHop
msg->setHopCount(msg->getHopCount()-1);
EV << "(Gia) Forwarding message " << msg
<< " to " << nextHop << endl;
if (!fromApplication)
stat_routeMessagesBytesSent += msg->getByteLength();
if(msg->getHopCount() > 0)
msg->getByteLength());
sendMessageToUDP(nextHop, msg);
}
}
}
}
}
void Gia::forwardSearchResponseMessage ( SearchResponseMessage msg)
protected

Forwards a search response message to the next node in reverse-path.

Parameters
msgMessage to forward to next node

Definition at line 828 of file Gia.cc.

Referenced by handleUDPMessage(), and sendSearchResponseMessage().

{
if (responseMsg->getHopCount() != 0) {
uint32_t reversePathArraySize = responseMsg->getReversePathArraySize();
// reached node which started search?
if (reversePathArraySize == 0) {
deliverSearchResult(responseMsg);
}
// forward message to next node in reverse path list
else {
NodeHandle targetNode = neighbors->get
(responseMsg->getReversePath(
reversePathArraySize-1));
if(!(targetNode.isUnspecified())) {
responseMsg->setDestKey(targetNode.getKey());
responseMsg->setReversePathArraySize(reversePathArraySize-1);
for (uint32_t i=0; i<reversePathArraySize-1; i++)
responseMsg->setReversePath(i, responseMsg->getReversePath(i));
responseMsg->setBitLength(responseMsg->getBitLength() - KEY_L);
stat_routeMessagesBytesSent += responseMsg->getByteLength();
if(responseMsg->getHopCount() > 0)
responseMsg->getByteLength());
sendMessageToUDP(targetNode, responseMsg);
} else {
EV << "(Gia) wrong reverse path in " << *responseMsg
<< " ... deleted!" << endl;
bytesDropped += responseMsg->getByteLength());
delete responseMsg;
}
}
}
// max hopcount reached. delete message
else
delete responseMsg;
}
void Gia::getRoute ( const OverlayKey key,
CompType  destComp,
CompType  srcComp,
cPacket *  msg,
const std::vector< TransportAddress > &  sourceRoute = TransportAddress::UNSPECIFIED_NODES,
RoutingType  routingType = DEFAULT_ROUTING 
)
virtual

Definition at line 1006 of file Gia.cc.

{
if ((destComp != TIER1_COMP) || (srcComp != TIER1_COMP)) {
throw cRuntimeError("Gia::getRoute(): Works currently "
"only with srcComp=destComp=TIER1_COMP!");
}
if (state == READY) {
GiaRouteMessage* routeMsg = new GiaRouteMessage("ROUTE");
routeMsg->setCommand(ROUTE);
routeMsg->setDestKey(key);
routeMsg->setSrcNode(thisGiaNode);
routeMsg->setID(OverlayKey::random());
routeMsg->setBitLength(GIAROUTE_L(routeMsg));
routeMsg->encapsulate(msg);
forwardMessage(routeMsg, true);
} else {
RECORD_STATS(numDropped++; bytesDropped += msg->getByteLength());
delete msg;
}
}
void Gia::handleAppMessage ( cMessage *  msg)
virtual

Processes "timer" self-messages.

Parameters
msgA self-message Processes non-commonAPI messages
msgnon-commonAPIMessage

Reimplemented from BaseOverlay.

Definition at line 1040 of file Gia.cc.

{
// do we receive a keylist?
if (dynamic_cast<GIAput*>(msg) != NULL) {
GIAput* putMsg = check_and_cast<GIAput*>(msg);
uint32_t keyListSize = putMsg->getKeysArraySize();
for (uint32_t k=0; k<keyListSize; k++)
keyList.addKeyItem(putMsg->getKeys(k));
// actualize vector in KeyListModule
scheduleAt(simTime() + keyListDelay, sendKeyList_timer);
delete putMsg;
} else if (dynamic_cast<GIAsearch*>(msg) != NULL) {
if (state == READY) {
GIAsearch* getMsg = check_and_cast<GIAsearch*>(msg);
SearchMessage* searchMsg = new SearchMessage("SEARCH");
searchMsg->setCommand(SEARCH);
searchMsg->setStatType(APP_DATA_STAT);
searchMsg->setHopCount(maxHopCount);
searchMsg->setDestKey(getMsg->getSearchKey());
searchMsg->setSrcNode(thisGiaNode);
searchMsg->setSrcCapacity(thisGiaNode.getCapacity());
searchMsg->setSrcDegree(connectionDegree);
searchMsg->setSearchKey(getMsg->getSearchKey());
searchMsg->setMaxResponses(getMsg->getMaxResponses());
searchMsg->setReversePathArraySize(0);
searchMsg->setID(OverlayKey::random());
searchMsg->setBitLength(SEARCH_L(searchMsg));
processSearchMessage(searchMsg, true);
delete getMsg;
} else
delete msg;
} else {
delete msg;
EV << "(Gia) unkown message from app deleted!" << endl;
}
}
void Gia::handleTimerEvent ( cMessage *  msg)
virtual

Reimplemented from BaseRpc.

Definition at line 261 of file Gia.cc.

{
if (msg == sendToken_timer) {
} else if (msg->isName("satisfaction_timer")) {
// calculate level of satisfaction and select new neighbor candidate
// start again satisfaction_timer
scheduleAt(simTime() + (maxTopAdaptionInterval *
// Only search a new neighbor if level of satisfaction is
// under level of maxLevelOfSatisfaction
if(knownNodes.getSize() == 0) {
if(neighbors->getSize() == 0 && neighCand.getSize() == 0)
knownNodes.add(globalNodeList->getBootstrapNode()/*bootstrapList->getBootstrapNode()*/);
else
return;
}
if(!(possibleNeighbor.isUnspecified()) &&
thisGiaNode != possibleNeighbor &&
!neighbors->contains(possibleNeighbor) &&
!neighCand.contains(possibleNeighbor)) {
// try to add new neighbor
neighCand.add(possibleNeighbor);
sendMessage_JOIN_REQ(possibleNeighbor);
}
}
} else if (msg->isName("update_timer")) {
// send current capacity and degree to all neighbors
for (uint32_t i=0; i<neighbors->getSize(); i++) {
}
} else if (msg->isName("timedoutMessages_timer")) {
// remove timedout messages
scheduleAt(simTime() + messageTimeout,
} else if (msg->isName("timedoutNeighbors_timer")) {
// remove timedout neighbors
if (neighbors->getSize() == 0) {
}
scheduleAt(simTime() + neighborTimeout,
} else if (msg->isName("sendKeyList_timer")) {
if (keyList.getSize() > 0) {
// send keyList to all of our neighbors
for (uint32_t i=0; i<neighbors->getSize(); i++)
}
} else {
// other self-messages are notoken-self-messages
// with an encapsulated message
const std::string id = msg->getName();
if (id.substr(0, 16) == std::string("wait-for-token: ")) {
cPacket* packet = check_and_cast<cPacket*>(msg);
cMessage* decapsulatedMessage = packet->decapsulate();
if (dynamic_cast<GiaIDMessage*>(decapsulatedMessage) != NULL) {
GiaIDMessage* message = check_and_cast<GiaIDMessage*>
(decapsulatedMessage);
forwardMessage(message, false);
}
} else if (id.substr(0, 24) == std::string("wait-for-token-fromapp: ")) {
cPacket* packet = check_and_cast<cPacket*>(msg);
cMessage* decapsulatedMessage = packet->decapsulate();
if (dynamic_cast<GiaIDMessage*>(decapsulatedMessage) != NULL) {
GiaIDMessage* message = check_and_cast<GiaIDMessage*>
(decapsulatedMessage);
forwardMessage(message, true);
}
}
delete msg;
}
}
void Gia::handleUDPMessage ( BaseOverlayMessage msg)
virtual

Processes messages from underlay.

Parameters
msgMessage from UDP

Reimplemented from BaseOverlay.

Definition at line 351 of file Gia.cc.

{
EV << "(Gia) " << thisGiaNode << " received udp message" << endl;
cPolymorphic* ctrlInfo = msg->removeControlInfo();
if(ctrlInfo != NULL)
delete ctrlInfo;
// Parse TokenMessages
if (dynamic_cast<TokenMessage*>(msg) != NULL) {
TokenMessage* giaMsg = check_and_cast<TokenMessage*>(msg);
// Process TOKEN-Message
if ((giaMsg->getCommand() == TOKEN)) {
EV << "(Gia) Received Tokenmessage from "
<< giaMsg->getSrcNode() << endl;
//neighbors->setReceivedTokens(giaMsg->getSrcNode(), giaMsg->getDstTokenNr());
}
delete msg;
}
// Process Route messages
else if (dynamic_cast<GiaRouteMessage*>(msg) != NULL) {
GiaRouteMessage* giaMsg = check_and_cast<GiaRouteMessage*>(msg);
GiaNode oppositeNode(giaMsg->getSrcNode(), giaMsg->getSrcCapacity(),
giaMsg->getSrcDegree());
if((giaMsg->getCommand() == ROUTE)) {
EV << "(Gia) Received ROUTE::IND from " << oppositeNode << endl;
if(state == READY) {
//neighbors->decreaseReceivedTokens(giaMsg->getSrcNode());
forwardMessage(giaMsg, false);
}
}
}
// Process KeyList-Messages
else if (dynamic_cast<KeyListMessage*>(msg) != NULL) {
KeyListMessage* giaMsg = check_and_cast<KeyListMessage*>(msg);
GiaNode oppositeNode(giaMsg->getSrcNode(), giaMsg->getSrcCapacity(),
giaMsg->getSrcDegree());
if (giaMsg->getCommand() == KEYLIST) {
EV << "(Gia) " << thisGiaNode
<< " received KEYLIST:IND message" << endl;
// update KeyList in neighborList
uint32_t keyListSize = giaMsg->getKeysArraySize();
GiaKeyList neighborKeyList;
for (uint32_t k = 0; k < keyListSize; k++)
neighborKeyList.addKeyItem(giaMsg->getKeys(k));
neighbors->setNeighborKeyList(giaMsg->getSrcNode(), neighborKeyList);
}
delete giaMsg;
}
// Process Search-Messages
else if (dynamic_cast<SearchMessage*>(msg) != NULL) {
SearchMessage* giaMsg = check_and_cast<SearchMessage*>(msg);
GiaNode oppositeNode(giaMsg->getSrcNode(), giaMsg->getSrcCapacity(),
giaMsg->getSrcDegree());
//neighbors->decreaseSentTokens(giaMsg->getSrcNode());
processSearchMessage(giaMsg, false);
// } else {
// EV << "(Gia) Message " << msg << " dropped!" << endl;
// RECORD_STATS(numDropped++; bytesDropped += msg->getByteLength());
// delete msg;
// }
}
// Process Search-Response-Messages
else if (dynamic_cast<SearchResponseMessage*>(msg) != NULL) {
SearchResponseMessage* responseMsg =
check_and_cast<SearchResponseMessage*>(msg);
}
// Process Gia messages
else if (dynamic_cast<GiaMessage*>(msg) != NULL) {
GiaMessage* giaMsg = check_and_cast<GiaMessage*>(msg);
//assert(giaMsg->getSrcNode().moduleId != -1);
GiaNode oppositeNode(giaMsg->getSrcNode(), giaMsg->getSrcCapacity(),
giaMsg->getSrcDegree());
EV << "(Gia) " << thisGiaNode << " received GIA- message from "
<< oppositeNode << endl;
// Process JOIN:REQ messages
if (giaMsg->getCommand() == JOIN_REQUEST) {
EV << "(Gia) " << thisGiaNode
<< " received JOIN:REQ message" << endl;
if (acceptNode(oppositeNode, giaMsg->getSrcDegree())) {
neighCand.add(oppositeNode);
sendMessage_JOIN_RSP(oppositeNode);
} else {
EV << "(Gia) " << thisGiaNode << " denies node "
<< oppositeNode << endl;
sendMessage_JOIN_DNY(oppositeNode);
}
}
// Process JOIN:RSP messages
else if (giaMsg->getCommand() == JOIN_RESPONSE) {
EV << "(Gia) " << thisGiaNode << " received JOIN:RSP message"
<< endl;
if(neighCand.contains(oppositeNode)) {
neighCand.remove(oppositeNode);
if(acceptNode(oppositeNode, giaMsg->getSrcDegree())) {
addNeighbor(oppositeNode, giaMsg->getSrcDegree());
check_and_cast<GiaNeighborMessage*>(giaMsg);
for(uint32_t i = 0; i < msg->getNeighborsArraySize(); i++) {
GiaNode temp = msg->getNeighbors(i);
if(temp != thisGiaNode && temp != oppositeNode)
knownNodes.add(temp);
}
sendMessage_JOIN_ACK(oppositeNode);
} else {
EV << "(Gia) " << thisGiaNode << " denies node "
<< oppositeNode << endl;
sendMessage_JOIN_DNY(oppositeNode);
}
}
}
// Process JOIN:ACK messages
else if (giaMsg->getCommand() == JOIN_ACK) {
EV << "(Gia) " << thisGiaNode << " received JOIN:ACK message"
<< endl;
if (neighCand.contains(oppositeNode) &&
neighCand.remove(oppositeNode);
addNeighbor(oppositeNode, giaMsg->getSrcDegree());
check_and_cast<GiaNeighborMessage*>(giaMsg);
for(uint32_t i = 0; i < msg->getNeighborsArraySize(); i++) {
GiaNode temp = msg->getNeighbors(i);
if(temp != thisGiaNode && temp != oppositeNode)
knownNodes.add(msg->getNeighbors(i));
}
} else {
sendMessage_DISCONNECT(oppositeNode);
}
}
// Process JOIN:DNY messages
else if (giaMsg->getCommand() == JOIN_DENY) {
EV << "(Gia) " << thisGiaNode << " received JOIN:DNY message"
<< endl;
if (neighCand.contains(oppositeNode))
neighCand.remove(oppositeNode);
knownNodes.remove(oppositeNode);
}
// Process DISCONNECT-Message
else if (giaMsg->getCommand() == DISCONNECT) {
EV << "(Gia) " << thisGiaNode << " received DISCONNECT:IND message" << endl;
}
// Process UPDATE-Message
else if (giaMsg->getCommand() == UPDATE) {
EV << "(Gia) " << thisGiaNode << " received UPDATE:IND message"
<< endl;
giaMsg->getSrcDegree());
//neighbors->setCapacity(giaMsg->getSrcNode(),
//giaMsg->getSrcCapacity());
} else {
// Show unknown gia-messages
if (debugOutput) {
EV << "(Gia) NODE: "<< thisGiaNode << endl
<< " Command: " << giaMsg->getCommand() << endl
<< " HopCount: " << giaMsg->getHopCount() << endl
<< " SrcKey: " << giaMsg->getSrcNode().getKey() << endl
<< " SrcIP: " << giaMsg->getSrcNode().getKey() << endl
<< " SrcPort: " << giaMsg->getSrcNode().getPort() << endl
<< " SrcCapacity: " << giaMsg->getSrcCapacity() << endl
<< " SrcDegree: " << giaMsg->getSrcDegree() << endl;
RECORD_STATS(numDropped++;bytesDropped += giaMsg->getByteLength());
}
}
delete giaMsg;
} else // PROCESS other messages than GiaMessages
delete msg; // delete them all
}
void Gia::initializeOverlay ( int  stage)
virtual

initializes base class-attributes

Parameters
stagethe init stage

Reimplemented from BaseOverlay.

Definition at line 39 of file Gia.cc.

{
// wait until IPAddressResolver initialized all interfaces and assigns addresses
if(stage != MIN_STAGE_OVERLAY)
return;
// Get parameters from omnetpp.ini
maxNeighbors = par("maxNeighbors");
minNeighbors = par("minNeighbors");
maxTopAdaptionInterval = par("maxTopAdaptionInterval");
topAdaptionAggressiveness = par("topAdaptionAggressiveness");
maxLevelOfSatisfaction = par("maxLevelOfSatisfaction");
updateDelay = par("updateDelay");
maxHopCount = par("maxHopCount"); //obsolete
messageTimeout = par("messageTimeout");
neighborTimeout = par("neighborTimeout");
sendTokenTimeout = par("sendTokenTimeout");
tokenWaitTime = par("tokenWaitTime");
keyListDelay = par("keyListDelay");
outputNodeDetails = par("outputNodeDetails");
optimizeReversePath = par("optimizeReversePath");
// get references on necessary modules
keyListModule = check_and_cast<GiaKeyListModule*>
(getParentModule()->getSubmodule("keyListModule"));
neighbors = check_and_cast<GiaNeighbors*>
(getParentModule()->getSubmodule("neighbors"));
tokenFactory = check_and_cast<GiaTokenFactory*>
(getParentModule()->getSubmodule("tokenFactory"));
// clear neighbor candidate list
WATCH(thisGiaNode);
WATCH(bootstrapNode);
// self-messages
satisfaction_timer = new cMessage("satisfaction_timer");
update_timer = new cMessage("update_timer");
timedoutMessages_timer = new cMessage("timedoutMessages_timer");
timedoutNeighbors_timer = new cMessage("timedoutNeighbors_timer");
sendKeyList_timer = new cMessage("sendKeyList_timer");
sendToken_timer = new cMessage("sendToken_timer");
// statistics
}
void Gia::joinOverlay ( )
protectedvirtual

Join the overlay with a given nodeID in thisNode.key.

Join the overlay with a given nodeID in thisNode.key. This method may be called by an application to join the overlay with a specific nodeID. It is also called if the node's IP address changes.

Reimplemented from BaseOverlay.

Definition at line 116 of file Gia.cc.

void Gia::processSearchMessage ( SearchMessage msg,
bool  fromApplication 
)
protected

Processes search message msg.

Generates Search_Response_Messages

Parameters
msgSearch message
fromApplicationMarks if message is from application layer

Definition at line 1147 of file Gia.cc.

Referenced by handleAppMessage(), and handleUDPMessage().

{
OverlayKey searchKey = msg->getSearchKey();
if (keyList.contains(searchKey)) {
// this node contains search key
}
// check if neighbors contain search key
for (uint32_t i = 0; i < neighbors->getSize(); i++) {
if (keyList->contains(searchKey))
}
// forward search-message to next hop
if (msg->getMaxResponses() > 0) {
// actualize reverse path
uint32_t reversePathSize = msg->getReversePathArraySize();
for (uint32_t i=0; i<reversePathSize; i++) {
if (msg->getReversePath(i) == thisGiaNode.getKey()) {
// Our node already in ReversePath.
// Delete successor nodes from ReversePath
msg->setBitLength(msg->getBitLength() - (reversePathSize - i)*KEY_L);
reversePathSize = i; // set new array size
break;
}
}
msg->setReversePathArraySize(reversePathSize+1);
msg->setReversePath(reversePathSize, thisGiaNode.getKey());
msg->setBitLength(msg->getBitLength() + KEY_L);
forwardMessage(msg, fromApplication);
} else {
delete msg;
}
}
void Gia::removeNeighbor ( const GiaNode newNode)
protected

Removes newNode from our NeighborList.

Parameters
newNodeNodeHandle of the node to remove from neighbors

Definition at line 621 of file Gia.cc.

Referenced by handleUDPMessage().

{
EV << "(Gia) " << thisGiaNode << " removes " << node
<< " from neighborlist." << endl;
neighbors->remove(node);
if (neighbors->getSize() == 0) {
}
cancelEvent(update_timer);
scheduleAt(simTime() + updateDelay, update_timer);
}
void Gia::sendKeyListToNeighbor ( const NodeHandle dst)
protected

Sends KeyList to node dst.

Parameters
dst,:Destination

Definition at line 780 of file Gia.cc.

Referenced by addNeighbor(), and handleTimerEvent().

{
// send KEYLIST:IND message
KeyListMessage* msg = new KeyListMessage("KEYLIST");
for (uint32_t i=0; i<keyList.getSize(); i++)
msg->setKeys(i, keyList.get(i));
msg->setBitLength(KEYLIST_L(msg));
stat_keyListMessagesBytesSent += msg->getByteLength();
sendMessageToUDP(dst, msg);
}
void Gia::sendMessage_DISCONNECT ( const NodeHandle dst)
protected

Sends DISCONNECT_Message from node src to node dst.

Parameters
dst,:Destination

Definition at line 748 of file Gia.cc.

Referenced by acceptNode(), and handleUDPMessage().

{
// send DISCONNECT:IND message
GiaMessage* msg = new GiaMessage("DISCONNECT");
msg->setBitLength(GIA_L(msg));
stat_disconnectMessagesBytesSent += msg->getByteLength();
sendMessageToUDP(dst, msg);
}
void Gia::sendMessage_JOIN_ACK ( const NodeHandle dst)
protected

Sends JOIN_ACK_Message from node src to node dst.

Parameters
dst,:Destination

Definition at line 706 of file Gia.cc.

Referenced by handleUDPMessage().

{
// send JOIN:ACK message
GiaNeighborMessage* msg = new GiaNeighborMessage("JOIN_ACK");
//TODO: add parameter maxSendNeighbors
for(uint32_t i = 0; i < neighbors->getSize(); i++)
msg->setNeighbors(i, neighbors->get(i));
msg->setBitLength(GIANEIGHBOR_L(msg));
stat_joinBytesSent += msg->getByteLength();
stat_joinACKBytesSent += msg->getByteLength();
sendMessageToUDP(dst, msg);
}
void Gia::sendMessage_JOIN_DNY ( const NodeHandle dst)
protected

Sends JOIN_DNY_Message from node src to node dst.

Parameters
dst,:Destination

Definition at line 730 of file Gia.cc.

Referenced by handleUDPMessage().

{
// send JOIN:DNY message
GiaMessage* msg = new GiaMessage("JOIN_DENY");
msg->setBitLength(GIA_L(msg));
stat_joinBytesSent += msg->getByteLength();
stat_joinDNYBytesSent += msg->getByteLength();
sendMessageToUDP(dst, msg);
}
void Gia::sendMessage_JOIN_REQ ( const NodeHandle dst)
protected

Sends JOIN_REQ_Message from node src to node dst.

Parameters
dst,:Destination

Definition at line 664 of file Gia.cc.

Referenced by handleTimerEvent().

{
// send JOIN:REQ message
GiaMessage* msg = new GiaMessage("JOIN_REQ");
msg->setBitLength(GIA_L(msg));
stat_joinBytesSent += msg->getByteLength();
stat_joinREQBytesSent += msg->getByteLength();
sendMessageToUDP(dst, msg);
}
void Gia::sendMessage_JOIN_RSP ( const NodeHandle dst)
protected

Sends JOIN_RSP_Message from node src to node dst.

Parameters
dst,:Destination

Definition at line 682 of file Gia.cc.

Referenced by handleUDPMessage().

{
// send JOIN:RSP message
GiaNeighborMessage* msg = new GiaNeighborMessage("JOIN_RSP");
//TODO: add parameter maxSendNeighbors
for(uint32_t i = 0; i < neighbors->getSize(); i++)
msg->setNeighbors(i, neighbors->get(i));
msg->setBitLength(GIANEIGHBOR_L(msg));
stat_joinBytesSent += msg->getByteLength();
stat_joinRSPBytesSent += msg->getByteLength();
sendMessageToUDP(dst, msg);
}
void Gia::sendMessage_UPDATE ( const NodeHandle dst)
protected

Sends UPDATE_Message from node src to node dst.

Parameters
dst,:Destination

Definition at line 764 of file Gia.cc.

Referenced by handleTimerEvent().

{
// send UPDATE:IND message
GiaMessage* msg = new GiaMessage("UPDATE");
msg->setBitLength(GIA_L(msg));
stat_updateMessagesBytesSent += msg->getByteLength();
sendMessageToUDP(dst, msg);
}
void Gia::sendSearchResponseMessage ( const GiaNode srcNode,
SearchMessage msg 
)
protected

Sends a response message to a received search query.

Parameters
srcNodeNode which contains the searched key
msgSearchMessage

Definition at line 1084 of file Gia.cc.

Referenced by processSearchMessage().

{
// does SearchMessage->foundNode[] already contain this node
uint32_t foundNodeArraySize = msg->getFoundNodeArraySize();
bool containsNode = false;
for (uint32_t i=0; i<foundNodeArraySize; i++)
if (srcNode.getKey() == msg->getFoundNode(i))
containsNode = true;
if (!containsNode && msg->getMaxResponses() > 0) {
// add this node to SearchMessage->foundNode[]
msg->setFoundNodeArraySize(foundNodeArraySize+1);
msg->setFoundNode(foundNodeArraySize, srcNode.getKey());
// decrease SearchMessage->maxResponses
// get first node in reverse-path
uint32_t reversePathArraySize = msg->getReversePathArraySize();
if (reversePathArraySize == 0) {
// we have the key
// deliver response to application
SearchResponseMessage* responseMsg =
new SearchResponseMessage("ANSWER");
responseMsg->setCommand(ANSWER);
responseMsg->setStatType(APP_DATA_STAT);
responseMsg->setHopCount(maxHopCount);
responseMsg->setSrcNode(thisGiaNode);
responseMsg->setSearchKey(msg->getSearchKey());
responseMsg->setFoundNode(srcNode);
responseMsg->setID(OverlayKey::random());
responseMsg->setSearchHopCount(0);
responseMsg->setBitLength(SEARCHRESPONSE_L(responseMsg));
deliverSearchResult(responseMsg);
} else {
uint32_t reversePathArraySize(msg->getReversePathArraySize());
SearchResponseMessage* responseMsg =
new SearchResponseMessage("ANSWER");
responseMsg->setCommand(ANSWER);
responseMsg->setHopCount(maxHopCount);
responseMsg->setSrcNode(srcNode);
responseMsg->setSrcCapacity(srcNode.getCapacity());
responseMsg->setSrcDegree(connectionDegree);
responseMsg->setSearchKey(msg->getSearchKey());
responseMsg->setFoundNode(srcNode);
responseMsg->setReversePathArraySize(reversePathArraySize);
for (uint32_t i=0; i<reversePathArraySize; i++)
responseMsg->setReversePath(i, msg->getReversePath(i));
responseMsg->setID(OverlayKey::random());
responseMsg->setSearchHopCount(reversePathArraySize);
responseMsg->setBitLength(SEARCHRESPONSE_L(responseMsg));
}
}
}
void Gia::sendToken ( const GiaNode dst)

Definition at line 801 of file Gia.cc.

Referenced by GiaTokenFactory::grantToken().

{
TokenMessage* tokenMsg = new TokenMessage("TOKEN");
tokenMsg->setCommand(TOKEN);
tokenMsg->setSrcNode(thisGiaNode);
tokenMsg->setSrcTokenNr(0/*dst.getReceivedTokens()*/);//???
tokenMsg->setDstTokenNr(/*dst.getSentTokens()+*/1);
tokenMsg->setBitLength(TOKEN_L(tokenMsg));
stat_tokenMessagesBytesSent += tokenMsg->getByteLength();
sendMessageToUDP(dst, tokenMsg);
}
void Gia::updateNeighborList ( GiaMessage msg)
protected

Updates neighborlist with new capacity and connectiondegree informations from received message msg.

Parameters
msgReceived message

Definition at line 819 of file Gia.cc.

Referenced by handleUDPMessage().

{
//neighbors->setCapacity(msg->getSrcNode(), msg->getSrcCapacity());
}
}
void Gia::updateTooltip ( )

Marks nodes if they are ready.

Definition at line 234 of file Gia.cc.

Referenced by addNeighbor(), changeState(), and removeNeighbor().

{
if (ev.isGUI()) {
// if (state == READY) {
// getParentModule()->getParentModule()->getDisplayString().
// setTagArg("i2", 1, "");
// getDisplayString().setTagArg("i", 1, "");
// } else {
// getParentModule()->getParentModule()->getDisplayString().
// setTagArg("i2", 1, "red");
// getDisplayString().setTagArg("i", 1, "red");
// }
std::stringstream ttString;
// show our predecessor and successor in tooltip
ttString << thisNode << "\n# Neighbors: "
getParentModule()->getParentModule()->getDisplayString().
setTagArg("tt", 0, ttString.str().c_str());
getParentModule()->getDisplayString().
setTagArg("tt", 0, ttString.str().c_str());
getDisplayString().setTagArg("tt", 0, ttString.str().c_str());
}
}

Member Data Documentation

NodeHandle Gia::bootstrapNode
protected

next possible neighbor candidate

Definition at line 134 of file Gia.h.

Referenced by changeState(), initializeOverlay(), and joinOverlay().

GiaKeyList Gia::keyList
protected

key list of this node

Definition at line 181 of file Gia.h.

Referenced by addNeighbor(), handleAppMessage(), handleTimerEvent(), processSearchMessage(), and sendKeyListToNeighbor().

double Gia::keyListDelay
protected

delay to send the keylist to our neighbors

Definition at line 123 of file Gia.h.

Referenced by handleAppMessage(), and initializeOverlay().

GiaKeyListModule* Gia::keyListModule
protected

pointer to KeyListModule

Definition at line 174 of file Gia.h.

Referenced by handleAppMessage(), and initializeOverlay().

GiaNeighborCandidateList Gia::knownNodes
protected

list of known nodes in the overlay

Definition at line 180 of file Gia.h.

Referenced by changeState(), handleTimerEvent(), handleUDPMessage(), and initializeOverlay().

double Gia::levelOfSatisfaction
protected

current level of statisfaction

Definition at line 127 of file Gia.h.

Referenced by calculateLevelOfSatisfaction(), handleTimerEvent(), and initializeOverlay().

uint32_t Gia::maxHopCount
protected

maximum time to live for sent messages

Definition at line 118 of file Gia.h.

Referenced by changeState(), getRoute(), handleAppMessage(), initializeOverlay(), sendSearchResponseMessage(), and sendToken().

double Gia::maxLevelOfSatisfaction
protected

maximum level of satisfaction

Definition at line 116 of file Gia.h.

Referenced by handleTimerEvent(), and initializeOverlay().

uint32_t Gia::maxNeighbors
protected

maximum number of neighbors

Definition at line 112 of file Gia.h.

Referenced by acceptNode(), addNeighbor(), calculateLevelOfSatisfaction(), handleUDPMessage(), and initializeOverlay().

uint32_t Gia::maxTopAdaptionInterval
protected

maximum topology adaption interval

Definition at line 114 of file Gia.h.

Referenced by handleTimerEvent(), and initializeOverlay().

uint32_t Gia::messageTimeout
protected

timeout for messages

Definition at line 119 of file Gia.h.

Referenced by changeState(), handleTimerEvent(), and initializeOverlay().

uint32_t Gia::minNeighbors
protected

minimum number of neighbors

Definition at line 113 of file Gia.h.

Referenced by calculateLevelOfSatisfaction(), and initializeOverlay().

GiaMessageBookkeeping* Gia::msgBookkeepingList
protected

pointer to a message bookkeeping list

Definition at line 135 of file Gia.h.

Referenced by forwardMessage(), handleTimerEvent(), initializeOverlay(), and ~Gia().

uint32_t Gia::neighborTimeout
protected

timeout for neighbors

Definition at line 120 of file Gia.h.

Referenced by changeState(), handleTimerEvent(), and initializeOverlay().

GiaNeighborCandidateList Gia::neighCand
protected

list of all neighbor candidates

Definition at line 179 of file Gia.h.

Referenced by handleTimerEvent(), handleUDPMessage(), and initializeOverlay().

bool Gia::optimizeReversePath
protected

use optimized reverse path?

Definition at line 125 of file Gia.h.

Referenced by initializeOverlay(), and processSearchMessage().

bool Gia::outputNodeDetails
protected

output of node details? (on std::cout)

Definition at line 124 of file Gia.h.

Referenced by changeState(), and initializeOverlay().

unsigned int Gia::receivedTokens
protected

Definition at line 129 of file Gia.h.

Referenced by changeState().

cMessage* Gia::satisfaction_timer
protected

timer for satisfaction self-message

Definition at line 166 of file Gia.h.

Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Gia().

cMessage* Gia::sendKeyList_timer
protected

timer for send keylist

Definition at line 170 of file Gia.h.

Referenced by handleAppMessage(), initializeOverlay(), and ~Gia().

cMessage* Gia::sendToken_timer
protected

timer for send token

Definition at line 171 of file Gia.h.

Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Gia().

uint32_t Gia::sendTokenTimeout
protected

timeout for tokens

Definition at line 121 of file Gia.h.

Referenced by changeState(), and initializeOverlay().

unsigned int Gia::sentTokens
protected

Definition at line 130 of file Gia.h.

Referenced by changeState().

uint32_t Gia::stat_addedNeighbors
protected

number of added neighbors during life cycle of this node

Definition at line 159 of file Gia.h.

Referenced by addNeighbor(), finishOverlay(), and initializeOverlay().

uint32_t Gia::stat_disconnectMessages
protected

number of sent disconnect messages

Definition at line 148 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_DISCONNECT().

uint32_t Gia::stat_disconnectMessagesBytesSent
protected

number of sent bytes of disconnect messages

Definition at line 149 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_DISCONNECT().

uint32_t Gia::stat_joinACK
protected

number of sent join acknowledge messages

Definition at line 144 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_ACK().

uint32_t Gia::stat_joinACKBytesSent
protected

number of sent bytes of join acknowledge messages

Definition at line 145 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_ACK().

uint32_t Gia::stat_joinBytesSent
protected

number of sent bytes of join messages

Definition at line 139 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), sendMessage_JOIN_ACK(), sendMessage_JOIN_DNY(), sendMessage_JOIN_REQ(), and sendMessage_JOIN_RSP().

uint32_t Gia::stat_joinCount
protected

number of sent join messages

Definition at line 138 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), sendMessage_JOIN_ACK(), sendMessage_JOIN_DNY(), sendMessage_JOIN_REQ(), and sendMessage_JOIN_RSP().

uint32_t Gia::stat_joinDNY
protected

number of sent join deny messages

Definition at line 146 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_DNY().

uint32_t Gia::stat_joinDNYBytesSent
protected

number of sent bytes of join deny messages

Definition at line 147 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_DNY().

uint32_t Gia::stat_joinREQ
protected

number of sent join request messages

Definition at line 140 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_REQ().

uint32_t Gia::stat_joinREQBytesSent
protected

number of sent bytes of join request messages

Definition at line 141 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_REQ().

uint32_t Gia::stat_joinRSP
protected

number of sent join response messages

Definition at line 142 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_RSP().

uint32_t Gia::stat_joinRSPBytesSent
protected

number of sent bytes of join response messages

Definition at line 143 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_JOIN_RSP().

uint32_t Gia::stat_keyListMessages
protected

number of sent keylist messages

Definition at line 154 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendKeyListToNeighbor().

uint32_t Gia::stat_keyListMessagesBytesSent
protected

number of sent bytes of keylist messages

Definition at line 155 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendKeyListToNeighbor().

double Gia::stat_maxLevelOfSatisfaction
protected

maximum level of satisfaction

Definition at line 163 of file Gia.h.

Referenced by finishOverlay(), handleTimerEvent(), and initializeOverlay().

uint32_t Gia::stat_maxNeighbors
protected

maximum number of neighbors

Definition at line 158 of file Gia.h.

Referenced by addNeighbor(), finishOverlay(), and initializeOverlay().

uint32_t Gia::stat_numSatisfactionMessages
protected

number of satisfaction self-messages

Definition at line 161 of file Gia.h.

Referenced by finishOverlay(), handleTimerEvent(), and initializeOverlay().

uint32_t Gia::stat_removedNeighbors
protected

number of removed neighbors during life cycle of this node

Definition at line 160 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and removeNeighbor().

uint32_t Gia::stat_routeMessages
protected

number of sent route messages

Definition at line 156 of file Gia.h.

Referenced by finishOverlay(), forwardMessage(), forwardSearchResponseMessage(), and initializeOverlay().

uint32_t Gia::stat_routeMessagesBytesSent
protected

number of sent bytes of route messages

Definition at line 157 of file Gia.h.

Referenced by finishOverlay(), forwardMessage(), forwardSearchResponseMessage(), and initializeOverlay().

double Gia::stat_sumLevelOfSatisfaction
protected

sum of level of satisfaction

Definition at line 162 of file Gia.h.

Referenced by finishOverlay(), handleTimerEvent(), and initializeOverlay().

uint32_t Gia::stat_tokenMessages
protected

number of sent token messages

Definition at line 152 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendToken().

uint32_t Gia::stat_tokenMessagesBytesSent
protected

number of sent bytes of token messages

Definition at line 153 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendToken().

uint32_t Gia::stat_updateMessages
protected

number of sent update messages

Definition at line 150 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_UPDATE().

uint32_t Gia::stat_updateMessagesBytesSent
protected

number of sent bytes of update messages

Definition at line 151 of file Gia.h.

Referenced by finishOverlay(), initializeOverlay(), and sendMessage_UPDATE().

cMessage* Gia::timedoutMessages_timer
protected

timer for message timeout

Definition at line 168 of file Gia.h.

Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Gia().

cMessage* Gia::timedoutNeighbors_timer
protected

timer for neighbors timeout

Definition at line 169 of file Gia.h.

Referenced by changeState(), handleTimerEvent(), initializeOverlay(), and ~Gia().

GiaTokenFactory* Gia::tokenFactory
protected

pointer to TokenFactory

Definition at line 176 of file Gia.h.

Referenced by changeState(), forwardMessage(), handleTimerEvent(), initializeOverlay(), and processSearchMessage().

uint32_t Gia::tokenWaitTime
protected

delay to send a new token

Definition at line 122 of file Gia.h.

Referenced by forwardMessage(), and initializeOverlay().

uint32_t Gia::topAdaptionAggressiveness
protected

the topology adaption aggressiveness

Definition at line 115 of file Gia.h.

Referenced by handleTimerEvent(), and initializeOverlay().

cMessage* Gia::update_timer
protected

timer for update self-message

Definition at line 167 of file Gia.h.

Referenced by addNeighbor(), initializeOverlay(), removeNeighbor(), and ~Gia().

double Gia::updateDelay
protected

time between to update messages (in ms)

Definition at line 117 of file Gia.h.

Referenced by addNeighbor(), initializeOverlay(), and removeNeighbor().


The documentation for this class was generated from the following files: