Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * enums.h - World Info Transceiver Enums 00004 * 00005 * Created: Wed Apr 09 17:01:54 2008 00006 * Copyright 2006-2008 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __NETCOMM_WORLDINFO_ENUMS_H_ 00025 #define __NETCOMM_WORLDINFO_ENUMS_H_ 00026 00027 namespace fawkes { 00028 00029 /** Game states for RoboCup MSL. */ 00030 typedef enum { 00031 GS_FROZEN = 0, /**< Frozen, nothing moves */ 00032 GS_PLAY = 1, /**< Play, normal play */ 00033 GS_KICK_OFF = 2, /**< Kick off */ 00034 GS_DROP_BALL = 3, /**< Referee drops ball, both teams can wrestle for the ball */ 00035 GS_PENALTY = 4, /**< Penalty kick */ 00036 GS_CORNER_KICK = 5, /**< Corner kick */ 00037 GS_THROW_IN = 6, /**< Throw in */ 00038 GS_FREE_KICK = 7, /**< Free kick */ 00039 GS_GOAL_KICK = 8, /**< Goal kick */ 00040 GS_HALF_TIME = 9 /**< Half time */ 00041 } worldinfo_msl_gamestate_t; 00042 00043 /** Game states for RoboCup SPL. */ 00044 typedef enum { 00045 GS_SPL_INITIAL = 0, /**< Initial setup phase. */ 00046 GS_SPL_READY = 1, /**< Move to kick-off positions. */ 00047 GS_SPL_SET = 2, /**< Wait for kick-off. */ 00048 GS_SPL_PLAY = 3, /**< Play! */ 00049 GS_SPL_FINISHED = 4 /**< Corner kick */ 00050 } worldinfo_spl_gamestate_t; 00051 00052 00053 /** Team. */ 00054 typedef enum { 00055 TEAM_NONE = 0, /**< No team, not team-specific */ 00056 TEAM_CYAN = 1, /**< Cyan team */ 00057 TEAM_MAGENTA = 2, /**< Magenta team */ 00058 TEAM_BOTH = 3 /**< Both teams */ 00059 } worldinfo_gamestate_team_t; 00060 00061 00062 /** Goal color. */ 00063 typedef enum { 00064 GOAL_BLUE = 0, /**< Blue goal */ 00065 GOAL_YELLOW = 1 /**< Yellow goal */ 00066 } worldinfo_gamestate_goalcolor_t; 00067 00068 00069 /** Game time half. */ 00070 typedef enum { 00071 HALF_FIRST = 0, /**< First half */ 00072 HALF_SECOND = 1 /**< Second half */ 00073 } worldinfo_gamestate_half_t; 00074 00075 /** Robot penalty code. */ 00076 typedef enum { 00077 PENALTY_NONE = 0, /**< No penalty. */ 00078 PENALTY_BALL_HOLDING = 1, /**< Robot hold the ball. */ 00079 PENALTY_GOALIE_PUSHING = 2, /**< Robot pushed the goalie. */ 00080 PENALTY_PLAYER_PUSHING = 3, /**< Robot pushed a player. */ 00081 PENALTY_ILLEGAL_DEFENDER = 4, /**< Robot is an illegal defender. */ 00082 PENALTY_ILLEGAL_DEFENSE = 5, /**< Illegal defense. */ 00083 PENALTY_OBSTRUCTION = 6, /**< Robot obstructs path way. */ 00084 PENALTY_REQ_FOR_PICKUP = 7, /**< Robot was requested for pick up. */ 00085 PENALTY_LEAVING = 8, /**< Robot has to leave. */ 00086 PENALTY_DAMAGE = 9, /**< Robot is damaged. */ 00087 PENALTY_MANUAL = 10 /**< Manually penalized. */ 00088 } worldinfo_penalty_t; 00089 00090 const char * worldinfo_msl_gamestate_tostring(worldinfo_msl_gamestate_t gamestate); 00091 const char * worldinfo_spl_gamestate_tostring(worldinfo_spl_gamestate_t gamestate); 00092 const char * worldinfo_gamestate_team_tostring(worldinfo_gamestate_team_t team); 00093 const char * worldinfo_gamestate_goalcolor_tostring(worldinfo_gamestate_goalcolor_t goal_color); 00094 const char * worldinfo_gamestate_half_tostring(worldinfo_gamestate_half_t half); 00095 00096 const char * worldinfo_penalty_tostring(worldinfo_penalty_t penalty); 00097 00098 } // end namespace fawkes 00099 00100 #endif