68 neighborCache->par(
"treeMgmtChildrenTimeOut").doubleValue();
115 cPolymorphic* context,
116 int rpcId, simtime_t rtt)
140 cPolymorphic* context,
int rpcId,
149 EV <<
"[TreeManagement::handleRpcTimeout() @ "
152 <<
" Child timout: " << dest.
getIp()
161 EV <<
"[TreeManagement::handleRpcTimeout() @ "
164 <<
" Parent timout, domainKey = " << destKey
166 std::cout <<
"[TreeManagement::handleRpcTimeout() @ "
169 <<
" Parent timout, domainKey = " << destKey
180 EV <<
"[TreeManagement::handleRpcTimeout() @ "
183 <<
" Peer in tree timout: " << dest.
getIp()
184 <<
" (" << destKey <<
")"
189 EV <<
"[TreeManagement::handleRpcTimeout() @ "
192 <<
" TreeAppCall (sent directly to parent "
193 << dest <<
") timed out, retry sending message to key " <<
treeDomainKey
205 <<
" timed out to " << dest.
getIp()
206 <<
" (" << destKey <<
")"
242 EV <<
"|DD|> TreeManagement::connectToParent (=== PARENTCHECK for Node "
246 EV <<
"|DD|> TreeManagement::connectToParent (Parent is not Valid) <||"
262 EV <<
"|DD|> TreeManagement::removeParentConnection (RELEASE Connection From "
275 simtime_t timeout = -1;
295 treeNodeMap::const_iterator nodeIterator =
treeChildNodes.begin();
300 nodeIterator->second.node,
313 cPolymorphic* context,
314 int rpcId, simtime_t rtt)
337 EV <<
"|DD|> TreeManagement::checkParentValid (Not Valid: Unspecified) <||" << endl;
345 EV <<
"[TreeManagement::checkParentValid() @ "
348 <<
" I'm still ROOT!"
353 EV <<
"[TreeManagement::checkParentValid() @ "
356 <<
" I'm NOT longer ROOT!"
367 if(isSiblingReturn && !err) {
370 if(!isSiblingReturn && !err) {
428 simtime_t timeout = -1;
486 EV <<
"|DD|> TreeManagement::handleParentRequestRpcCall (ADDCHILDNODE!!! "
512 cPolymorphic* context,
int rpcId, simtime_t rtt)
514 EV <<
"|DD|> TreeManagement::handleParentRequestRpcResponse ("
531 "m=m,50,0,50,0;ls=blue,1");
534 for (msgClientMap::iterator it =
msgClients.begin();
536 it->second->newParent();
551 entry.
node = childNode;
556 for (msgClientMap::iterator it =
msgClients.begin();
558 it->second->newChild(childNode);
567 std::stringstream shortChildMapString;
569 shortChildMapString <<
"CL ";
573 treeNodeMap::const_iterator nodeMapIterator =
treeChildNodes.begin();
576 EV <<
" - " << (*nodeMapIterator).first << endl;
577 shortChildMapString << (*nodeMapIterator).first.getIp() <<
" | ";
583 EV <<
"=====================" << endl;
598 int maxIteration =
overlay->par(
"keyLength");
600 while(it < maxIteration) {
603 testKey = (leftBorder>>1) + (rightBorder>>1);
605 EV <<
"|DD|> TreeManagement::getResponsibleDomain (Checking: "
606 << testKey <<
") <||" << endl;
610 EV <<
"|DD|> TreeManagement::getResponsibleDomainKey ("
616 EV <<
"|DD|> TreeManagement::getResponsibleDomain (ERROR WHILE CALLING isSiblingFor) <||" << endl;
620 rightBorder = testKey;
621 }
else if (node.
getKey().
isBetween((rightBorder+leftBorder)>>1,rightBorder)) {
624 EV <<
"|DD|> TreeManagement::getResponsibleDomain (KEY IS THE BORDER!) <||" << endl;
664 simtime_t timeout = -1;
671 treeNodeMap::const_iterator nodeMapIterator =
treeChildNodes.begin();
681 (*nodeMapIterator).second.node,
684 timeout, 0, -1,
this);
731 std::stringstream statName;
742 statName <<
"TreeManagement Level " << i <<
" numTMSent/Node/s";
746 statName <<
"TreeManagement Level " << i <<
" numTMReceived/Node/s";
750 statName <<
"TreeManagement Level " << i <<
" numTMTotal/Node/s";
755 statName <<
"TreeManagement Level " << i <<
" bytesTMSent/Node/s";
759 statName <<
"TreeManagement Level " << i <<
" bytesTMReceived/Node/s";
763 statName <<
"TreeManagement Level " << i <<
" bytesTMTotal/Node/s";