sensehandler_8h-source.html

来自「仿真人工智能是指用人工的方法和技术」· HTML 代码 · 共 93 行

HTML
93
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>SenseHandler.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body bgcolor="#ffffff"><!-- Generated by Doxygen 1.2.12 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</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="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>SenseHandler.h</h1><a href="SenseHandler_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>00002 <font class="comment">Copyright (c) 2000,2001, Jelle Kok, University of Amsterdam</font>00003 <font class="comment">All rights reserved.</font>00004 <font class="comment"></font>00005 <font class="comment">Redistribution and use in source and binary forms, with or without </font>00006 <font class="comment">modification, are permitted provided that the following conditions are met:</font>00007 <font class="comment"></font>00008 <font class="comment">1. Redistributions of source code must retain the above copyright notice, this </font>00009 <font class="comment">list of conditions and the following disclaimer. </font>00010 <font class="comment"></font>00011 <font class="comment">2. Redistributions in binary form must reproduce the above copyright notice, </font>00012 <font class="comment">this list of conditions and the following disclaimer in the documentation </font>00013 <font class="comment">and/or other materials provided with the distribution. </font>00014 <font class="comment"></font>00015 <font class="comment">3. Neither the name of the University of Amsterdam nor the names of its </font>00016 <font class="comment">contributors may be used to endorse or promote products derived from this </font>00017 <font class="comment">software without specific prior written permission. </font>00018 <font class="comment"></font>00019 <font class="comment">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" </font>00020 <font class="comment">AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE </font>00021 <font class="comment">IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE </font>00022 <font class="comment">DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE </font>00023 <font class="comment">FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL </font>00024 <font class="comment">DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR </font>00025 <font class="comment">SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER </font>00026 <font class="comment">CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, </font>00027 <font class="comment">OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE </font>00028 <font class="comment">OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</font>00029 <font class="comment">*/</font>00042 <font class="preprocessor">#ifndef _SENSEHANDLER_</font>00043 <font class="preprocessor"></font><font class="preprocessor">#define _SENSEHANDLER_</font>00044 <font class="preprocessor"></font>00045 <font class="preprocessor">#include "<a class="code" href="Connection_8h.html">Connection.h</a>"</font>00046 <font class="preprocessor">#include "<a class="code" href="WorldModel_8h.html">WorldModel.h</a>"</font>00047 <a name="l00048"></a><a class="code" href="SenseHandler_8h.html#a0">00048</a> <font class="keyword">extern</font> <a class="code" href="classLogger.html">Logger</a> <a class="code" href="SenseHandler_8h.html#a0">Log</a>; 00050 <font class="keywordtype">void</font>* <a class="code" href="SenseHandler_8h.html#a0">sense_callback</a>( <font class="keywordtype">void</font> *v );00051 00052 <font class="comment">/******************************************************************************/</font>00053 <font class="comment">/********************** CLASS SENSEHANDLER ************************************/</font>00054 <font class="comment">/******************************************************************************/</font>00055 <a name="l00065"></a><a class="code" href="classSenseHandler.html">00065</a> <font class="keyword">class </font><a class="code" href="classSenseHandler.html">SenseHandler</a> {<a name="l00066"></a><a class="code" href="classSenseHandler.html#o0">00066</a>   <a class="code" href="classWorldModel.html">WorldModel</a>     *<a class="code" href="classSenseHandler.html#o0">WM</a>;     <a name="l00067"></a><a class="code" href="classSenseHandler.html#o1">00067</a>   <a class="code" href="classServerSettings.html">ServerSettings</a> *<a class="code" href="classSenseHandler.html#o1">SS</a>;     <a name="l00068"></a><a class="code" href="classSenseHandler.html#o2">00068</a>   <a class="code" href="classPlayerSettings.html">PlayerSettings</a> *<a class="code" href="classSenseHandler.html#o2">PS</a>;     <a name="l00069"></a><a class="code" href="classSenseHandler.html#o3">00069</a>   <a class="code" href="classConnection.html">Connection</a>* <a class="code" href="classSenseHandler.html#o3">connection</a>; <a name="l00070"></a><a class="code" href="classSenseHandler.html#o4">00070</a>   <font class="keywordtype">int</font>         <a class="code" href="classSenseHandler.html#o4">iTimeSignal</a>;<a name="l00071"></a><a class="code" href="classSenseHandler.html#o5">00071</a>   <font class="keywordtype">int</font>         <a class="code" href="classSenseHandler.html#o5">iTriCounter</a>;<a name="l00072"></a><a class="code" href="classSenseHandler.html#o6">00072</a>   <font class="keywordtype">int</font>         <a class="code" href="classSenseHandler.html#o6">iSimStep</a>;   <a name="l00073"></a><a class="code" href="classSenseHandler.html#o7">00073</a>   <font class="keyword">struct      </font>itimerval <a class="code" href="classSenseHandler.html#o7">itv</a>;     00075 <font class="keyword">public</font>:00076   <a class="code" href="classSenseHandler.html#a0">SenseHandler</a>( <a class="code" href="classConnection.html">Connection</a>* c, <a class="code" href="classWorldModel.html">WorldModel</a>* wm, <a class="code" href="classServerSettings.html">ServerSettings</a> *ss,00077                 <a class="code" href="classPlayerSettings.html">PlayerSettings</a> *ps );00078 00079   <font class="comment">// start the loop to handle the messages from the server</font>00080   <font class="keywordtype">void</font> <a class="code" href="classSenseHandler.html#a1">handleMessagesFromServer</a>      (              );00081 00082   <font class="comment">// method to determine when the next action should be sent to the server.</font>00083   <font class="keywordtype">void</font> <a class="code" href="classSenseHandler.html#a2">setTimeSignal</a>                 (              );00084 00085   <font class="comment">// method to analyze incoming messages</font>00086   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a3">analyzeMessage</a>                ( <font class="keywordtype">char</font> *strMsg );00087   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a4">analyzeSeeGlobalMessage</a>       ( <font class="keywordtype">char</font> *strMsg );00088   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a5">analyzeSeeMessage</a>             ( <font class="keywordtype">char</font> *strMsg );00089   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a6">analyzeSenseMessage</a>           ( <font class="keywordtype">char</font> *strMsg );00090   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a7">analyzeInitMessage</a>            ( <font class="keywordtype">char</font> *strMsg );00091   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a8">analyzeHearMessage</a>            ( <font class="keywordtype">char</font> *strMsg );00092   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a9">analyzePlayerMessage</a>          ( <font class="keywordtype">char</font> *strMsg );00093   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a10">analyzeChangePlayerTypeMessage</a>( <font class="keywordtype">char</font> *strMsg );00094   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a11">analyzeServerParamMessage</a>     ( <font class="keywordtype">char</font> *strMsg );00095   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a12">analyzeCheckBall</a>              ( <font class="keywordtype">char</font> *strMsg );00096   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a13">analyzePlayerTypeMessage</a>      ( <font class="keywordtype">char</font> *strMsg );00097   <font class="keywordtype">bool</font> <a class="code" href="classSenseHandler.html#a14">analyzePlayerParamMessage</a>     ( <font class="keywordtype">char</font> *strMsg );00098 };00099 00100 <font class="preprocessor">#endif</font></font></pre></div><hr><address><small>Generated on Thu Mar 7 00:37:43 2002 for UvA Trilearn 2001 by<a href="http://www.doxygen.org/index.html"><img src="doxygen.gif" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.12 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, &copy;&nbsp;1997-2001</small></address></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?