00001 /** 00002 * @file RoboCupGameManagerSymbols.h 00003 * 00004 * Declaration of class RoboCupGameManagerSymbols. 00005 * 00006 * @author Matthias Jüngel 00007 */ 00008 00009 #ifndef __RoboCupGameManagerSymbols_h_ 00010 #define __RoboCupGameManagerSymbols_h_ 00011 00012 #include "../BehaviorControl.h" 00013 #include "Tools/Xabsl2/Xabsl2Engine/Xabsl2Engine.h" 00014 00015 00016 /** 00017 * The Xabsl2 symbols that are defined in "robocup-game-manager-symbols.xml" 00018 * 00019 * @author Matthias Jüngel 00020 */ 00021 class RoboCupGameManagerSymbols : public Xabsl2FunctionProvider, public BehaviorControlInterfaces 00022 { 00023 public: 00024 /* 00025 * Constructor. 00026 * @param interfaces The paramters of the BehaviorControl module. 00027 */ 00028 RoboCupGameManagerSymbols(const BehaviorControlInterfaces& interfaces); 00029 00030 /** registers the symbols at an engine */ 00031 void registerSymbols(Xabsl2Engine& engine); 00032 00033 /** updates the symbols */ 00034 void update(); 00035 00036 //!@name Input symbols 00037 //!@{ 00038 int getState(); /*!< A function for the symbol "game.state" */ 00039 int getKickoff(); /*!< A function for the symbol "game.kickoff" */ 00040 int getTeamColor(); /*!< A function for the symbol "game.team-color" */ 00041 bool getOwnTeamScored(); /*!< A function for the symbol "game.own-team-scored" */ 00042 bool getOpponentTeamScored(); /*!< A function for the symbol "game.opponent-team-scored" */ 00043 double getOwnScore(); /*!< A function for the symbol "game.own-score" */ 00044 double getOpponentScore(); /*!< A function for the symbol "game.opponent-score" */ 00045 double getTimeSinceLastMessage(); /*!< A function for the symbol "game.time-since-last-message" */ 00046 //!@} 00047 00048 /* A function for the output symbol "set-team-color". */ 00049 void setTeamColor(int teamColor); 00050 00051 private: 00052 /** the game control state we received the last time */ 00053 int lastGameControlDataState; 00054 00055 /** keeps the recent own score value */ 00056 int lastOwnScore; 00057 00058 /** keeps the recent opponent score value */ 00059 int lastOpponentScore; 00060 00061 /** keeps the time when the last own goal was shot */ 00062 unsigned long timeWhenOwnTeamScored; 00063 00064 /** keeps the time when the last opponent goal was shot */ 00065 unsigned long timeWhenOpponentTeamScored; 00066 00067 /** The current game state (set by the behavior)*/ 00068 RState currentState; 00069 }; 00070 00071 00072 #endif // __RoboCupGameManagerSymbols_h_ 00073 00074 /* 00075 * Change Log 00076 * 00077 * $Log: RoboCupGameManagerSymbols.h,v $ 00078 * Revision 1.1.1.1 2004/05/22 17:16:59 cvsadm 00079 * created new repository GT2004_WM 00080 * 00081 * Revision 1.8 2004/04/09 14:06:45 tim 00082 * integrated changes from GO2004 00083 * 00084 * Revision 1.7 2004/04/08 11:21:55 loetzsch 00085 * removed function getCurrentState from RoboCupGameManagerSymbols 00086 * 00087 * Revision 1.6 2004/04/08 10:08:42 risler 00088 * fixed and unified team color symbols 00089 * 00090 * Revision 1.5 2004/04/07 12:29:00 risler 00091 * ddd checkin after go04 - first part 00092 * 00093 * Revision 1.3 2004/04/01 18:55:53 risler 00094 * bugfix RoboCupGameManager team color interpertreted correctly 00095 * 00096 * Revision 1.2 2004/03/31 00:10:16 risler 00097 * implemented new kickoff rules 00098 * 00099 * Revision 1.1.1.1 2004/03/29 08:28:49 Administrator 00100 * initial transfer from tamara 00101 * 00102 * Revision 1.4 2004/03/25 15:49:47 tim 00103 * changed handling of current state 00104 * 00105 * Revision 1.3 2004/03/15 12:50:31 tim 00106 * Adaptions to new GameController 00107 * 00108 * Revision 1.2 2004/03/08 00:58:57 roefer 00109 * Interfaces should be const 00110 * 00111 * Revision 1.1 2003/10/22 22:18:44 loetzsch 00112 * prepared the cloning of the GT2003BehaviorControl 00113 * 00114 * Revision 1.1 2003/10/06 13:39:28 cvsadm 00115 * Created GT2004 (M.J.) 00116 * 00117 * Revision 1.2 2003/07/06 09:34:58 dueffert 00118 * *-team-scored improved! 00119 * 00120 * Revision 1.1.1.1 2003/07/02 09:40:23 cvsadm 00121 * created new repository for the competitions in Padova from the 00122 * tamara CVS (Tuesday 2:00 pm) 00123 * 00124 * removed unused solutions 00125 * 00126 * Revision 1.2 2003/05/25 22:37:02 loetzsch 00127 * finished the game state options of GT2003 00128 * 00129 * Revision 1.1 2003/05/07 17:54:46 juengel 00130 * Added missing symbols to GT2003BehaviorControl. 00131 * 00132 */ 00133