Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# GameControlData Class Reference

Encapsulates the RoboCupGameControlData struct for the GT2005 project. More...

`#include <GameControlData.h>`

List of all members.

## Public Types
enum | State { initial = STATE_INITIAL, ready = STATE_READY, set = STATE_SET, playing = STATE_PLAYING, finished = STATE_FINISHED }
enum | Penalties { notPenalized = PENALTY_NONE, illegalDefender = PENALTY_ILLEGAL_DEFENDER, illegalDefense = PENALTY_ILLEGAL_DEFENSE, obstruction = PENALTY_OBSTRUCTION, goaliePushing = PENALTY_GOALIE_PUSHING, playerPushing = PENALTY_PLAYER_PUSHING, ballHolding = PENALTY_BALL_HOLDING, requestForPickup = PENALTY_REQ_FOR_PICKUP, leaving = PENALTY_LEAVING, damage = PENALTY_DAMAGE, numOfPenalties }
enum | KickoffTeam { undefinedTeam, ownTeam, opponentTeam }
## Public Member Functions
| GameControlData ()
| Constuctor.
Penalties | getPenalty (Player player=getPlayer()) const
| returns the penalty of the player
unsigned int | getOwnTeamNumber (Player player=getPlayer()) const
| returns the number (0,1) of the data.teams -array the robot belongs to.
const TeamInfo & | getOwnTeam (Player player=getPlayer()) const
| returns a reference to the teamInfo of the team of the Player
TeamInfo & | getOwnTeam (Player player=getPlayer())
unsigned int | getOpponentTeamNumber (Player player=getPlayer()) const
| returns the number (0,1) of the data.teams -array of the robots opponents.
const RobotInfo & | getRobot (Player player=getPlayer()) const
| returns the robot-info for a player *
RobotInfo & | getRobot (Player player=getPlayer())
const TeamInfo & | getOpponentTeam (Player player=getPlayer()) const
| returns a reference to the teamInfo of the team of the robots opponents
TeamInfo & | getOpponentTeam (Player Player=getPlayer())
KickoffTeam | getKickoffTeam (Player player=getPlayer()) const
| returns the Kickoff-Team as own/opponent
const TeamInfo & | getTeamByNumber (int number) const
| returns the Team by the GameControlerTeamNumber)
TeamInfo & | getTeamByNumber (int number)
const TeamInfo & | getTeamByColor (int color) const
TeamInfo & | getTeamByColor (int color)
bool | operator== (const GameControlData &other)
| the == operator
bool | operator!= (const GameControlData &other)
| the != operator
## Static Public Member Functions
const char * | getStateName (State state)
| returns the name of the state
const char * | getKickoffTeamName (KickoffTeam kickoffTeam)
| returns the name for the variable kickoff
const char * | getPenaltyName (Penalties penalty)
| returns the name of the current penalty
## Public Attributes
RoboCupGameControlData | data
| The data send by the game-controller.
bool | switchOff
unsigned long | timeStamp
| The timestamp when the last request was received.

## Detailed Description

Encapsulates the RoboCupGameControlData struct for the GT2005 project.

Author:
  Michael Wachter

Definition at line 25 of file GameControlData.h.

## Member Enumeration Documentation

enum GameControlData::State

  | Enumeration values:
  initial |
  ready |
  set |
  playing |
  finished |
Definition at line 28 of file GameControlData.h.

enum GameControlData::Penalties

  | Enumeration values:
  notPenalized |
  illegalDefender |
  illegalDefense |
  obstruction |
  goaliePushing |
  playerPushing |
  ballHolding |
  requestForPickup |
  leaving |
  damage |
  numOfPenalties |
Definition at line 37 of file GameControlData.h. Referenced by getPenalty().

enum GameControlData::KickoffTeam

  | Enumeration values:
  undefinedTeam |
  ownTeam |
  opponentTeam |
Definition at line 52 of file GameControlData.h. Referenced by getKickoffTeam().

## Constructor & Destructor Documentation

GameControlData::GameControlData | ( |  | ) |

| Constuctor. Definition at line 14 of file GameControlData.cpp. References notPenalized.

## Member Function Documentation

const char * GameControlData::getStateName | ( | State | state | ) | `[static]`

| returns the name of the state Definition at line 143 of file GameControlData.cpp. References ready, set, and State.

const char * GameControlData::getKickoffTeamName | ( | KickoffTeam | kickoffTeam | ) | `[static]`

| returns the name for the variable kickoff Definition at line 157 of file GameControlData.cpp. References opponentTeam, and ownTeam.

const char * GameControlData::getPenaltyName | ( | Penalties | penalty | ) | `[static]`

| returns the name of the current penalty Definition at line 127 of file GameControlData.cpp. References ballHolding, goaliePushing, illegalDefender, illegalDefense, notPenalized, obstruction, playerPushing, and requestForPickup.

GameControlData::Penalties GameControlData::getPenalty | ( | Player | player = getPlayer() | ) | const

| returns the penalty of the player Definition at line 82 of file GameControlData.cpp. References getRobot(), and Penalties.

