/OverSim-20101103/doc/doxy/PubSubMMOG_8cc_source.html
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
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <title>OverSim: PubSubMMOG.cc Source File</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <link href="doxygen.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <!-- Generated by Doxygen 1.7.1 -->
- <div class="navigation" id="top">
- <div class="tabs">
- <ul class="tablist">
- <li><a href="main.html"><span>Main Page</span></a></li>
- <li><a href="pages.html"><span>Related Pages</span></a></li>
- <li><a href="namespaces.html"><span>Namespaces</span></a></li>
- <li><a href="annotated.html"><span>Classes</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- <li><a href="dirs.html"><span>Directories</span></a></li>
- </ul>
- </div>
- <div class="tabs2">
- <ul class="tablist">
- <li><a href="files.html"><span>File List</span></a></li>
- <li><a href="globals.html"><span>File Members</span></a></li>
- </ul>
- </div>
- <div class="navpath">
- <ul>
- <li><a class="el" href="dir_668dee661430860db5868c2621a9c372.html">src</a> </li>
- <li><a class="el" href="dir_6302e9405fe106175d386473fd676d2e.html">overlay</a> </li>
- <li><a class="el" href="dir_1ea0fb66e628dfd4ff0dfe2ccf5e5335.html">pubsubmmog</a> </li>
- </ul>
- </div>
- </div>
- <div class="header">
- <div class="headertitle">
- <h1>PubSubMMOG.cc</h1> </div>
- </div>
- <div class="contents">
- <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>
- <a name="l00002"></a>00002 <span class="comment">// Copyright (C) 2006 Institut fuer Telematik, Universitaet Karlsruhe (TH)</span>
- <a name="l00003"></a>00003 <span class="comment">//</span>
- <a name="l00004"></a>00004 <span class="comment">// This program is free software; you can redistribute it and/or</span>
- <a name="l00005"></a>00005 <span class="comment">// modify it under the terms of the GNU General Public License</span>
- <a name="l00006"></a>00006 <span class="comment">// as published by the Free Software Foundation; either version 2</span>
- <a name="l00007"></a>00007 <span class="comment">// of the License, or (at your option) any later version.</span>
- <a name="l00008"></a>00008 <span class="comment">//</span>
- <a name="l00009"></a>00009 <span class="comment">// This program is distributed in the hope that it will be useful,</span>
- <a name="l00010"></a>00010 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
- <a name="l00011"></a>00011 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
- <a name="l00012"></a>00012 <span class="comment">// GNU General Public License for more details.</span>
- <a name="l00013"></a>00013 <span class="comment">//</span>
- <a name="l00014"></a>00014 <span class="comment">// You should have received a copy of the GNU General Public License</span>
- <a name="l00015"></a>00015 <span class="comment">// along with this program; if not, write to the Free Software</span>
- <a name="l00016"></a>00016 <span class="comment">// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.</span>
- <a name="l00017"></a>00017 <span class="comment">//</span>
- <a name="l00018"></a>00018
- <a name="l00024"></a>00024 <span class="preprocessor">#include <NotifierConsts.h></span>
- <a name="l00025"></a>00025
- <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="PubSubMMOG_8h.html">PubSubMMOG.h</a>"</span>
- <a name="l00027"></a>00027
- <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="GlobalNodeListAccess_8h.html">GlobalNodeListAccess.h</a>"</span>
- <a name="l00029"></a>00029 <span class="preprocessor">#include <<a class="code" href="GlobalStatistics_8h.html">GlobalStatistics.h</a>></span>
- <a name="l00030"></a>00030 <span class="preprocessor">#include <<a class="code" href="BootstrapList_8h.html">BootstrapList.h</a>></span>
- <a name="l00031"></a>00031
- <a name="l00032"></a>00032 <a class="code" href="ALMTest_8cc.html#a3b5014f410c7989e8bad4b467ecc94cd">Define_Module</a>(<a class="code" href="classPubSubMMOG.html">PubSubMMOG</a>);
- <a name="l00033"></a>00033
- <a name="l00034"></a>00034 <span class="keyword">using namespace </span>std;
- <a name="l00035"></a>00035
- <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)
- <a name="l00037"></a>00037 {
- <a name="l00038"></a>00038 <span class="comment">// because of IPAddressResolver, we need to wait until interfaces are registered,</span>
- <a name="l00039"></a>00039 <span class="comment">// address auto-assignment takes place etc.</span>
- <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>;
- <a name="l00041"></a>00041
- <a name="l00042"></a>00042 <a class="code" href="classBaseOverlay.html#ab4be6d88417117fbf33a445d56af2655">state</a> = INIT;
- <a name="l00043"></a>00043 <a class="code" href="classPubSubMMOG.html#a3e573d9ce39091daea435016a587b239">setBootstrapedIcon</a>();
- <a name="l00044"></a>00044 <span class="comment">// TODO: use BootstrapList instead (but this currently preferes</span>
- <a name="l00045"></a>00045 <span class="comment">// nodes from the same partition)</span>
- <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>-><a class="code" href="classGlobalNodeList.html#a1f0290942c0a6d89ad7e39d75ff6355b" title="Returns a random NodeHandle.">getBootstrapNode</a>();
- <a name="l00047"></a>00047
- <a name="l00048"></a>00048 <a class="code" href="classPubSubMMOG.html#a04199b677abdfd25b29f9a5f79c19426">joinTimer</a> = <span class="keyword">new</span> cMessage(<span class="stringliteral">"join timer"</span>);
- <a name="l00049"></a>00049 simtime_t joinTime = ceil(simTime() + (simtime_t) par(<span class="stringliteral">"joinDelay"</span>));
- <a name="l00050"></a>00050 scheduleAt( joinTime, <a class="code" href="classPubSubMMOG.html#a04199b677abdfd25b29f9a5f79c19426">joinTimer</a> );
- <a name="l00051"></a>00051
- <a name="l00052"></a>00052 <a class="code" href="classPubSubMMOG.html#a228fe6f61d1fe510d1336296c4bf254c">movementRate</a> = par(<span class="stringliteral">"movementRate"</span>);
- <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">"event delivery timer"</span>);
- <a name="l00054"></a>00054 <a class="code" href="classPubSubMMOG.html#a5c7d73c47298f65748e65abc506b9611">eventDeliveryTimer</a>-><a class="code" href="classPubSubTimer.html#a09825991200a1fa76d4cfc9549ac51f5">setType</a>( <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04cab87b77accd020036a875063be27c753c">PUBSUB_EVENTDELIVERY</a> );
- <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> );
- <a name="l00056"></a>00056
- <a name="l00057"></a>00057 <a class="code" href="classPubSubMMOG.html#a4051d53d8d09521b830246ca19b0004b">numSubspaces</a> = par(<span class="stringliteral">"numSubspaces"</span>);
- <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">"areaDimension"</span>) / <a class="code" href="classPubSubMMOG.html#a4051d53d8d09521b830246ca19b0004b">numSubspaces</a>);
- <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>() );
- <a name="l00060"></a>00060
- <a name="l00061"></a>00061 <a class="code" href="classPubSubMMOG.html#a7d310afbff3e729b6a33f8e6614de07e">maxChildren</a> = par(<span class="stringliteral">"maxChildren"</span>);
- <a name="l00062"></a>00062 <a class="code" href="classPubSubSubspaceResponsible.html#a5dfd7f5d997726d5c8f158a371cee621">PubSubSubspaceResponsible::maxChildren</a> = <a class="code" href="classPubSubMMOG.html#a7d310afbff3e729b6a33f8e6614de07e">maxChildren</a>;
- <a name="l00063"></a>00063
- <a name="l00064"></a>00064 <a class="code" href="classPubSubMMOG.html#ae02428124f2ac8a32da65ce4bcc7a927">AOIWidth</a> = par(<span class="stringliteral">"AOIWidth"</span>);
- <a name="l00065"></a>00065 <a class="code" href="classPubSubMMOG.html#a219753e4fc3eae95cd21f70bc40017e7">maxMoveDelay</a> = par(<span class="stringliteral">"maxMoveDelay"</span>);
- <a name="l00066"></a>00066
- <a name="l00067"></a>00067 <a class="code" href="classPubSubMMOG.html#a98fd6baf72474a184c902133581273fa">parentTimeout</a> = par(<span class="stringliteral">"parentTimeout"</span>);
- <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">"HeartbeatTimer"</span>);
- <a name="l00069"></a>00069 <a class="code" href="classPubSubMMOG.html#aebf88e5c0a0f294c706c3281b1aae373">heartbeatTimer</a>-><a class="code" href="classPubSubTimer.html#a09825991200a1fa76d4cfc9549ac51f5">setType</a>( <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caec28dc4bd962108ceb27575f46b81ebd">PUBSUB_HEARTBEAT</a> );
- <a name="l00070"></a>00070 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( <a class="code" href="classPubSubMMOG.html#aebf88e5c0a0f294c706c3281b1aae373">heartbeatTimer</a> );
- <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">"ChildPingTimer"</span>);
- <a name="l00072"></a>00072 <a class="code" href="classPubSubMMOG.html#a2540cd40427d53404d3adbca173cfd6c">childPingTimer</a>-><a class="code" href="classPubSubTimer.html#a09825991200a1fa76d4cfc9549ac51f5">setType</a>( <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caa64f2984ebaaa94fb52bc3ff99d24fa1">PUBSUB_CHILDPING</a> );
- <a name="l00073"></a>00073 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( <a class="code" href="classPubSubMMOG.html#a2540cd40427d53404d3adbca173cfd6c">childPingTimer</a> );
- <a name="l00074"></a>00074
- <a name="l00075"></a>00075 <a class="code" href="classPubSubMMOG.html#aced8c7945b0f77560359167cc5f398f6">allowOldMoveMessages</a> = par(<span class="stringliteral">"allowOldMoveMessages"</span>);
- <a name="l00076"></a>00076
- <a name="l00077"></a>00077 <a class="code" href="classPubSubMMOG.html#aa809123a9ef7f64ea622400ed60a2d4c">numEventsWrongTimeslot</a> = <a class="code" href="classPubSubMMOG.html#a0adb17b77190fd14c0979fe39a5889cc">numEventsCorrectTimeslot</a> = 0;
- <a name="l00078"></a>00078 <a class="code" href="classPubSubMMOG.html#aed031b28dd4fd6b2db5f68247ff742d7">numPubSubSignalingMessages</a> = 0;
- <a name="l00079"></a>00079 <a class="code" href="classPubSubMMOG.html#a16f1ec7076f68484acd789057428a3cc">pubSubSignalingMessagesSize</a> = 0;
- <a name="l00080"></a>00080 <a class="code" href="classPubSubMMOG.html#a11ca86e89977d8bb4d1512a5e64ce8d3">numMoveMessages</a> = 0;
- <a name="l00081"></a>00081 <a class="code" href="classPubSubMMOG.html#a122b6f4eacfc82a453cdabace026a0d5">moveMessagesSize</a> = 0;
- <a name="l00082"></a>00082 <a class="code" href="classPubSubMMOG.html#ae81f55efe5b21342597e408ff3474eee">numMoveListMessages</a> = 0;
- <a name="l00083"></a>00083 <a class="code" href="classPubSubMMOG.html#a5a665dd74681081d669ea57efd5d83b0">moveListMessagesSize</a> = 0;
- <a name="l00084"></a>00084 <a class="code" href="classPubSubMMOG.html#a4561eb4e380c7aea874ea622b9145603">respMoveListMessagesSize</a> = 0;
- <a name="l00085"></a>00085 <a class="code" href="classPubSubMMOG.html#a1450e36b5a7103fe4581f271fac13340">lostMovementLists</a> = 0;
- <a name="l00086"></a>00086 <a class="code" href="classPubSubMMOG.html#a8415fe6a47b3b961fd54f9e3b5f8d3f0">receivedMovementLists</a> = 0;
- <a name="l00087"></a>00087 WATCH( <a class="code" href="classPubSubMMOG.html#aed031b28dd4fd6b2db5f68247ff742d7">numPubSubSignalingMessages</a> );
- <a name="l00088"></a>00088 WATCH( <a class="code" href="classPubSubMMOG.html#a16f1ec7076f68484acd789057428a3cc">pubSubSignalingMessagesSize</a> );
- <a name="l00089"></a>00089 WATCH( <a class="code" href="classPubSubMMOG.html#a11ca86e89977d8bb4d1512a5e64ce8d3">numMoveMessages</a> );
- <a name="l00090"></a>00090 WATCH( <a class="code" href="classPubSubMMOG.html#a122b6f4eacfc82a453cdabace026a0d5">moveMessagesSize</a> );
- <a name="l00091"></a>00091 WATCH( <a class="code" href="classPubSubMMOG.html#ae81f55efe5b21342597e408ff3474eee">numMoveListMessages</a> );
- <a name="l00092"></a>00092 WATCH( <a class="code" href="classPubSubMMOG.html#a5a665dd74681081d669ea57efd5d83b0">moveListMessagesSize</a> );
- <a name="l00093"></a>00093 WATCH( <a class="code" href="classPubSubMMOG.html#aa809123a9ef7f64ea622400ed60a2d4c">numEventsWrongTimeslot</a> );
- <a name="l00094"></a>00094 WATCH( <a class="code" href="classPubSubMMOG.html#a0adb17b77190fd14c0979fe39a5889cc">numEventsCorrectTimeslot</a> );
- <a name="l00095"></a>00095 WATCH( <a class="code" href="classPubSubMMOG.html#a1450e36b5a7103fe4581f271fac13340">lostMovementLists</a> );
- <a name="l00096"></a>00096 WATCH( <a class="code" href="classPubSubMMOG.html#a8415fe6a47b3b961fd54f9e3b5f8d3f0">receivedMovementLists</a> );
- <a name="l00097"></a>00097 WATCH_LIST( <a class="code" href="classPubSubMMOG.html#a0535f1d205515626aaa20d25f8da3cda">subscribedSubspaces</a> );
- <a name="l00098"></a>00098 WATCH_MAP( <a class="code" href="classPubSubMMOG.html#a4b4d32adfbffbd585d8a174d47b24db9">responsibleSubspaces</a> );
- <a name="l00099"></a>00099 WATCH_MAP( <a class="code" href="classPubSubMMOG.html#a9cb86fc744b2f9b087a66e0af879f1fc">backupSubspaces</a> );
- <a name="l00100"></a>00100 WATCH_MAP( <a class="code" href="classPubSubMMOG.html#ac2ff9ed8d82f2fd97f69343cd8ee78ac">intermediateSubspaces</a> );
- <a name="l00101"></a>00101 }
- <a name="l00102"></a>00102
- <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)
- <a name="l00104"></a>00104 {
- <a name="l00105"></a>00105 <span class="comment">// delegate messages</span>
- <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 )
- <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> );
- <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> );
- <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> );
- <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> );
- <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> );
- <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> );
- <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>( )
- <a name="l00114"></a>00114
- <a name="l00115"></a>00115 <span class="keywordflow">return</span> RPC_HANDLED;
- <a name="l00116"></a>00116
- <a name="l00117"></a>00117 }
- <a name="l00118"></a>00118
- <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,
- <a name="l00120"></a>00120 cPolymorphic* context, <span class="keywordtype">int</span> rpcId,
- <a name="l00121"></a>00121 simtime_t rtt)
- <a name="l00122"></a>00122 {
- <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);
- <a name="l00124"></a>00124 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubJoin ) {
- <a name="l00125"></a>00125 <a class="code" href="classPubSubMMOG.html#a90f7b9fa68b400b80892d642f4c439b4">handleJoinResponse</a>( _PubSubJoinResponse );
- <a name="l00126"></a>00126 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00127"></a>00127 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00128"></a>00128 << <span class="stringliteral">" Received a PubSubJoin RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00129"></a>00129 << <span class="stringliteral">" msg="</span> << *_PubSubJoinResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00130"></a>00130 << endl;
- <a name="l00131"></a>00131 <span class="keywordflow">break</span>;
- <a name="l00132"></a>00132 }
- <a name="l00133"></a>00133 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubSubscription ) {
- <a name="l00134"></a>00134 <a class="code" href="classPubSubMMOG.html#a7d6b63042aee9dfbe3d11d2062a43a05">handleSubscriptionResponse</a>( _PubSubSubscriptionResponse );
- <a name="l00135"></a>00135 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00136"></a>00136 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00137"></a>00137 << <span class="stringliteral">" Received a PubSubSubscription RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00138"></a>00138 << <span class="stringliteral">" msg="</span> << *_PubSubSubscriptionResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00139"></a>00139 << endl;
- <a name="l00140"></a>00140 <span class="keywordflow">break</span>;
- <a name="l00141"></a>00141 }
- <a name="l00142"></a>00142 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubResponsibleNode ) {
- <a name="l00143"></a>00143 <a class="code" href="classPubSubMMOG.html#a7e351287bef39afa54408e4fce0fdf26">handleResponsibleNodeResponse</a>( _PubSubResponsibleNodeResponse );
- <a name="l00144"></a>00144 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00145"></a>00145 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00146"></a>00146 << <span class="stringliteral">" Received a PubSubResponsibleNode RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00147"></a>00147 << <span class="stringliteral">" msg="</span> << *_PubSubResponsibleNodeResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00148"></a>00148 << endl;
- <a name="l00149"></a>00149 <span class="keywordflow">break</span>;
- <a name="l00150"></a>00150 }
- <a name="l00151"></a>00151 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubHelp ) {
- <a name="l00152"></a>00152 <a class="code" href="classPubSubMMOG.html#a7d28b4484518dcf34fbc2cb462bf620b">handleHelpResponse</a>( _PubSubHelpResponse );
- <a name="l00153"></a>00153 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00154"></a>00154 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00155"></a>00155 << <span class="stringliteral">" Received a PubSubHelp RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00156"></a>00156 << <span class="stringliteral">" msg="</span> << *_PubSubHelpResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00157"></a>00157 << endl;
- <a name="l00158"></a>00158 <span class="keywordflow">break</span>;
- <a name="l00159"></a>00159 }
- <a name="l00160"></a>00160 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubBackup ) {
- <a name="l00161"></a>00161 <a class="code" href="classPubSubMMOG.html#a401659ffbdca793a6f7d97e9737a70d0">handleBackupResponse</a>( _PubSubBackupResponse );
- <a name="l00162"></a>00162 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00163"></a>00163 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00164"></a>00164 << <span class="stringliteral">" Received a PubSubBackup RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00165"></a>00165 << <span class="stringliteral">" msg="</span> << *_PubSubBackupResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00166"></a>00166 << endl;
- <a name="l00167"></a>00167 <span class="keywordflow">break</span>;
- <a name="l00168"></a>00168 }
- <a name="l00169"></a>00169 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubIntermediate ) {
- <a name="l00170"></a>00170 <a class="code" href="classPubSubMMOG.html#ac41702ca41ffae439637504939856f4f">handleIntermediateResponse</a>( _PubSubIntermediateResponse );
- <a name="l00171"></a>00171 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00172"></a>00172 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00173"></a>00173 << <span class="stringliteral">" Received a PubSubIntermediate RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00174"></a>00174 << <span class="stringliteral">" msg="</span> << *_PubSubIntermediateResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00175"></a>00175 << endl;
- <a name="l00176"></a>00176 <span class="keywordflow">break</span>;
- <a name="l00177"></a>00177 }
- <a name="l00178"></a>00178 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubAdoptChild ) {
- <a name="l00179"></a>00179 <a class="code" href="classPubSubMMOG.html#a9f396c585cfb16b476047c35fbbe05fa">handleAdoptChildResponse</a>( _PubSubAdoptChildResponse );
- <a name="l00180"></a>00180 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00181"></a>00181 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00182"></a>00182 << <span class="stringliteral">" Received a PubSubAdoptChild RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00183"></a>00183 << <span class="stringliteral">" msg="</span> << *_PubSubAdoptChildResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00184"></a>00184 << endl;
- <a name="l00185"></a>00185 <span class="keywordflow">break</span>;
- <a name="l00186"></a>00186 }
- <a name="l00187"></a>00187 <a class="code" href="RpcMacros_8h.html#a0394d2dc4f9f1e15d7e99c9f43da10c7">RPC_ON_RESPONSE</a>( PubSubPing ) {
- <a name="l00188"></a>00188 <a class="code" href="classPubSubMMOG.html#a6ade874ae0f4871c157cbf3e4334724c">handlePingResponse</a>( _PubSubPingResponse );
- <a name="l00189"></a>00189 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcResponse() @ "</span> << <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>()
- <a name="l00190"></a>00190 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00191"></a>00191 << <span class="stringliteral">" Received a PubSubPing RPC Response: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00192"></a>00192 << <span class="stringliteral">" msg="</span> << *_PubSubPingResponse << <span class="stringliteral">" rtt="</span> << rtt
- <a name="l00193"></a>00193 << endl;
- <a name="l00194"></a>00194 <span class="keywordflow">break</span>;
- <a name="l00195"></a>00195 }
- <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>( );
- <a name="l00197"></a>00197 }
- <a name="l00198"></a>00198
- <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,
- <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> &dest,
- <a name="l00201"></a>00201 cPolymorphic* context, <span class="keywordtype">int</span> rpcId,
- <a name="l00202"></a>00202 <span class="keyword">const</span> <a class="code" href="classOverlayKey.html" title="A common overlay key class.">OverlayKey</a> &destKey)
- <a name="l00203"></a>00203 {
- <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)
- <a name="l00205"></a>00205 <a class="code" href="RpcMacros_8h.html#ae07fad586ce7b9e82ad12848767a32e5">RPC_ON_CALL</a>( PubSubBackup ) {
- <a name="l00206"></a>00206 <a class="code" href="classPubSubMMOG.html#a217e815ddc5ba02f8afe33a73389184f">handleBackupCallTimeout</a>( _PubSubBackupCall, dest );
- <a name="l00207"></a>00207 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcTimeout() @ "</span> << <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>()
- <a name="l00208"></a>00208 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00209"></a>00209 << <span class="stringliteral">" Backup RPC Call timed out: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00210"></a>00210 << <span class="stringliteral">" msg="</span> << *_PubSubBackupCall
- <a name="l00211"></a>00211 << <span class="stringliteral">" oldNode="</span> << dest
- <a name="l00212"></a>00212 << endl;
- <a name="l00213"></a>00213 <span class="keywordflow">break</span>;
- <a name="l00214"></a>00214 }
- <a name="l00215"></a>00215 <a class="code" href="RpcMacros_8h.html#ae07fad586ce7b9e82ad12848767a32e5">RPC_ON_CALL</a>( PubSubPing ) {
- <a name="l00216"></a>00216 <a class="code" href="classPubSubMMOG.html#a0ca3bd97cac131ba5c2ff02235cc6a2f">handlePingCallTimeout</a>( _PubSubPingCall, dest );
- <a name="l00217"></a>00217 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcTimeout() @ "</span> << <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>()
- <a name="l00218"></a>00218 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00219"></a>00219 << <span class="stringliteral">" Ping RPC Call timed out: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00220"></a>00220 << <span class="stringliteral">" msg="</span> << *_PubSubPingCall
- <a name="l00221"></a>00221 << <span class="stringliteral">" oldNode="</span> << dest
- <a name="l00222"></a>00222 << endl;
- <a name="l00223"></a>00223 <span class="keywordflow">break</span>;
- <a name="l00224"></a>00224 }
- <a name="l00225"></a>00225 <a class="code" href="RpcMacros_8h.html#ae07fad586ce7b9e82ad12848767a32e5">RPC_ON_CALL</a>( PubSubSubscription ) {
- <a name="l00226"></a>00226 <a class="code" href="classPubSubMMOG.html#a1e97ea82ff0848af1f5437b1c8da7c99">handleSubscriptionCallTimeout</a>( _PubSubSubscriptionCall, dest );
- <a name="l00227"></a>00227 EV << <span class="stringliteral">"[PubSubMMOG::handleRpcTimeout() @ "</span> << <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>()
- <a name="l00228"></a>00228 << <span class="stringliteral">" ("</span> << <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) << <span class="stringliteral">")]\n"</span>
- <a name="l00229"></a>00229 << <span class="stringliteral">" Subscription RPC Call timed out: id="</span> << rpcId << <span class="stringliteral">"\n"</span>
- <a name="l00230"></a>00230 << <span class="stringliteral">" msg="</span> << *_PubSubSubscriptionCall
- <a name="l00231"></a>00231 << <span class="stringliteral">" oldNode="</span> << dest
- <a name="l00232"></a>00232 << endl;
- <a name="l00233"></a>00233 <span class="keywordflow">break</span>;
- <a name="l00234"></a>00234 }
- <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>( )
- <a name="l00236"></a>00236
- <a name="l00237"></a>00237 <span class="comment">// FIXME:</span>
- <a name="l00238"></a>00238 <span class="comment">// AdoptCall missing!</span>
- <a name="l00239"></a>00239 <span class="comment">// IntermediateCall missing!</span>
- <a name="l00240"></a>00240 <span class="comment">// (ResponsibleNodeCall missing)</span>
- <a name="l00241"></a>00241 <span class="comment">// (HelpCall missing)</span>
- <a name="l00242"></a>00242 }
- <a name="l00243"></a>00243
- <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)
- <a name="l00245"></a>00245 {
- <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<PubSubMoveListMessage*>(msg) ){
- <a name="l00247"></a>00247 <a class="code" href="classPubSubMMOG.html#a9d46909d81ca32d3ec2020a7184c3f50">handleMoveListMessage</a>( moveMsg );
- <a name="l00248"></a>00248 <span class="keyword">delete</span> moveMsg;
- <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<PubSubMoveMessage*>(msg) ){
- <a name="l00250"></a>00250 <a class="code" href="classPubSubMMOG.html#aa5f5b3bb6f7a4a26ab45dfdb6248f21b">handleMoveMessage</a>( moveMsg );
- <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<PubSubUnsubscriptionMessage*>(msg) ){
- <a name="l00252"></a>00252 <a class="code" href="classPubSubMMOG.html#a1e837eb023ac96a24c564e8c42da7c87">handleUnsubscriptionMessage</a>( unsMsg );
- <a name="l00253"></a>00253 <span class="keyword">delete</span> unsMsg;
- <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<PubSubNodeLeftMessage*>(msg) ){
- <a name="l00255"></a>00255 <a class="code" href="classPubSubMMOG.html#a73afcba7483897f08cfb5d258e569683">handleNodeLeftMessage</a>( leftMsg );
- <a name="l00256"></a>00256 <span class="keyword">delete</span> leftMsg;
- <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<PubSubReplacementMessage*>(msg) ){
- <a name="l00258"></a>00258 <a class="code" href="classPubSubMMOG.html#abd3f25e6c1521cc5d6959fc1929a2ac6">handleReplacementMessage</a>( replaceMsg );
- <a name="l00259"></a>00259 <span class="keyword">delete</span> replaceMsg;
- <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<PubSubBackupSubscriptionMessage*>(msg) ){
- <a name="l00261"></a>00261 <a class="code" href="classPubSubMMOG.html#a354f1a0173cb3cc5a00bc7d16d17f73a">handleSubscriptionBackup</a>( backupMsg );
- <a name="l00262"></a>00262 <span class="keyword">delete</span> backupMsg;
- <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<PubSubBackupUnsubscribeMessage*>(msg) ){
- <a name="l00264"></a>00264 <a class="code" href="classPubSubMMOG.html#a74e961ef109ba657e32f82519721eeaf">handleUnsubscribeBackup</a>( backupMsg );
- <a name="l00265"></a>00265 <span class="keyword">delete</span> backupMsg;
- <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<PubSubBackupIntermediateMessage*>(msg) ){
- <a name="l00267"></a>00267 <a class="code" href="classPubSubMMOG.html#a77b144f6034216ef0184589cf5b4da8d">handleIntermediateBackup</a>( backupMsg );
- <a name="l00268"></a>00268 <span class="keyword">delete</span> backupMsg;
- <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<PubSubReleaseIntermediateMessage*>(msg) ){
- <a name="l00270"></a>00270 <a class="code" href="classPubSubMMOG.html#af1197b5fab38765c9e510cb6e755f62a">handleReleaseIntermediate</a>( releaseMsg );
- <a name="l00271"></a>00271 <span class="keyword">delete</span> releaseMsg;
- <a name="l00272"></a>00272 }
- <a name="l00273"></a>00273 }
- <a name="l00274"></a>00274
- <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)
- <a name="l00276"></a>00276 {
- <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<PubSubTimer*>(msg) ) {
- <a name="l00278"></a>00278 <span class="keywordflow">switch</span>( timer->getType() ) {
- <a name="l00279"></a>00279 <span class="keywordflow">case</span> <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caec28dc4bd962108ceb27575f46b81ebd">PUBSUB_HEARTBEAT</a>:
- <a name="l00280"></a>00280 <a class="code" href="classPubSubMMOG.html#a237b78a3abc9b6cbb95021e25306e2e2">sendHearbeatToChildren</a>();
- <a name="l00281"></a>00281 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( timer );
- <a name="l00282"></a>00282 <span class="keywordflow">break</span>;
- <a name="l00283"></a>00283 <span class="keywordflow">case</span> <a class="code" href="PubSubMessage__m_8h.html#ac87923fdb9d8348a9eb766921ec0e04caa64f2984ebaaa94fb52bc3ff99d24fa1">PUBSUB_CHILDPING</a>:
- <a name="l00284"></a>00284 <a class="code" href="classPubSubMMOG.html#abd00be445c110f527365d00553713334">sendPingToChildren</a>();
- <a name="l00285"></a>00285 <a class="code" href="classPubSubMMOG.html#a7544c76d3fceee2a56dee1bdf63c4db1">startTimer</a>( timer );
- <a name="l00286"></a>00286 <span class=…
Large files files are truncated, but you can click here to view the full file