📄 classacthandler.html
字号:
This method puts a <a class="el" href="classSoccerCommand.html">SoccerCommand</a> in the queue. The last added command will be sent to the soccerserver when the method sendCommands is performed. Normally this is done when a signal set by the <a class="el" href="classSenseHandler.html">SenseHandler</a> arrives. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>command</em> </td><td><a class="el" href="classSoccerCommand.html">SoccerCommand</a> that should be put in the queue. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when command is added, false otherwise (queue is full) </dl><p>Definition at line <a class="el" href="ActHandler_8C-source.html#l00168">168</a> of file <a class="el" href="ActHandler_8C-source.html">ActHandler.C</a>.<p>References <a class="el" href="namespace_3globalScope_4.html#a247a180">CMD_ILLEGAL</a>, <a class="el" href="SoccerTypes_8h-source.html#l00489">SoccerCommand::commandType</a>, <a class="el" href="SoccerTypes_8C-source.html#l01746">SoccerTypes::isPrimaryCommand</a>(), <a class="el" href="ActHandler_8h-source.html#l00083">m_iMultipleCommands</a>, <a class="el" href="ActHandler_8h-source.html#l00082">m_queueMultipleCommands</a>, <a class="el" href="ActHandler_8h-source.html#l00081">m_queueOneCycleCommand</a>, and <a class="el" href="SoccerTypes_8h-source.html#l00067">MAX_COMMANDS</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00182">Player::deMeer5</a>(), <a class="el" href="Player_8C-source.html#l00278">Player::deMeer5_goalie</a>(), <a class="el" href="Player_8C-source.html#l00512">Player::executeStringCommand</a>(), and <a class="el" href="BasicPlayer_8C-source.html#l00871">BasicPlayer::turnWithBallTo</a>(). </td> </tr></table><a name="a5" doxytag="ActHandler::sendCommand"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool ActHandler::sendCommand </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classSoccerCommand.html">SoccerCommand</a> </td> <td class="mdname1" valign="top" nowrap> <em>soc</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method sends a single command directly to the server. First a string is made from the <a class="el" href="classSoccerCommand.html">SoccerCommand</a> and afterwards this string is send to the server using the method sendMessage. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>soc</em> </td><td><a class="el" href="classSoccerCommand.html">SoccerCommand</a> that should be send to the server. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when message was sent, false otherwise </dl><p>Definition at line <a class="el" href="ActHandler_8C-source.html#l00204">204</a> of file <a class="el" href="ActHandler_8C-source.html">ActHandler.C</a>.<p>References <a class="el" href="SoccerTypes_8C-source.html#l00604">SoccerCommand::getCommandString</a>(), <a class="el" href="SoccerTypes_8h-source.html#l00068">MAX_MSG</a>, <a class="el" href="ActHandler_8C-source.html#l00216">sendMessage</a>(), and <a class="el" href="ActHandler_8h-source.html#l00078">SS</a>. </td> </tr></table><a name="a7" doxytag="ActHandler::sendCommandDirect"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool ActHandler::sendCommandDirect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="classSoccerCommand.html">SoccerCommand</a> </td> <td class="mdname1" valign="top" nowrap> <em>soc</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method sends a single command directly to the server. First a string is made from the <a class="el" href="classSoccerCommand.html">SoccerCommand</a> and afterwards this string is send to the server using the method sendMessageDirect. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>soc</em> </td><td><a class="el" href="classSoccerCommand.html">SoccerCommand</a> that should be send to the server. </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when message was sent, false otherwise </dl><p>Definition at line <a class="el" href="ActHandler_8C-source.html#l00233">233</a> of file <a class="el" href="ActHandler_8C-source.html">ActHandler.C</a>.<p>References <a class="el" href="SoccerTypes_8C-source.html#l00604">SoccerCommand::getCommandString</a>(), <a class="el" href="SoccerTypes_8h-source.html#l00068">MAX_MSG</a>, <a class="el" href="ActHandler_8C-source.html#l00243">sendMessageDirect</a>(), and <a class="el" href="ActHandler_8h-source.html#l00078">SS</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00092">Player::mainLoop</a>(). </td> </tr></table><a name="a4" doxytag="ActHandler::sendCommands"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool ActHandler::sendCommands </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method converts all commands in the queue to text strings and sends these text strings to the server (connected by <a class="el" href="classConnection.html">Connection</a>). When the server didn't execute the commands from the previous cycle (this information is stored in the <a class="el" href="classWorldModel.html">WorldModel</a>) the commands in the queue are not sent, since it is probably the case that these commands will be performed this cycle and we don't want a clash (two commands in one cycle). In this case false is returned. <dl compact><dt><b>Returns: </b><dd>true when sending of messages succeeded, false otherwise </dl><p>Definition at line <a class="el" href="ActHandler_8C-source.html#l00102">102</a> of file <a class="el" href="ActHandler_8C-source.html">ActHandler.C</a>.<p>References <a class="el" href="namespace_3globalScope_4.html#a247a185">CMD_CATCH</a>, <a class="el" href="namespace_3globalScope_4.html#a247a180">CMD_ILLEGAL</a>, <a class="el" href="SoccerTypes_8h-source.html#l00489">SoccerCommand::commandType</a>, <a class="el" href="ActHandler_8h-source.html#l00077">connection</a>, <a class="el" href="SoccerTypes_8C-source.html#l00604">SoccerCommand::getCommandString</a>(), <a class="el" href="WorldModel_8C-source.html#l00177">WorldModel::getCurrentTime</a>(), <a class="el" href="WorldModel_8C-source.html#l00992">WorldModel::isQueuedActionPerformed</a>(), <a class="el" href="SoccerTypes_8h-source.html#l00497">SoccerCommand::iTimes</a>, <a class="el" href="ActHandler_8h-source.html#l00083">m_iMultipleCommands</a>, <a class="el" href="ActHandler_8h-source.html#l00082">m_queueMultipleCommands</a>, <a class="el" href="ActHandler_8h-source.html#l00081">m_queueOneCycleCommand</a>, <a class="el" href="SoccerTypes_8h-source.html#l00067">MAX_COMMANDS</a>, <a class="el" href="SoccerTypes_8h-source.html#l00068">MAX_MSG</a>, <a class="el" href="WorldModelUpdate_8C-source.html#l00386">WorldModel::processQueuedCommands</a>(), <a class="el" href="Connection_8C-source.html#l00210">Connection::sendMessage</a>(), <a class="el" href="ActHandler_8h-source.html#l00078">SS</a>, and <a class="el" href="ActHandler_8h-source.html#l00079">WM</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00092">Player::mainLoop</a>(), and <a class="el" href="ActHandler_8C-source.html#l00057">sigalarmHandler</a>(). </td> </tr></table><a name="a6" doxytag="ActHandler::sendMessage"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool ActHandler::sendMessage </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>This method sends a single string directly to the server. To make sure this message arrives, the time of one complete cycle is waited before and after the message is sent. <dl compact><dt><b>Parameters: </b><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>str</em> </td><td>string that should be sent to the server </td></tr></table></dl><dl compact><dt><b>Returns: </b><dd>true when message was sent, false otherwise </dl><p>Definition at line <a class="el" href="ActHandler_8C-source.html#l00216">216</a> of file <a class="el" href="ActHandler_8C-source.html">ActHandler.C</a>.<p>References <a class="el" href="ActHandler_8h-source.html#l00077">connection</a>, <a class="el" href="ActHandler_8C-source.html#l00078">emptyQueue</a>(), <a class="el" href="ServerSettings_8C-source.html#l01639">ServerSettings::getSimulatorStep</a>(), <a class="el" href="Connection_8C-source.html#l00210">Connection::sendMessage</a>(), and <a class="el" href="ActHandler_8h-source.html#l00078">SS</a>.<p>Referenced by <a class="el" href="Player_8C-source.html#l00512">Player::executeStringCommand</a>(), <a class="el" href="Player_8C-source.html#l00058">Player::Player</a>(), and <a class="el" href="ActHandler_8C-source.html#l00204">sendCommand</a>(). </td> </tr></table><a name="a8" doxytag="ActHandler::sendMessageDirect"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool ActHandler::sendMessageDirect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname1" valign="top" nowrap> <em>str</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -