aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/pacs__client_8h-source.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/pacs__client_8h-source.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/pacs__client_8h-source.html471
1 files changed, 471 insertions, 0 deletions
diff --git a/docs/doxygen/nel/pacs__client_8h-source.html b/docs/doxygen/nel/pacs__client_8h-source.html
new file mode 100644
index 00000000..771ce913
--- /dev/null
+++ b/docs/doxygen/nel/pacs__client_8h-source.html
@@ -0,0 +1,471 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+ <TITLE>nevrax.org : docs</TITLE>
+ <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</HEAD>
+<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
+
+<!-- uplinks -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ </TR>
+</TABLE>
+
+<!-- banner Nevrax -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
+ <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
+</TABLE>
+
+<!-- main table -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+ <!------ Begin Box ------>
+ <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
+ <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
+ <TABLE cellspacing=0 cellpadding=1 border=0>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr>
+ </TABLE>
+ </TD></TR></TABLE></TD></TR></TABLE>
+ <!------ End Box ------>
+
+ </TD>
+ <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+<!-- title -->
+<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
+<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
+</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
+</td></tr></table>
+&nbsp;
+
+<!-- block -->
+<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD>
+ <TD><B>Documentation</B></TD>
+ <TD ALIGN=RIGHT>&nbsp;</td>
+</tr></table>
+<!-- Generated by Doxygen 1.2.14 -->
+<center>
+<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
+<hr><h1>pacs_client.h</h1><a href="pacs__client_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
+00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font>
+00008 <font class="comment"> *</font>
+00009 <font class="comment"> * This file is part of NEVRAX NEL.</font>
+00010 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
+00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
+00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
+00013 <font class="comment"> * any later version.</font>
+00014 <font class="comment"></font>
+00015 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
+00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
+00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
+00018 <font class="comment"> * General Public License for more details.</font>
+00019 <font class="comment"></font>
+00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
+00021 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
+00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
+00023 <font class="comment"> * MA 02111-1307, USA.</font>
+00024 <font class="comment"> */</font>
+00025
+00026 <font class="preprocessor">#ifndef NL_PACS_CLIENT_H</font>
+00027 <font class="preprocessor"></font><font class="preprocessor">#define NL_PACS_CLIENT_H</font>
+00028 <font class="preprocessor"></font>
+00029 <font class="preprocessor">#include "<a class="code" href="stdnet_8h.html">stdnet.h</a>"</font>
+00030
+00031 <font class="preprocessor">#include "<a class="code" href="inet__address_8h.html">nel/net/inet_address.h</a>"</font>
+00032 <font class="preprocessor">#include "<a class="code" href="callback__client_8h.html">nel/net/callback_client.h</a>"</font>
+00033 <font class="preprocessor">#include "<a class="code" href="naming__client_8h.html">nel/net/naming_client.h</a>"</font>
+00034
+00035 <font class="preprocessor">#include "<a class="code" href="u__move__primitive_8h.html">nel/pacs/u_move_primitive.h</a>"</font>
+00036 <font class="preprocessor">#include "<a class="code" href="u__collision__desc_8h.html">nel/pacs/u_collision_desc.h</a>"</font>
+00037
+<a name="l00038"></a><a class="code" href="pacs__client_8h.html#a0">00038</a> <font class="preprocessor">#define NLNET_PACS_PROTOCOL_VERSION 1</font>
+00039 <font class="preprocessor"></font>
+00040 <font class="keyword">namespace </font>NLNET
+00041 {
+00042
+00043 TCallbackItem <a class="code" href="namespaceNLNET.html#a23">PacsCallbackArray</a>[];
+00044
+<a name="l00052"></a><a class="code" href="classNLNET_1_1CPacsClient.html">00052</a> <font class="keyword">class </font>CPacsClient
+00053 {
+00054 <font class="keyword">friend</font> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a83">cbPacsAnswer</a> (CMessage &amp;msgin, <a class="code" href="namespaceNLNET.html#a0">TSockId</a> from, CCallbackNetBase &amp;netbase);
+00055 <font class="keyword">public</font>:
+00056
+<a name="l00058"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a0">00058</a> <a class="code" href="classNLNET_1_1CPacsClient.html#a0">CPacsClient</a>()
+00059 {
+00060 <font class="comment">// No connexion</font>
+00061 <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>=NULL;
+00062 }
+00063
+<a name="l00064"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a1">00064</a> <a class="code" href="classNLNET_1_1CPacsClient.html#a1">~CPacsClient</a>()
+00065 {
+00066 <a class="code" href="classNLNET_1_1CPacsClient.html#a3">disconnect</a> ();
+00067 }
+00068
+00069 <font class="keywordtype">bool</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a2">connect</a> ();
+00070
+<a name="l00071"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a3">00071</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a3">disconnect</a> ()
+00072 {
+00073 <font class="keywordflow">if</font> (_Server)
+00074 {
+00075 <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>-&gt;disconnect ();
+00076 <font class="keyword">delete</font> <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>;
+00077 }
+00078 }
+00079
+<a name="l00085"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a4">00085</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a4">initMessage</a> ()
+00086 {
+00087 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.clear ();
+00088 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.setType (<font class="stringliteral">"PACS"</font>);
+00089 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serialCheck ((<a class="code" href="types__nl_8h.html#a10">uint32</a>)<a class="code" href="pacs__client_8h.html#a0">NLNET_PACS_PROTOCOL_VERSION</a>);
+00090 }
+00091
+<a name="l00097"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a5">00097</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a5">sendMessage</a> ()
+00098 {
+00099 <font class="comment">// Checks</font>
+00100 <a class="code" href="debug_8h.html#a6">nlassert</a> (<a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>);
+00101
+00102 <font class="comment">// Close the message</font>
+00103 <font class="keywordtype">bool</font> nlFalse=<font class="keyword">false</font>;
+00104 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlFalse);
+00105
+00106 <font class="comment">// Send the message</font>
+00107 <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>-&gt;send (<a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>);
+00108 }
+00109
+<a name="l00113"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a6">00113</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a6">update</a> ()
+00114 {
+00115 <font class="comment">// Checks</font>
+00116 <a class="code" href="debug_8h.html#a6">nlassert</a> (<a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>);
+00117
+00118 <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>-&gt;update ();
+00119 }
+00120
+00122
+<a name="l00132"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a7">00132</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a7">rayTest</a> (<font class="keywordtype">double</font> p0, <font class="keywordtype">double</font> p1, <a class="code" href="types__nl_8h.html#a10">uint32</a> testId)
+00133 {
+00134 <font class="comment">// Append to the current message</font>
+00135 std::string name=<font class="stringliteral">"RY"</font>;
+00136 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00137 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, p0, p1, testId);
+00138 }
+00139
+00141
+<a name="l00149"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a8">00149</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a8">addPrimitive</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>)
+00150 {
+00151 <font class="comment">// Append to the current message</font>
+00152 std::string name=<font class="stringliteral">"AD"</font>;
+00153 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00154 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>);
+00155 }
+00156
+<a name="l00164"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a9">00164</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a9">removePrimitive</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>)
+00165 {
+00166 <font class="comment">// Append to the current message</font>
+00167 std::string name=<font class="stringliteral">"RV"</font>;
+00168 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00169 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>);
+00170 }
+00171
+<a name="l00180"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a10">00180</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a10">evalCollision</a> (<a class="code" href="types__nl_8h.html#a10">uint32</a> evalId, <font class="keywordtype">double</font> deltaTime)
+00181 {
+00182 <font class="comment">// Append to the current message</font>
+00183 std::string name=<font class="stringliteral">"EV"</font>;
+00184 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00185 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, evalId, deltaTime);
+00186 }
+00187
+<a name="l00197"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a11">00197</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a11">testMove</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a>&amp; speed, <font class="keywordtype">double</font> deltaTime)
+00198 {
+00199 <font class="comment">// Append to the current message</font>
+00200 std::string name=<font class="stringliteral">"TS"</font>;
+00201 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00202 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, const_cast&lt;NLMISC::CVectorD&amp;&gt; (speed), deltaTime);
+00203 }
+00204
+00206
+<a name="l00215"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a12">00215</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a12">setCurrentPrimitive</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>)
+00216 {
+00217 <font class="comment">// Append to the current message</font>
+00218 std::string name=<font class="stringliteral">"CU"</font>;
+00219 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00220 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>);
+00221 }
+00222
+<a name="l00230"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a13">00230</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a13">setPrimitiveType</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s12">NLPACS::UMovePrimitive::TType</a> <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>)
+00231 {
+00232 <font class="comment">// Append to the current message</font>
+00233 std::string name=<font class="stringliteral">"TY"</font>;
+00234 <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>=(uint32)<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
+00235 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00236 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>);
+00237 }
+00238
+<a name="l00246"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a14">00246</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a14">setReactionType</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s13">NLPACS::UMovePrimitive::TReaction</a> <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>)
+00247 {
+00248 <font class="comment">// Append to the current message</font>
+00249 std::string name=<font class="stringliteral">"RT"</font>;
+00250 <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>=(uint32)<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
+00251 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00252 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>);
+00253 }
+00254
+<a name="l00262"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a15">00262</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a15">setTriggerType</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s14">NLPACS::UMovePrimitive::TTrigger</a> <a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>)
+00263 {
+00264 <font class="comment">// Append to the current message</font>
+00265 std::string name=<font class="stringliteral">"TT"</font>;
+00266 <a class="code" href="types__nl_8h.html#a10">uint32</a> <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>=(uint32)<a class="code" href="driver__opengl__extension__def_8h.html#a373">type</a>;
+00267 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00268 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>);
+00269 }
+00270
+<a name="l00278"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a16">00278</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a16">setCollisionMask</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s0">NLPACS::UMovePrimitive::TCollisionMask</a> mask)
+00279 {
+00280 <font class="comment">// Append to the current message</font>
+00281 std::string name=<font class="stringliteral">"CT"</font>;
+00282 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00283 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, mask);
+00284 }
+00285
+<a name="l00293"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a17">00293</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a17">setOcclusionMask</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s0">NLPACS::UMovePrimitive::TCollisionMask</a> mask)
+00294 {
+00295 <font class="comment">// Append to the current message</font>
+00296 std::string name=<font class="stringliteral">"OT"</font>;
+00297 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00298 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, mask);
+00299 }
+00300
+<a name="l00308"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a18">00308</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a18">setObstacle</a> (<font class="keywordtype">bool</font> obstacle)
+00309 {
+00310 <font class="comment">// Append to the current message</font>
+00311 std::string name=<font class="stringliteral">"OB"</font>;
+00312 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00313 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, obstacle);
+00314 }
+00315
+<a name="l00323"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a19">00323</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a19">setOrientation</a> (<font class="keywordtype">double</font> orientation)
+00324 {
+00325 <font class="comment">// Append to the current message</font>
+00326 std::string name=<font class="stringliteral">"OR"</font>;
+00327 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00328 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, orientation);
+00329 }
+00330
+<a name="l00338"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a20">00338</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a20">setAbsorption</a> (<font class="keywordtype">float</font> absorption)
+00339 {
+00340 <font class="comment">// Append to the current message</font>
+00341 std::string name=<font class="stringliteral">"AB"</font>;
+00342 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00343 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, absorption);
+00344 }
+00345
+<a name="l00354"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a21">00354</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a21">setSize</a> (<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a391">depth</a>)
+00355 {
+00356 <font class="comment">// Append to the current message</font>
+00357 std::string name=<font class="stringliteral">"SZ"</font>;
+00358 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00359 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a389">width</a>, <a class="code" href="driver__opengl__extension__def_8h.html#a391">depth</a>);
+00360 }
+00361
+<a name="l00369"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a22">00369</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a22">setHeight</a> (<font class="keywordtype">float</font> <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>)
+00370 {
+00371 <font class="comment">// Append to the current message</font>
+00372 std::string name=<font class="stringliteral">"HE"</font>;
+00373 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00374 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a390">height</a>);
+00375 }
+00376
+<a name="l00384"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a23">00384</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a23">setRadius</a> (<font class="keywordtype">float</font> radius)
+00385 {
+00386 <font class="comment">// Append to the current message</font>
+00387 std::string name=<font class="stringliteral">"RD"</font>;
+00388 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00389 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, radius);
+00390 }
+00391
+<a name="l00400"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a24">00400</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a24">globalMove</a> (<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a>&amp; position)
+00401 {
+00402 <font class="comment">// Append to the current message</font>
+00403 std::string name=<font class="stringliteral">"GM"</font>;
+00404 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00405 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, const_cast&lt;NLMISC::CVectorD&amp;&gt; (position));
+00406 }
+00407
+<a name="l00418"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a25">00418</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a25">relativeMove</a> (<font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a>&amp; speed)
+00419 {
+00420 <font class="comment">// Append to the current message</font>
+00421 std::string name=<font class="stringliteral">"RM"</font>;
+00422 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00423 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, const_cast&lt;NLMISC::CVectorD&amp;&gt; (speed));
+00424 }
+00425
+<a name="l00433"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a26">00433</a> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#a26">getPositionSpeed</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>)
+00434 {
+00435 <font class="comment">// Append to the current message</font>
+00436 std::string name=<font class="stringliteral">"PS"</font>;
+00437 <font class="keywordtype">bool</font> nlTrue=<font class="keyword">true</font>;
+00438 <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>.serial (nlTrue, name, <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>);
+00439 }
+00440
+00441 <font class="keyword">protected</font>:
+00442
+00444
+<a name="l00448"></a><a class="code" href="classNLNET_1_1CPacsClient.html#b0">00448</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#b0">messageCallback</a> ()
+00449 {}
+00450
+<a name="l00457"></a><a class="code" href="classNLNET_1_1CPacsClient.html#b1">00457</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#b1">rayTestCallback</a> (<a class="code" href="types__nl_8h.html#a10">uint32</a> testId, <font class="keywordtype">bool</font> testResult)
+00458 {}
+00459
+<a name="l00467"></a><a class="code" href="classNLNET_1_1CPacsClient.html#b2">00467</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#b2">triggerCallback</a> (<a class="code" href="types__nl_8h.html#a10">uint32</a> evalId, <font class="keyword">const</font> std::vector&lt;NLPACS::UTriggerInfo&gt;&amp; triggerInfo)
+00468 {}
+00469
+<a name="l00476"></a><a class="code" href="classNLNET_1_1CPacsClient.html#b3">00476</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#b3">testMoveCallback</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, <font class="keywordtype">bool</font> testResult)
+00477 {}
+00478
+<a name="l00486"></a><a class="code" href="classNLNET_1_1CPacsClient.html#b4">00486</a> <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="classNLNET_1_1CPacsClient.html#b4">getPositionSpeedCallback</a> (<a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &amp;position, <font class="keyword">const</font> <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> &amp;speed)
+00487 {}
+00488
+00489 <font class="keyword">private</font>:
+<a name="l00490"></a><a class="code" href="classNLNET_1_1CPacsClient.html#o0">00490</a> CCallbackClient *<a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>;
+<a name="l00491"></a><a class="code" href="classNLNET_1_1CPacsClient.html#o1">00491</a> CMessage <a class="code" href="classNLNET_1_1CPacsClient.html#o1">_Message</a>;
+00492 };
+00493
+00494 <font class="comment">// Callback to listen to the server</font>
+<a name="l00495"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a83">00495</a> <font class="keyword">static</font> <font class="keywordtype">void</font> <a class="code" href="namespaceNLNET.html#a83">cbPacsAnswer</a> (CMessage &amp;msgin, <a class="code" href="namespaceNLNET.html#a0">TSockId</a> from, CCallbackNetBase &amp;netbase)
+00496 {
+00497 <font class="comment">// Get the client pointer</font>
+00498 CPacsClient *client=(CPacsClient*)(uint)from-&gt;appId ();
+00499
+00500 <font class="comment">// Check stream</font>
+00501 msgin.serialCheck ((<a class="code" href="types__nl_8h.html#a10">uint32</a>)<a class="code" href="pacs__client_8h.html#a0">NLNET_PACS_PROTOCOL_VERSION</a>);
+00502
+00503 <font class="comment">// Message callback</font>
+00504 client-&gt;messageCallback ();
+00505
+00506 <font class="keywordtype">bool</font> again;
+00507 msgin.serial (again);
+00508
+00509 <font class="keywordflow">while</font> (again)
+00510 {
+00511 <font class="comment">// Read the message sub string</font>
+00512 std::string subMessage;
+00513 msgin.serial (subMessage);
+00514
+00515 <font class="comment">// This code can work only if sizeof (uint) == sizeof (void*)</font>
+00516 <a class="code" href="debug_8h.html#a6">nlassert</a> (<font class="keyword">sizeof</font> (<a class="code" href="types__nl_8h.html#a14">uint</a>)==<font class="keyword">sizeof</font> (<font class="keywordtype">void</font>*));
+00517
+00518 <font class="comment">// Raytrace callback ?</font>
+00519 <font class="keywordflow">if</font> (subMessage==<font class="stringliteral">"RY"</font>)
+00520 {
+00521 <font class="comment">// Read test id and test result</font>
+00522 <a class="code" href="types__nl_8h.html#a10">uint32</a> testId;
+00523 <font class="keywordtype">bool</font> testResult;
+00524 msgin.serial (testId, testResult);
+00525
+00526 <font class="comment">// Call the callback</font>
+00527 client-&gt;rayTestCallback (testId, testResult);
+00528 }
+00529 <font class="comment">// Trigger callback ?</font>
+00530 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (subMessage==<font class="stringliteral">"TR"</font>)
+00531 {
+00532 <font class="comment">// Read eval id and trigger info</font>
+00533 <a class="code" href="types__nl_8h.html#a10">uint32</a> evalId;
+00534 std::vector&lt;NLPACS::UTriggerInfo&gt; triggerInfo;
+00535 msgin.serial (evalId);
+00536 msgin.serialCont (triggerInfo);
+00537
+00538 <font class="comment">// Call the callback</font>
+00539 client-&gt;triggerCallback (evalId, triggerInfo);
+00540 }
+00541 <font class="comment">// Test move callback ?</font>
+00542 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (subMessage==<font class="stringliteral">"TM"</font>)
+00543 {
+00544 <font class="comment">// Read the primitive id and test result</font>
+00545 <a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>;
+00546 <font class="keywordtype">bool</font> testResult;
+00547 msgin.serial (<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, testResult);
+00548
+00549 <font class="comment">// Call the callback </font>
+00550 client-&gt;testMoveCallback (<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, testResult);
+00551 }
+00552 <font class="comment">// Test move callback ?</font>
+00553 <font class="keywordflow">else</font> <font class="keywordflow">if</font> (subMessage==<font class="stringliteral">"PS"</font>)
+00554 {
+00555 <font class="comment">// Read the primitive id and test result</font>
+00556 <a class="code" href="classNLPACS_1_1UMovePrimitive.html#s1">NLPACS::UMovePrimitive::TUserData</a> <a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>;
+00557 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> position;
+00558 <a class="code" href="classNLMISC_1_1CVectorD.html">NLMISC::CVectorD</a> speed;
+00559 msgin.serial (<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, position, speed);
+00560
+00561 <font class="comment">// Call the callback </font>
+00562 client-&gt;getPositionSpeedCallback (<a class="code" href="driver__opengl__extension__def_8h.html#a356">id</a>, position, speed);
+00563 }
+00564 <font class="keywordflow">else</font>
+00565 <a class="code" href="namespaceNLMISC.html#a236">NLMISC::nlError</a> (<font class="stringliteral">"Pacs client: unkown sub message string"</font>);
+00566
+00567 <font class="comment">// Next message ?</font>
+00568 msgin.serial (again);
+00569 }
+00570 }
+00571
+00572 <font class="keyword">static</font> TCallbackItem <a class="code" href="namespaceNLNET.html#a23">PacsCallbackArray</a>[] =
+00573 {
+00574 { <font class="stringliteral">"PACS_ASW"</font>, <a class="code" href="namespaceNLNET.html#a83">cbPacsAnswer</a> }
+00575 };
+00576
+<a name="l00577"></a><a class="code" href="classNLNET_1_1CPacsClient.html#a2">00577</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> CPacsClient::connect ()
+00578 {
+00579 <font class="comment">// Create a connexion</font>
+00580 <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a> = <font class="keyword">new</font> CCallbackClient;
+00581
+00582 <font class="comment">// Look up for PACS service</font>
+00583 CNamingClient::lookupAndConnect (<font class="stringliteral">"PS"</font>, *<a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>);
+00584 <font class="keywordflow">if</font> (<a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>-&gt;connected())
+00585 {
+00586 <font class="comment">// Add callback array</font>
+00587 <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>-&gt;addCallbackArray (<a class="code" href="namespaceNLNET.html#a23">PacsCallbackArray</a>, <font class="keyword">sizeof</font> (<a class="code" href="namespaceNLNET.html#a23">PacsCallbackArray</a>) / <font class="keyword">sizeof</font> (<a class="code" href="namespaceNLNET.html#a23">PacsCallbackArray</a>[0]));
+00588
+00589 <font class="comment">// This code can work only if sizeof (uint) == sizeof (void*)</font>
+00590 <a class="code" href="debug_8h.html#a6">nlassert</a> (<font class="keyword">sizeof</font> (<a class="code" href="types__nl_8h.html#a14">uint</a>)==<font class="keyword">sizeof</font> (<font class="keywordtype">void</font>*));
+00591 <a class="code" href="classNLNET_1_1CPacsClient.html#o0">_Server</a>-&gt;id ()-&gt;setAppId ((<a class="code" href="types__nl_8h.html#a12">uint64</a>)(<a class="code" href="types__nl_8h.html#a14">uint</a>)<font class="keyword">this</font>);
+00592
+00593 <font class="comment">// Return ok</font>
+00594 <font class="keywordflow">return</font> <font class="keyword">true</font>;
+00595 }
+00596 <font class="keywordflow">else</font>
+00597 {
+00598 <font class="keywordflow">return</font> <font class="keyword">false</font>;
+00599 }
+00600 }
+00601
+00602 } <font class="comment">// NLNET</font>
+00603
+00604
+00605 <font class="preprocessor">#endif // NL_PACS_CLIENT_H</font>
+00606 <font class="preprocessor"></font>
+00607 <font class="comment">/* End of pacs_client.h */</font>
+</pre></div>
+
+<!-- footer -->
+<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
+</TD>
+<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>