Here is the call graph for this function:

unsigned int GameControlData::getOwnTeamNumber | ( | Player | player = getPlayer() | ) | const

| returns the number (0,1) of the data.teams -array the robot belongs to. Definition at line 39 of file GameControlData.cpp. References Player::getGameControllerTeamNumber(), and uint32. Referenced by getKickoffTeam(), and getOwnTeam().

Here is the call graph for this function:

const TeamInfo & GameControlData::getOwnTeam | ( | Player | player = getPlayer() | ) | const

| returns a reference to the teamInfo of the team of the Player Definition at line 50 of file GameControlData.cpp. References getOwnTeamNumber(). Referenced by RoboCupGameManagerSymbols::getOwnScore(), getRobot(), and RoboCupGameManagerSymbols::update().

Here is the call graph for this function:

TeamInfo & GameControlData::getOwnTeam | ( | Player | player = getPlayer() | ) |

| Definition at line 55 of file GameControlData.cpp. References getOwnTeamNumber().

Here is the call graph for this function:

unsigned int GameControlData::getOpponentTeamNumber | ( | Player | player = getPlayer() | ) | const

| returns the number (0,1) of the data.teams -array of the robots opponents. Definition at line 45 of file GameControlData.cpp. References Player::getGameControllerTeamNumber(), and uint32. Referenced by getOpponentTeam().

Here is the call graph for this function:

const RobotInfo & GameControlData::getRobot | ( | Player | player = getPlayer() | ) | const

| returns the robot-info for a player * Definition at line 88 of file GameControlData.cpp. References getOwnTeam(), and Player::getPlayerNumber(). Referenced by GT2005TeamBallLocator::execute(), GT2005SelfLocator::execute(), getPenalty(), and RoboCupGameManagerSymbols::getState().

Here is the call graph for this function:

RobotInfo & GameControlData::getRobot | ( | Player | player = getPlayer() | ) |

| Definition at line 93 of file GameControlData.cpp. References getOwnTeam(), and Player::getPlayerNumber().

Here is the call graph for this function:

const TeamInfo & GameControlData::getOpponentTeam | ( | Player | player = getPlayer() | ) | const

| returns a reference to the teamInfo of the team of the robots opponents Definition at line 60 of file GameControlData.cpp. References getOpponentTeamNumber(). Referenced by RoboCupGameManagerSymbols::getOpponentScore(), GT2005ConfigurationSymbols::update(), and RoboCupGameManagerSymbols::update().

Here is the call graph for this function:

TeamInfo & GameControlData::getOpponentTeam | ( | Player | Player = getPlayer() | ) |

| Definition at line 65 of file GameControlData.cpp. References getOpponentTeamNumber().

Here is the call graph for this function:

GameControlData::KickoffTeam GameControlData::getKickoffTeam | ( | Player | player = getPlayer() | ) | const

| returns the Kickoff-Team as own/opponent Definition at line 70 of file GameControlData.cpp. References getOwnTeamNumber(), KickoffTeam, opponentTeam, and ownTeam. Referenced by RoboCupGameManagerSymbols::getKickoff(), and GT2005ConfigurationSymbols::getTimeToReachKickoffPose().

Here is the call graph for this function:

const TeamInfo & GameControlData::getTeamByNumber | ( | int | number | ) | const

| returns the Team by the GameControlerTeamNumber) Definition at line 98 of file GameControlData.cpp. References uint32.

TeamInfo & GameControlData::getTeamByNumber | ( | int | number | ) |

| Definition at line 104 of file GameControlData.cpp. References uint32.

const TeamInfo & GameControlData::getTeamByColor | ( | int | color | ) | const

| Definition at line 110 of file GameControlData.cpp. References uint32.

TeamInfo & GameControlData::getTeamByColor | ( | int | color | ) |

| Definition at line 116 of file GameControlData.cpp. References uint32.

bool GameControlData::operator== | ( | const GameControlData & | other | ) |

| the == operator Definition at line 122 of file GameControlData.cpp. References data.

bool GameControlData::operator!= | ( | const GameControlData & | other | ) | `[inline]`

| the != operator Definition at line 108 of file GameControlData.h.

## Member Data Documentation

RoboCupGameControlData GameControlData::data`[mutable]`

| The data send by the game-controller. Definition at line 116 of file GameControlData.h. Referenced by GT2005ConfigurationSymbols::computeKickoffRole(), GT2005BallLocator::execute(), RoboCupGameManagerSymbols::getState(), operator<<(), operator==(), operator>>(), and RoboCupGameManagerSymbols::update().

bool GameControlData::switchOff`[mutable]`

| Definition at line 118 of file GameControlData.h. Referenced by operator>>().

unsigned long GameControlData::timeStamp

| The timestamp when the last request was received. Note that this value is set in the In streaming operator. Definition at line 124 of file GameControlData.h. Referenced by RoboCupGameManagerSymbols::getTimeSinceLastMessage(), operator<<(), and operator>>().

The documentation for this class was generated from the following files:

- Representations/RoboCup/GameControlData.h
- Representations/RoboCup/GameControlData.cpp