PageRenderTime 62ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 2ms

/OverSim-20101103/doc/doxy/PubSubMMOG_8cc_source.html

https://bitbucket.org/indigopony/omnetproject
HTML | 2061 lines | 2060 code | 0 blank | 1 comment | 0 complexity | 37d74eda56cfedf3878a62fd4ea6a0ad MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, GPL-2.0, Apache-2.0, JSON

Large files files are truncated, but you can click here to view the full file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <title>OverSim: PubSubMMOG.cc Source File</title>
  6. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  7. <link href="doxygen.css" rel="stylesheet" type="text/css"/>
  8. </head>
  9. <body>
  10. <!-- Generated by Doxygen 1.7.1 -->
  11. <div class="navigation" id="top">
  12. <div class="tabs">
  13. <ul class="tablist">
  14. <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
  15. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  16. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  17. <li><a href="annotated.html"><span>Classes</span></a></li>
  18. <li class="current"><a href="files.html"><span>Files</span></a></li>
  19. <li><a href="dirs.html"><span>Directories</span></a></li>
  20. </ul>
  21. </div>
  22. <div class="tabs2">
  23. <ul class="tablist">
  24. <li><a href="files.html"><span>File&nbsp;List</span></a></li>
  25. <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
  26. </ul>
  27. </div>
  28. <div class="navpath">
  29. <ul>
  30. <li><a class="el" href="dir_668dee661430860db5868c2621a9c372.html">src</a> </li>
  31. <li><a class="el" href="dir_6302e9405fe106175d386473fd676d2e.html">overlay</a> </li>
  32. <li><a class="el" href="dir_1ea0fb66e628dfd4ff0dfe2ccf5e5335.html">pubsubmmog</a> </li>
  33. </ul>
  34. </div>
  35. </div>
  36. <div class="header">
  37. <div class="headertitle">
  38. <h1>PubSubMMOG.cc</h1> </div>
  39. </div>
  40. <div class="contents">
  41. <a href="PubSubMMOG_8cc.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
  42. <a name="l00002"></a>00002 <span class="comment">// Copyright (C) 2006 Institut fuer Telematik, Universitaet Karlsruhe (TH)</span>
  43. <a name="l00003"></a>00003 <span class="comment">//</span>
  44. <a name="l00004"></a>00004 <span class="comment">// This program is free software; you can redistribute it and/or</span>
  45. <a name="l00005"></a>00005 <span class="comment">// modify it under the terms of the GNU General Public License</span>
  46. <a name="l00006"></a>00006 <span class="comment">// as published by the Free Software Foundation; either version 2</span>
  47. <a name="l00007"></a>00007 <span class="comment">// of the License, or (at your option) any later version.</span>
  48. <a name="l00008"></a>00008 <span class="comment">//</span>
  49. <a name="l00009"></a>00009 <span class="comment">// This program is distributed in the hope that it will be useful,</span>
  50. <a name="l00010"></a>00010 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
  51. <a name="l00011"></a>00011 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
  52. <a name="l00012"></a>00012 <span class="comment">// GNU General Public License for more details.</span>
  53. <a name="l00013"></a>00013 <span class="comment">//</span>
  54. <a name="l00014"></a>00014 <span class="comment">// You should have received a copy of the GNU General Public License</span>
  55. <a name="l00015"></a>00015 <span class="comment">// along with this program; if not, write to the Free Software</span>
  56. <a name="l00016"></a>00016 <span class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span>
  57. <a name="l00017"></a>00017 <span class="comment">//</span>
  58. <a name="l00018"></a>00018
  59. <a name="l00024"></a>00024 <span class="preprocessor">#include &lt;NotifierConsts.h&gt;</span>
  60. <a name="l00025"></a>00025
  61. <a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="PubSubMMOG_8h.html">PubSubMMOG.h</a>&quot;</span>
  62. <a name="l00027"></a>00027
  63. <a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="GlobalNodeListAccess_8h.html">GlobalNodeListAccess.h</a>&quot;</span>
  64. <a name="l00029"></a>00029 <span class="preprocessor">#include &lt;<a class="code" href="GlobalStatistics_8h.html">GlobalStatistics.h</a>&gt;</span>
  65. <a name="l00030"></a>00030 <span class="preprocessor">#include &lt;<a class="code" href="BootstrapList_8h.html">BootstrapList.h</a>&gt;</span>
  66. <a name="l00031"></a>00031
  67. <a name="l00032"></a>00032 <a class="code" href="ALMTest_8cc.html#a3b5014f410c7989e8bad4b467ecc94cd">Define_Module</a>(<a class="code" href="classPubSubMMOG.html">PubSubMMOG</a>);
  68. <a name="l00033"></a>00033
  69. <a name="l00034"></a>00034 <span class="keyword">using namespace </span>std;
  70. <a name="l00035"></a>00035
  71. <a name="l00036"></a><a class="code" href="classPubSubMMOG.html#a42a189f235425d0cc5706857f3122283">00036</a> <span class="keywordtype">void</span> <a class="code" href="classPubSubMMOG.html#a42a189f235425d0cc5706857f3122283" title="Initializes derived-class-attributes.">PubSubMMOG::initializeOverlay</a>(<span class="keywordtype">int</span> stage)
  72. <a name="l00037"></a>00037 {
  73. <a name="l00038"></a>00038 <span class="comment">// because of IPAddressResolver, we need to wait until interfaces are registered,</span>
  74. <a name="l00039"></a>00039 <span class="comment">// address auto-assignment takes place etc.</span>
  75. <a name="l00040"></a>00040 <span class="keywordflow">if</span>(stage != <a class="code" href="InitStages_8h.html#a42fde1aa1e14a1c45d29061d6e87e532a58e83c497c7c8495e9c592ff3148b6b9" title="first stage for overlay modules (Tier 0 / KBR)">MIN_STAGE_OVERLAY</a>) <span class="keywordflow">return</span>;
  76. <a name="l00041"></a>00041
  77. <a name="l00042"></a>00042 <a class="code" href="classBaseOverlay.html#ab4be6d88417117fbf33a445d56af2655">state</a> = INIT;
  78. <a name="l00043"></a>00043 <a class="code" href="classPubSubMMOG.html#a3e573d9ce39091daea435016a587b239">setBootstrapedIcon</a>();
  79. <a name="l00044"></a>00044 <span class="comment">// TODO: use BootstrapList instead (but this currently preferes</span>
  80. <a name="l00045"></a>00045 <span class="comment">// nodes from the same partition)</span>
  81. <a name="l00046"></a>00046 <a class="code" href="classPubSubMMOG.html#a1e1ba5fd3c791f3aa2172e6b055f68bb">lobbyServer</a> = <a class="code" href="classBaseOverlay.html#a933e505ea77cae4ab0c8edcb77ade2c7" title="pointer to GlobalNodeList in this node">globalNodeList</a>-&gt;<a class="code" href="classGlobalNodeList.html#a1f0290942c0a6d89ad7e39d75ff6355b" title="Returns a random NodeHandle.">getBootstrapNode</a>();
  82. <a name="l00047"></a>00047
  83. <a name="l00048"></a>00048 <a class="code" href="classPubSubMMOG.html#a04199b677abdfd25b29f9a5f79c19426">joinTimer</a> = <span class="keyword">new</span> cMessage(<span class="stringliteral">&quot;join timer&quot;</span>);
  84. <a name="l00049"></a>00049 simtime_t joinTime = ceil(simTime() + (simtime_t) par(<span class="stringliteral">&quot;joinDelay&quot;</span>));
  85. <a name="l00050"></a>00050 scheduleAt( joinTime, <a class="code" href="classPubSubMMOG.html#a04199b677abdfd25b29f9a5f79c19426">joinTimer</a> );
  86. <a name="l00051"></a>00051
  87. <a name="l00052"></a>00052 <a class="code" href="classPubSubMMOG.html#a228fe6f61d1fe510d1336296c4bf254c">movementRate</a> = par(<span class="stringliteral">&quot;movementRate&quot;</span>);
  88. <a name="l00053"></a>00053 <a class="code" href="classPubSubMMOG.html#a5c7d73c47298f65748e65abc506b9611">eventDeliveryTimer</a> = <span class="keyword">new</span> <a class="code" href="classPubSubTimer.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubTimer</a>(<span class="stringliteral">&quot;event delivery timer&quot;</span>);
  89. <a name="l00054"></a>00054 <a class="code" href="classPubSubMMOG.html#a5c7d73c47298f65748e65abc506b9611">eventDeliveryTimer</a>-&gt;<a class="code" href="classPubSubTimer.html#a09825991200a1fa76d4cfc9549ac51f5">setType</a>( <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04cab87b77accd020036a875063be27c753c">PUBSUB_EVENTDELIVERY</a> );
  90. <a name="l00055"></a>00055 scheduleAt( joinTime + 1.0/(2*<a class="code" href="classPubSubMMOG.html#a228fe6f61d1fe510d1336296c4bf254c">movementRate</a>), <a class="code" href="classPubSubMMOG.html#a5c7d73c47298f65748e65abc506b9611">eventDeliveryTimer</a> );
  91. <a name="l00056"></a>00056
  92. <a name="l00057"></a>00057 <a class="code" href="classPubSubMMOG.html#a4051d53d8d09521b830246ca19b0004b">numSubspaces</a> = par(<span class="stringliteral">&quot;numSubspaces&quot;</span>);
  93. <a name="l00058"></a>00058 <a class="code" href="classPubSubMMOG.html#a45ee110f2b164e1902266585eaa1fb2c">subspaceSize</a> = (int) ( (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) par(<span class="stringliteral">&quot;areaDimension&quot;</span>) / <a class="code" href="classPubSubMMOG.html#a4051d53d8d09521b830246ca19b0004b">numSubspaces</a>);
  94. <a name="l00059"></a>00059 <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#af3992f1fda9ea42dc10bf4739e47700a" title="saves given key to NodeHandle::key">setKey</a>( <a class="code" href="classOverlayKey.html#a1983e1b47e32783f8ccd5e59fe725290" title="Returns a random key.">OverlayKey::random</a>() );
  95. <a name="l00060"></a>00060
  96. <a name="l00061"></a>00061 <a class="code" href="classPubSubMMOG.html#a7d310afbff3e729b6a33f8e6614de07e">maxChildren</a> = par(<span class="stringliteral">&quot;maxChildren&quot;</span>);
  97. <a name="l00062"></a>00062 <a class="code" href="classPubSubSubspaceResponsible.html#a5dfd7f5d997726d5c8f158a371cee621">PubSubSubspaceResponsible::maxChildren</a> = <a class="code" href="classPubSubMMOG.html#a7d310afbff3e729b6a33f8e6614de07e">maxChildren</a>;
  98. <a name="l00063"></a>00063
  99. <a name="l00064"></a>00064 <a class="code" href="classPubSubMMOG.html#ae02428124f2ac8a32da65ce4bcc7a927">AOIWidth</a> = par(<span class="stringliteral">&quot;AOIWidth&quot;</span>);
  100. <a name="l00065"></a>00065 <a class="code" href="classPubSubMMOG.html#a219753e4fc3eae95cd21f70bc40017e7">maxMoveDelay</a> = par(<span class="stringliteral">&quot;maxMoveDelay&quot;</span>);
  101. <a name="l00066"></a>00066
  102. <a name="l00067"></a>00067 <a class="code" href="classPubSubMMOG.html#a98fd6baf72474a184c902133581273fa">parentTimeout</a> = par(<span class="stringliteral">&quot;parentTimeout&quot;</span>);
  103. <a name="l00068"></a>00068 <a class="code" href="classPubSubMMOG.html#aebf88e5c0a0f294c706c3281b1aae373">heartbeatTimer</a> = <span class="keyword">new</span> <a class="code" href="classPubSubTimer.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubTimer</a>(<span class="stringliteral">&quot;HeartbeatTimer&quot;</span>);
  104. <a name="l00069"></a>00069 <a class="code" href="classPubSubMMOG.html#aebf88e5c0a0f294c706c3281b1aae373">heartbeatTimer</a>-&gt;<a class="code" href="classPubSubTimer.html#a09825991200a1fa76d4cfc9549ac51f5">setType</a>( <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caec28dc4bd962108ceb27575f46b81ebd">PUBSUB_HEARTBEAT</a> );
  105. <a name="l00070"></a>00070 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( <a class="code" href="classPubSubMMOG.html#aebf88e5c0a0f294c706c3281b1aae373">heartbeatTimer</a> );
  106. <a name="l00071"></a>00071 <a class="code" href="classPubSubMMOG.html#a2540cd40427d53404d3adbca173cfd6c">childPingTimer</a> = <span class="keyword">new</span> <a class="code" href="classPubSubTimer.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubTimer</a>(<span class="stringliteral">&quot;ChildPingTimer&quot;</span>);
  107. <a name="l00072"></a>00072 <a class="code" href="classPubSubMMOG.html#a2540cd40427d53404d3adbca173cfd6c">childPingTimer</a>-&gt;<a class="code" href="classPubSubTimer.html#a09825991200a1fa76d4cfc9549ac51f5">setType</a>( <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caa64f2984ebaaa94fb52bc3ff99d24fa1">PUBSUB_CHILDPING</a> );
  108. <a name="l00073"></a>00073 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( <a class="code" href="classPubSubMMOG.html#a2540cd40427d53404d3adbca173cfd6c">childPingTimer</a> );
  109. <a name="l00074"></a>00074
  110. <a name="l00075"></a>00075 <a class="code" href="classPubSubMMOG.html#aced8c7945b0f77560359167cc5f398f6">allowOldMoveMessages</a> = par(<span class="stringliteral">&quot;allowOldMoveMessages&quot;</span>);
  111. <a name="l00076"></a>00076
  112. <a name="l00077"></a>00077 <a class="code" href="classPubSubMMOG.html#aa809123a9ef7f64ea622400ed60a2d4c">numEventsWrongTimeslot</a> = <a class="code" href="classPubSubMMOG.html#a0adb17b77190fd14c0979fe39a5889cc">numEventsCorrectTimeslot</a> = 0;
  113. <a name="l00078"></a>00078 <a class="code" href="classPubSubMMOG.html#aed031b28dd4fd6b2db5f68247ff742d7">numPubSubSignalingMessages</a> = 0;
  114. <a name="l00079"></a>00079 <a class="code" href="classPubSubMMOG.html#a16f1ec7076f68484acd789057428a3cc">pubSubSignalingMessagesSize</a> = 0;
  115. <a name="l00080"></a>00080 <a class="code" href="classPubSubMMOG.html#a11ca86e89977d8bb4d1512a5e64ce8d3">numMoveMessages</a> = 0;
  116. <a name="l00081"></a>00081 <a class="code" href="classPubSubMMOG.html#a122b6f4eacfc82a453cdabace026a0d5">moveMessagesSize</a> = 0;
  117. <a name="l00082"></a>00082 <a class="code" href="classPubSubMMOG.html#ae81f55efe5b21342597e408ff3474eee">numMoveListMessages</a> = 0;
  118. <a name="l00083"></a>00083 <a class="code" href="classPubSubMMOG.html#a5a665dd74681081d669ea57efd5d83b0">moveListMessagesSize</a> = 0;
  119. <a name="l00084"></a>00084 <a class="code" href="classPubSubMMOG.html#a4561eb4e380c7aea874ea622b9145603">respMoveListMessagesSize</a> = 0;
  120. <a name="l00085"></a>00085 <a class="code" href="classPubSubMMOG.html#a1450e36b5a7103fe4581f271fac13340">lostMovementLists</a> = 0;
  121. <a name="l00086"></a>00086 <a class="code" href="classPubSubMMOG.html#a8415fe6a47b3b961fd54f9e3b5f8d3f0">receivedMovementLists</a> = 0;
  122. <a name="l00087"></a>00087 WATCH( <a class="code" href="classPubSubMMOG.html#aed031b28dd4fd6b2db5f68247ff742d7">numPubSubSignalingMessages</a> );
  123. <a name="l00088"></a>00088 WATCH( <a class="code" href="classPubSubMMOG.html#a16f1ec7076f68484acd789057428a3cc">pubSubSignalingMessagesSize</a> );
  124. <a name="l00089"></a>00089 WATCH( <a class="code" href="classPubSubMMOG.html#a11ca86e89977d8bb4d1512a5e64ce8d3">numMoveMessages</a> );
  125. <a name="l00090"></a>00090 WATCH( <a class="code" href="classPubSubMMOG.html#a122b6f4eacfc82a453cdabace026a0d5">moveMessagesSize</a> );
  126. <a name="l00091"></a>00091 WATCH( <a class="code" href="classPubSubMMOG.html#ae81f55efe5b21342597e408ff3474eee">numMoveListMessages</a> );
  127. <a name="l00092"></a>00092 WATCH( <a class="code" href="classPubSubMMOG.html#a5a665dd74681081d669ea57efd5d83b0">moveListMessagesSize</a> );
  128. <a name="l00093"></a>00093 WATCH( <a class="code" href="classPubSubMMOG.html#aa809123a9ef7f64ea622400ed60a2d4c">numEventsWrongTimeslot</a> );
  129. <a name="l00094"></a>00094 WATCH( <a class="code" href="classPubSubMMOG.html#a0adb17b77190fd14c0979fe39a5889cc">numEventsCorrectTimeslot</a> );
  130. <a name="l00095"></a>00095 WATCH( <a class="code" href="classPubSubMMOG.html#a1450e36b5a7103fe4581f271fac13340">lostMovementLists</a> );
  131. <a name="l00096"></a>00096 WATCH( <a class="code" href="classPubSubMMOG.html#a8415fe6a47b3b961fd54f9e3b5f8d3f0">receivedMovementLists</a> );
  132. <a name="l00097"></a>00097 WATCH_LIST( <a class="code" href="classPubSubMMOG.html#a0535f1d205515626aaa20d25f8da3cda">subscribedSubspaces</a> );
  133. <a name="l00098"></a>00098 WATCH_MAP( <a class="code" href="classPubSubMMOG.html#a4b4d32adfbffbd585d8a174d47b24db9">responsibleSubspaces</a> );
  134. <a name="l00099"></a>00099 WATCH_MAP( <a class="code" href="classPubSubMMOG.html#a9cb86fc744b2f9b087a66e0af879f1fc">backupSubspaces</a> );
  135. <a name="l00100"></a>00100 WATCH_MAP( <a class="code" href="classPubSubMMOG.html#ac2ff9ed8d82f2fd97f69343cd8ee78ac">intermediateSubspaces</a> );
  136. <a name="l00101"></a>00101 }
  137. <a name="l00102"></a>00102
  138. <a name="l00103"></a><a class="code" href="classPubSubMMOG.html#a4f2a87f7e95bbb17819f04261585236d">00103</a> <span class="keywordtype">bool</span> <a class="code" href="classPubSubMMOG.html#a4f2a87f7e95bbb17819f04261585236d">PubSubMMOG::handleRpcCall</a>(<a class="code" href="classBaseCallMessage.html" title="Class generated from common/CommonMessages.msg by opp_msgc.">BaseCallMessage</a>* msg)
  139. <a name="l00104"></a>00104 {
  140. <a name="l00105"></a>00105 <span class="comment">// delegate messages</span>
  141. <a name="l00106"></a>00106 <a class="code" href="RpcMacros_8h.html#aa75b135e279b574267e1a7dc4ab79da4" title="Marks the beginning of a Remote-Procedure-Call Switch block.">RPC_SWITCH_START</a>( msg )
  142. <a name="l00107"></a>00107 <a class="code" href="RpcMacros_8h.html#ad81d44e9bc59d2fb2cfcacc4d5ecda35" title="Declares a RPC method delegation.">RPC_DELEGATE</a>( PubSubSubscription, <a class="code" href="classPubSubMMOG.html#a3d1fd761fc46a4b56f1c7e852bf41207">handleSubscriptionCall</a> );
  143. <a name="l00108"></a>00108 <a class="code" href="RpcMacros_8h.html#ad81d44e9bc59d2fb2cfcacc4d5ecda35" title="Declares a RPC method delegation.">RPC_DELEGATE</a>( PubSubTakeOverSubspace, <a class="code" href="classPubSubMMOG.html#af504bf4e0b52404912395baefed9f5c5">handleTakeOver</a> );
  144. <a name="l00109"></a>00109 <a class="code" href="RpcMacros_8h.html#ad81d44e9bc59d2fb2cfcacc4d5ecda35" title="Declares a RPC method delegation.">RPC_DELEGATE</a>( PubSubBackup, <a class="code" href="classPubSubMMOG.html#ac7e55bce3aa2a48f4367977e081eb9e1">handleBackupCall</a> );
  145. <a name="l00110"></a>00110 <a class="code" href="RpcMacros_8h.html#ad81d44e9bc59d2fb2cfcacc4d5ecda35" title="Declares a RPC method delegation.">RPC_DELEGATE</a>( PubSubIntermediate, <a class="code" href="classPubSubMMOG.html#a77d17c923e8b43f0bf38222dd58d3969">handleIntermediateCall</a> );
  146. <a name="l00111"></a>00111 <a class="code" href="RpcMacros_8h.html#ad81d44e9bc59d2fb2cfcacc4d5ecda35" title="Declares a RPC method delegation.">RPC_DELEGATE</a>( PubSubAdoptChild, <a class="code" href="classPubSubMMOG.html#a301bb30f1b9239fa5ea744400be48a1b">handleAdoptChildCall</a> );
  147. <a name="l00112"></a>00112 <a class="code" href="RpcMacros_8h.html#ad81d44e9bc59d2fb2cfcacc4d5ecda35" title="Declares a RPC method delegation.">RPC_DELEGATE</a>( PubSubPing, <a class="code" href="classPubSubMMOG.html#a7179d8d2355f09e50e5172a8bc4e60b1">handlePingCall</a> );
  148. <a name="l00113"></a>00113 <a class="code" href="RpcMacros_8h.html#a29a8a3f21e67ecb25f58608a54df5191" title="Marks the end of a Remote-Procedure-Call Switch block.">RPC_SWITCH_END</a>( )
  149. <a name="l00114"></a>00114
  150. <a name="l00115"></a>00115 <span class="keywordflow">return</span> RPC_HANDLED;
  151. <a name="l00116"></a>00116
  152. <a name="l00117"></a>00117 }
  153. <a name="l00118"></a>00118
  154. <a name="l00119"></a><a class="code" href="classPubSubMMOG.html#a8cd2dcabf97fae56f6af40cda177fdf7">00119</a> <span class="keywordtype">void</span> <a class="code" href="classPubSubMMOG.html#a8cd2dcabf97fae56f6af40cda177fdf7">PubSubMMOG::handleRpcResponse</a>(<a class="code" href="classBaseResponseMessage.html" title="Class generated from common/CommonMessages.msg by opp_msgc.">BaseResponseMessage</a> *msg,
  155. <a name="l00120"></a>00120 cPolymorphic* context, <span class="keywordtype">int</span> rpcId,
  156. <a name="l00121"></a>00121 simtime_t rtt)
  157. <a name="l00122"></a>00122 {
  158. <a name="l00123"></a>00123 <a class="code" href="RpcMacros_8h.html#aa75b135e279b574267e1a7dc4ab79da4" title="Marks the beginning of a Remote-Procedure-Call Switch block.">RPC_SWITCH_START</a>(msg);
  159. <a name="l00124"></a>00124 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubJoin ) {
  160. <a name="l00125"></a>00125 <a class="code" href="classPubSubMMOG.html#a90f7b9fa68b400b80892d642f4c439b4">handleJoinResponse</a>( _PubSubJoinResponse );
  161. <a name="l00126"></a>00126 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  162. <a name="l00127"></a>00127 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  163. <a name="l00128"></a>00128 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubJoin RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  164. <a name="l00129"></a>00129 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubJoinResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  165. <a name="l00130"></a>00130 &lt;&lt; endl;
  166. <a name="l00131"></a>00131 <span class="keywordflow">break</span>;
  167. <a name="l00132"></a>00132 }
  168. <a name="l00133"></a>00133 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubSubscription ) {
  169. <a name="l00134"></a>00134 <a class="code" href="classPubSubMMOG.html#a7d6b63042aee9dfbe3d11d2062a43a05">handleSubscriptionResponse</a>( _PubSubSubscriptionResponse );
  170. <a name="l00135"></a>00135 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  171. <a name="l00136"></a>00136 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  172. <a name="l00137"></a>00137 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubSubscription RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  173. <a name="l00138"></a>00138 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubSubscriptionResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  174. <a name="l00139"></a>00139 &lt;&lt; endl;
  175. <a name="l00140"></a>00140 <span class="keywordflow">break</span>;
  176. <a name="l00141"></a>00141 }
  177. <a name="l00142"></a>00142 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubResponsibleNode ) {
  178. <a name="l00143"></a>00143 <a class="code" href="classPubSubMMOG.html#a7e351287bef39afa54408e4fce0fdf26">handleResponsibleNodeResponse</a>( _PubSubResponsibleNodeResponse );
  179. <a name="l00144"></a>00144 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  180. <a name="l00145"></a>00145 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  181. <a name="l00146"></a>00146 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubResponsibleNode RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  182. <a name="l00147"></a>00147 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubResponsibleNodeResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  183. <a name="l00148"></a>00148 &lt;&lt; endl;
  184. <a name="l00149"></a>00149 <span class="keywordflow">break</span>;
  185. <a name="l00150"></a>00150 }
  186. <a name="l00151"></a>00151 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubHelp ) {
  187. <a name="l00152"></a>00152 <a class="code" href="classPubSubMMOG.html#a7d28b4484518dcf34fbc2cb462bf620b">handleHelpResponse</a>( _PubSubHelpResponse );
  188. <a name="l00153"></a>00153 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  189. <a name="l00154"></a>00154 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  190. <a name="l00155"></a>00155 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubHelp RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  191. <a name="l00156"></a>00156 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubHelpResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  192. <a name="l00157"></a>00157 &lt;&lt; endl;
  193. <a name="l00158"></a>00158 <span class="keywordflow">break</span>;
  194. <a name="l00159"></a>00159 }
  195. <a name="l00160"></a>00160 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubBackup ) {
  196. <a name="l00161"></a>00161 <a class="code" href="classPubSubMMOG.html#a401659ffbdca793a6f7d97e9737a70d0">handleBackupResponse</a>( _PubSubBackupResponse );
  197. <a name="l00162"></a>00162 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  198. <a name="l00163"></a>00163 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  199. <a name="l00164"></a>00164 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubBackup RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  200. <a name="l00165"></a>00165 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubBackupResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  201. <a name="l00166"></a>00166 &lt;&lt; endl;
  202. <a name="l00167"></a>00167 <span class="keywordflow">break</span>;
  203. <a name="l00168"></a>00168 }
  204. <a name="l00169"></a>00169 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubIntermediate ) {
  205. <a name="l00170"></a>00170 <a class="code" href="classPubSubMMOG.html#ac41702ca41ffae439637504939856f4f">handleIntermediateResponse</a>( _PubSubIntermediateResponse );
  206. <a name="l00171"></a>00171 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  207. <a name="l00172"></a>00172 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  208. <a name="l00173"></a>00173 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubIntermediate RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  209. <a name="l00174"></a>00174 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubIntermediateResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  210. <a name="l00175"></a>00175 &lt;&lt; endl;
  211. <a name="l00176"></a>00176 <span class="keywordflow">break</span>;
  212. <a name="l00177"></a>00177 }
  213. <a name="l00178"></a>00178 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubAdoptChild ) {
  214. <a name="l00179"></a>00179 <a class="code" href="classPubSubMMOG.html#a9f396c585cfb16b476047c35fbbe05fa">handleAdoptChildResponse</a>( _PubSubAdoptChildResponse );
  215. <a name="l00180"></a>00180 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  216. <a name="l00181"></a>00181 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  217. <a name="l00182"></a>00182 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubAdoptChild RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  218. <a name="l00183"></a>00183 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubAdoptChildResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  219. <a name="l00184"></a>00184 &lt;&lt; endl;
  220. <a name="l00185"></a>00185 <span class="keywordflow">break</span>;
  221. <a name="l00186"></a>00186 }
  222. <a name="l00187"></a>00187 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubPing ) {
  223. <a name="l00188"></a>00188 <a class="code" href="classPubSubMMOG.html#a6ade874ae0f4871c157cbf3e4334724c">handlePingResponse</a>( _PubSubPingResponse );
  224. <a name="l00189"></a>00189 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcResponse() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  225. <a name="l00190"></a>00190 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  226. <a name="l00191"></a>00191 &lt;&lt; <span class="stringliteral">&quot; Received a PubSubPing RPC Response: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  227. <a name="l00192"></a>00192 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubPingResponse &lt;&lt; <span class="stringliteral">&quot; rtt=&quot;</span> &lt;&lt; rtt
  228. <a name="l00193"></a>00193 &lt;&lt; endl;
  229. <a name="l00194"></a>00194 <span class="keywordflow">break</span>;
  230. <a name="l00195"></a>00195 }
  231. <a name="l00196"></a>00196 <a class="code" href="RpcMacros_8h.html#a29a8a3f21e67ecb25f58608a54df5191" title="Marks the end of a Remote-Procedure-Call Switch block.">RPC_SWITCH_END</a>( );
  232. <a name="l00197"></a>00197 }
  233. <a name="l00198"></a>00198
  234. <a name="l00199"></a><a class="code" href="classPubSubMMOG.html#a9838eb23acd2464c8500cdff66caf8a8">00199</a> <span class="keywordtype">void</span> <a class="code" href="classPubSubMMOG.html#a9838eb23acd2464c8500cdff66caf8a8">PubSubMMOG::handleRpcTimeout</a> (<a class="code" href="classBaseCallMessage.html" title="Class generated from common/CommonMessages.msg by opp_msgc.">BaseCallMessage</a> *msg,
  235. <a name="l00200"></a>00200 <span class="keyword">const</span> <a class="code" href="classTransportAddress.html" title="This class implements a common transport address.">TransportAddress</a> &amp;dest,
  236. <a name="l00201"></a>00201 cPolymorphic* context, <span class="keywordtype">int</span> rpcId,
  237. <a name="l00202"></a>00202 <span class="keyword">const</span> <a class="code" href="classOverlayKey.html" title="A common overlay key class.">OverlayKey</a> &amp;destKey)
  238. <a name="l00203"></a>00203 {
  239. <a name="l00204"></a>00204 <a class="code" href="RpcMacros_8h.html#aa75b135e279b574267e1a7dc4ab79da4" title="Marks the beginning of a Remote-Procedure-Call Switch block.">RPC_SWITCH_START</a>(msg)
  240. <a name="l00205"></a>00205 <a class="code" href="RpcMacros_8h.html#ae07fad586ce7b9e82ad12848767a32e5">RPC_ON_CALL</a>( PubSubBackup ) {
  241. <a name="l00206"></a>00206 <a class="code" href="classPubSubMMOG.html#a217e815ddc5ba02f8afe33a73389184f">handleBackupCallTimeout</a>( _PubSubBackupCall, dest );
  242. <a name="l00207"></a>00207 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcTimeout() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  243. <a name="l00208"></a>00208 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  244. <a name="l00209"></a>00209 &lt;&lt; <span class="stringliteral">&quot; Backup RPC Call timed out: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  245. <a name="l00210"></a>00210 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubBackupCall
  246. <a name="l00211"></a>00211 &lt;&lt; <span class="stringliteral">&quot; oldNode=&quot;</span> &lt;&lt; dest
  247. <a name="l00212"></a>00212 &lt;&lt; endl;
  248. <a name="l00213"></a>00213 <span class="keywordflow">break</span>;
  249. <a name="l00214"></a>00214 }
  250. <a name="l00215"></a>00215 <a class="code" href="RpcMacros_8h.html#ae07fad586ce7b9e82ad12848767a32e5">RPC_ON_CALL</a>( PubSubPing ) {
  251. <a name="l00216"></a>00216 <a class="code" href="classPubSubMMOG.html#a0ca3bd97cac131ba5c2ff02235cc6a2f">handlePingCallTimeout</a>( _PubSubPingCall, dest );
  252. <a name="l00217"></a>00217 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcTimeout() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  253. <a name="l00218"></a>00218 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  254. <a name="l00219"></a>00219 &lt;&lt; <span class="stringliteral">&quot; Ping RPC Call timed out: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  255. <a name="l00220"></a>00220 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubPingCall
  256. <a name="l00221"></a>00221 &lt;&lt; <span class="stringliteral">&quot; oldNode=&quot;</span> &lt;&lt; dest
  257. <a name="l00222"></a>00222 &lt;&lt; endl;
  258. <a name="l00223"></a>00223 <span class="keywordflow">break</span>;
  259. <a name="l00224"></a>00224 }
  260. <a name="l00225"></a>00225 <a class="code" href="RpcMacros_8h.html#ae07fad586ce7b9e82ad12848767a32e5">RPC_ON_CALL</a>( PubSubSubscription ) {
  261. <a name="l00226"></a>00226 <a class="code" href="classPubSubMMOG.html#a1e97ea82ff0848af1f5437b1c8da7c99">handleSubscriptionCallTimeout</a>( _PubSubSubscriptionCall, dest );
  262. <a name="l00227"></a>00227 EV &lt;&lt; <span class="stringliteral">&quot;[PubSubMMOG::handleRpcTimeout() @ &quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classTransportAddress.html#a00e613d98d3412e2b92897c25aa0eb4c" title="returns ip address">getIp</a>()
  263. <a name="l00228"></a>00228 &lt;&lt; <span class="stringliteral">&quot; (&quot;</span> &lt;&lt; <a class="code" href="classBaseRpc.html#a88eb68c06450fd12ea072f471bf1c1b8" title="NodeHandle to this node.">thisNode</a>.<a class="code" href="classNodeHandle.html#aef531103cdf07c8353267f4d30a80112" title="returns key of this NodeHandle">getKey</a>().<a class="code" href="classOverlayKey.html#aabeb4fd284a630a82e982ba34ece4fd9" title="Returns a string representation of this key.">toString</a>(16) &lt;&lt; <span class="stringliteral">&quot;)]\n&quot;</span>
  264. <a name="l00229"></a>00229 &lt;&lt; <span class="stringliteral">&quot; Subscription RPC Call timed out: id=&quot;</span> &lt;&lt; rpcId &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>
  265. <a name="l00230"></a>00230 &lt;&lt; <span class="stringliteral">&quot; msg=&quot;</span> &lt;&lt; *_PubSubSubscriptionCall
  266. <a name="l00231"></a>00231 &lt;&lt; <span class="stringliteral">&quot; oldNode=&quot;</span> &lt;&lt; dest
  267. <a name="l00232"></a>00232 &lt;&lt; endl;
  268. <a name="l00233"></a>00233 <span class="keywordflow">break</span>;
  269. <a name="l00234"></a>00234 }
  270. <a name="l00235"></a>00235 <a class="code" href="RpcMacros_8h.html#a29a8a3f21e67ecb25f58608a54df5191" title="Marks the end of a Remote-Procedure-Call Switch block.">RPC_SWITCH_END</a>( )
  271. <a name="l00236"></a>00236
  272. <a name="l00237"></a>00237 <span class="comment">// FIXME:</span>
  273. <a name="l00238"></a>00238 <span class="comment">// AdoptCall missing!</span>
  274. <a name="l00239"></a>00239 <span class="comment">// IntermediateCall missing!</span>
  275. <a name="l00240"></a>00240 <span class="comment">// (ResponsibleNodeCall missing)</span>
  276. <a name="l00241"></a>00241 <span class="comment">// (HelpCall missing)</span>
  277. <a name="l00242"></a>00242 }
  278. <a name="l00243"></a>00243
  279. <a name="l00244"></a><a class="code" href="classPubSubMMOG.html#a4af2596c5cc972a1c4dacfde82c989ee">00244</a> <span class="keywordtype">void</span> <a class="code" href="classPubSubMMOG.html#a4af2596c5cc972a1c4dacfde82c989ee" title="Processes messages from underlay.">PubSubMMOG::handleUDPMessage</a>(<a class="code" href="classBaseOverlayMessage.html" title="Class generated from common/CommonMessages.msg by opp_msgc.">BaseOverlayMessage</a>* msg)
  280. <a name="l00245"></a>00245 {
  281. <a name="l00246"></a>00246 <span class="keywordflow">if</span>( <a class="code" href="classPubSubMoveListMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubMoveListMessage</a>* moveMsg = dynamic_cast&lt;PubSubMoveListMessage*&gt;(msg) ){
  282. <a name="l00247"></a>00247 <a class="code" href="classPubSubMMOG.html#a9d46909d81ca32d3ec2020a7184c3f50">handleMoveListMessage</a>( moveMsg );
  283. <a name="l00248"></a>00248 <span class="keyword">delete</span> moveMsg;
  284. <a name="l00249"></a>00249 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubMoveMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubMoveMessage</a>* moveMsg = dynamic_cast&lt;PubSubMoveMessage*&gt;(msg) ){
  285. <a name="l00250"></a>00250 <a class="code" href="classPubSubMMOG.html#aa5f5b3bb6f7a4a26ab45dfdb6248f21b">handleMoveMessage</a>( moveMsg );
  286. <a name="l00251"></a>00251 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubUnsubscriptionMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubUnsubscriptionMessage</a>* unsMsg = dynamic_cast&lt;PubSubUnsubscriptionMessage*&gt;(msg) ){
  287. <a name="l00252"></a>00252 <a class="code" href="classPubSubMMOG.html#a1e837eb023ac96a24c564e8c42da7c87">handleUnsubscriptionMessage</a>( unsMsg );
  288. <a name="l00253"></a>00253 <span class="keyword">delete</span> unsMsg;
  289. <a name="l00254"></a>00254 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubNodeLeftMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubNodeLeftMessage</a>* leftMsg = dynamic_cast&lt;PubSubNodeLeftMessage*&gt;(msg) ){
  290. <a name="l00255"></a>00255 <a class="code" href="classPubSubMMOG.html#a73afcba7483897f08cfb5d258e569683">handleNodeLeftMessage</a>( leftMsg );
  291. <a name="l00256"></a>00256 <span class="keyword">delete</span> leftMsg;
  292. <a name="l00257"></a>00257 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubReplacementMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubReplacementMessage</a>* replaceMsg = dynamic_cast&lt;PubSubReplacementMessage*&gt;(msg) ){
  293. <a name="l00258"></a>00258 <a class="code" href="classPubSubMMOG.html#abd3f25e6c1521cc5d6959fc1929a2ac6">handleReplacementMessage</a>( replaceMsg );
  294. <a name="l00259"></a>00259 <span class="keyword">delete</span> replaceMsg;
  295. <a name="l00260"></a>00260 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubBackupSubscriptionMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubBackupSubscriptionMessage</a>* backupMsg = dynamic_cast&lt;PubSubBackupSubscriptionMessage*&gt;(msg) ){
  296. <a name="l00261"></a>00261 <a class="code" href="classPubSubMMOG.html#a354f1a0173cb3cc5a00bc7d16d17f73a">handleSubscriptionBackup</a>( backupMsg );
  297. <a name="l00262"></a>00262 <span class="keyword">delete</span> backupMsg;
  298. <a name="l00263"></a>00263 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubBackupUnsubscribeMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubBackupUnsubscribeMessage</a>* backupMsg = dynamic_cast&lt;PubSubBackupUnsubscribeMessage*&gt;(msg) ){
  299. <a name="l00264"></a>00264 <a class="code" href="classPubSubMMOG.html#a74e961ef109ba657e32f82519721eeaf">handleUnsubscribeBackup</a>( backupMsg );
  300. <a name="l00265"></a>00265 <span class="keyword">delete</span> backupMsg;
  301. <a name="l00266"></a>00266 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubBackupIntermediateMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubBackupIntermediateMessage</a>* backupMsg = dynamic_cast&lt;PubSubBackupIntermediateMessage*&gt;(msg) ){
  302. <a name="l00267"></a>00267 <a class="code" href="classPubSubMMOG.html#a77b144f6034216ef0184589cf5b4da8d">handleIntermediateBackup</a>( backupMsg );
  303. <a name="l00268"></a>00268 <span class="keyword">delete</span> backupMsg;
  304. <a name="l00269"></a>00269 } <span class="keywordflow">else</span> <span class="keywordflow">if</span>( <a class="code" href="classPubSubReleaseIntermediateMessage.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubReleaseIntermediateMessage</a>* releaseMsg = dynamic_cast&lt;PubSubReleaseIntermediateMessage*&gt;(msg) ){
  305. <a name="l00270"></a>00270 <a class="code" href="classPubSubMMOG.html#af1197b5fab38765c9e510cb6e755f62a">handleReleaseIntermediate</a>( releaseMsg );
  306. <a name="l00271"></a>00271 <span class="keyword">delete</span> releaseMsg;
  307. <a name="l00272"></a>00272 }
  308. <a name="l00273"></a>00273 }
  309. <a name="l00274"></a>00274
  310. <a name="l00275"></a><a class="code" href="classPubSubMMOG.html#a3df1116194918ab1768c1afbdef4fb00">00275</a> <span class="keywordtype">void</span> <a class="code" href="classPubSubMMOG.html#a3df1116194918ab1768c1afbdef4fb00">PubSubMMOG::handleTimerEvent</a>(cMessage* msg)
  311. <a name="l00276"></a>00276 {
  312. <a name="l00277"></a>00277 <span class="keywordflow">if</span>( <a class="code" href="classPubSubTimer.html" title="Class generated from overlay/pubsubmmog/PubSubMessage.msg by opp_msgc.">PubSubTimer</a>* timer = dynamic_cast&lt;PubSubTimer*&gt;(msg) ) {
  313. <a name="l00278"></a>00278 <span class="keywordflow">switch</span>( timer-&gt;getType() ) {
  314. <a name="l00279"></a>00279 <span class="keywordflow">case</span> <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caec28dc4bd962108ceb27575f46b81ebd">PUBSUB_HEARTBEAT</a>:
  315. <a name="l00280"></a>00280 <a class="code" href="classPubSubMMOG.html#a237b78a3abc9b6cbb95021e25306e2e2">sendHearbeatToChildren</a>();
  316. <a name="l00281"></a>00281 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( timer );
  317. <a name="l00282"></a>00282 <span class="keywordflow">break</span>;
  318. <a name="l00283"></a>00283 <span class="keywordflow">case</span> <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caa64f2984ebaaa94fb52bc3ff99d24fa1">PUBSUB_CHILDPING</a>:
  319. <a name="l00284"></a>00284 <a class="code" href="classPubSubMMOG.html#abd00be445c110f527365d00553713334">sendPingToChildren</a>();
  320. <a name="l00285"></a>00285 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( timer );
  321. <a name="l00286"></a>00286 <span class=

Large files files are truncated, but you can click here to view the full file