⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acthandler.h

📁 robocup 3d, a 3d base team similar to UvA 2d
💻 H
字号:
/***********************************************************************************                            In the name of Almighty                            **                                                                               **          ActHandler.h : Robocup 3D Soccer Simulation Team Zigorat             **                     (This team was previously named Gcyrus)                   **                                                                               **  Date: 03/20/2007                                                             **  Author: Mahdi Hamdarsi                                                       **  Comments: This file contains class decleration for Acthandler which handles  **            command sending to simulation server                               **                                                                               ***********************************************************************************//*! \file ActHandler.h<pre><b>File:</b>          ActHandler.h<b>Project:</b>       Robocup Soccer Simulation Team: Zigorat<b>Authors:</b>       Mahdi Hamdarsi<b>Created:</b>       03/20/2007<b>Last Revision:</b> $ID$<b>Contents:</b>      This file contains class decleration for Acthandler               which handles command sending to server.<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>03/20/2007       Mahdi           Initial version created</pre>*/#ifndef _ACTHANDLER_#define _ACTHANDLER_#include "Connection.h"      // needed for TRoboCupConnection class#include "SoccerTypes.h"     // needed for SoccerCommand/*****************************************************************************//********************** CLASS ACTHANDLER *************************************//*****************************************************************************//*! The ActHandler Class is used in the RoboCup Soccer environment to send the    commands to the soccerserver. The ActHandler contains a queue in which the    commands are put. When thinkin' finishes the commands that are currently in    the queue are converted to text strings and send to the server. It is     possible to send more than one command to the server at each time step,     Therefore internally different queues are stored. Each time a command is     put into the queue that is already there, the command is updated with the     new information. Furthermore it is also possible to directly send commands     (or text strings) to the server. These methods can be used when an     initialization or beam command has to be sent to the server and you're sure    this information is final, i.e. the message will not become better when new     information arrives from the server. */class ActHandler {  TRoboCupConnection *connection;            /*!< Connection with the server */  SoccerCommand      m_queueJointCommands[MAX_JOINTS];                                           /*!< joint commands are saved here */  SoccerCommand      m_SayCommand;                          /*!< Say command */public:   ActHandler                     ( TRoboCupConnection * c     );  // methods related to putting and sending messages using the queue  bool           putCommandInQueue( SoccerCommand command      );  void           emptyQueue       (                            );  bool           sendCommands     (                            );  // methods to send commands directly to the server  bool           sendCommand      ( const SoccerCommand & soc  ) const;  bool           sendMessage      ( const char *str            ) const;} ;#endif

⌨️ 快捷键说明

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