Fawkes API  Fawkes Development Version
enums.h
1 
2 /***************************************************************************
3  * enums.h - World Info Transceiver Enums
4  *
5  * Created: Wed Apr 09 17:01:54 2008
6  * Copyright 2006-2008 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __REFBOXCOMM_ENUMS_H_
25 #define __REFBOXCOMM_ENUMS_H_
26 
27 namespace fawkes {
28 
29 /** Game states for RoboCup MSL. */
30 typedef enum {
31  GS_FROZEN = 0, /**< Frozen, nothing moves */
32  GS_PLAY = 1, /**< Play, normal play */
33  GS_KICK_OFF = 2, /**< Kick off */
34  GS_DROP_BALL = 3, /**< Referee drops ball, both teams can wrestle for the ball */
35  GS_PENALTY = 4, /**< Penalty kick */
36  GS_CORNER_KICK = 5, /**< Corner kick */
37  GS_THROW_IN = 6, /**< Throw in */
38  GS_FREE_KICK = 7, /**< Free kick */
39  GS_GOAL_KICK = 8, /**< Goal kick */
40  GS_HALF_TIME = 9 /**< Half time */
42 
43 /** Game states for RoboCup SPL. */
44 typedef enum {
45  GS_SPL_INITIAL = 0, /**< Initial setup phase. */
46  GS_SPL_READY = 1, /**< Move to kick-off positions. */
47  GS_SPL_SET = 2, /**< Wait for kick-off. */
48  GS_SPL_PLAY = 3, /**< Play! */
49  GS_SPL_FINISHED = 4 /**< Corner kick */
51 
52 
53 /** Team. */
54 typedef enum {
55  TEAM_NONE = 0, /**< No team, not team-specific */
56  TEAM_CYAN = 1, /**< Cyan team */
57  TEAM_MAGENTA = 2, /**< Magenta team */
58  TEAM_BOTH = 3 /**< Both teams */
60 
61 
62 /** Goal color. */
63 typedef enum {
64  GOAL_BLUE = 0, /**< Blue goal */
65  GOAL_YELLOW = 1 /**< Yellow goal */
67 
68 
69 /** Game time half. */
70 typedef enum {
71  HALF_FIRST = 0, /**< First half */
72  HALF_SECOND = 1 /**< Second half */
74 
75 /** Robot penalty code. */
76 typedef enum {
77  PENALTY_NONE = 0, /**< No penalty. */
78  PENALTY_BALL_HOLDING = 1, /**< Robot hold the ball. */
79  PENALTY_GOALIE_PUSHING = 2, /**< Robot pushed the goalie. */
80  PENALTY_PLAYER_PUSHING = 3, /**< Robot pushed a player. */
81  PENALTY_ILLEGAL_DEFENDER = 4, /**< Robot is an illegal defender. */
82  PENALTY_ILLEGAL_DEFENSE = 5, /**< Illegal defense. */
83  PENALTY_OBSTRUCTION = 6, /**< Robot obstructs path way. */
84  PENALTY_REQ_FOR_PICKUP = 7, /**< Robot was requested for pick up. */
85  PENALTY_LEAVING = 8, /**< Robot has to leave. */
86  PENALTY_DAMAGE = 9, /**< Robot is damaged. */
87  PENALTY_MANUAL = 10 /**< Manually penalized. */
89 
95 
97 
98 } // end namespace fawkes
99 
100 #endif
Kick off.
Definition: enums.h:33
Robot was requested for pick up.
Definition: enums.h:84
Blue goal.
Definition: enums.h:64
Goal kick.
Definition: enums.h:39
Robot is an illegal defender.
Definition: enums.h:81
Robot has to leave.
Definition: enums.h:85
Manually penalized.
Definition: enums.h:87
Robot pushed a player.
Definition: enums.h:80
Robot pushed the goalie.
Definition: enums.h:79
Robot obstructs path way.
Definition: enums.h:83
Referee drops ball, both teams can wrestle for the ball.
Definition: enums.h:34
No team, not team-specific.
Definition: enums.h:55
Throw in.
Definition: enums.h:37
Fawkes library namespace.
worldinfo_penalty_t
Robot penalty code.
Definition: enums.h:76
Robot is damaged.
Definition: enums.h:86
Illegal defense.
Definition: enums.h:82
Yellow goal.
Definition: enums.h:65
Magenta team.
Definition: enums.h:57
Play, normal play.
Definition: enums.h:32
First half.
Definition: enums.h:71
worldinfo_gamestate_half_t
Game time half.
Definition: enums.h:70
const char * worldinfo_gamestate_team_tostring(worldinfo_gamestate_team_t team)
Convert gamestate team to a string.
Definition: enums.cpp:75
const char * worldinfo_msl_gamestate_tostring(worldinfo_msl_gamestate_t gamestate)
Convert MSL gamestate to a string.
Definition: enums.cpp:35
Both teams.
Definition: enums.h:58
Frozen, nothing moves.
Definition: enums.h:31
worldinfo_msl_gamestate_t
Game states for RoboCup MSL.
Definition: enums.h:30
Second half.
Definition: enums.h:72
Penalty kick.
Definition: enums.h:35
const char * worldinfo_gamestate_goalcolor_tostring(worldinfo_gamestate_goalcolor_t goal_color)
Convert goal color to a string.
Definition: enums.cpp:92
Half time.
Definition: enums.h:40
Corner kick.
Definition: enums.h:49
Cyan team.
Definition: enums.h:56
worldinfo_gamestate_team_t
Team.
Definition: enums.h:54
worldinfo_spl_gamestate_t
Game states for RoboCup SPL.
Definition: enums.h:44
No penalty.
Definition: enums.h:77
const char * worldinfo_spl_gamestate_tostring(worldinfo_spl_gamestate_t gamestate)
Convert MSL gamestate to a string.
Definition: enums.cpp:57
Wait for kick-off.
Definition: enums.h:47
const char * worldinfo_penalty_tostring(worldinfo_penalty_t penalty)
Convert penalty to a string.
Definition: enums.cpp:123
Move to kick-off positions.
Definition: enums.h:46
const char * worldinfo_gamestate_half_tostring(worldinfo_gamestate_half_t half)
Convert half time to a string.
Definition: enums.cpp:108
Free kick.
Definition: enums.h:38
Initial setup phase.
Definition: enums.h:45
Robot hold the ball.
Definition: enums.h:78
worldinfo_gamestate_goalcolor_t
Goal color.
Definition: enums.h:63
Corner kick.
Definition: enums.h:36