gusimplewhiteboard
GCGameState.hpp File Reference
#include <cstdlib>
#include <stdint.h>
#include <sys/types.h>
#include <sstream>
#include <gu_util.h>
Include dependency graph for GCGameState.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  guWhiteboard::RobotPenaltyState
 
class  guWhiteboard::GCGameState
 WB Class to record game state received from the Game Controller. More...
 

Namespaces

namespace  guWhiteboard
 /file APM_Interface.h
 

Macros

#define SPL_NUM_PLAYERS   6
 
#define SPL_NUM_TEAMS   2
 
#define DEFAULT_PLAYER_NUMBER   2
 
#define MIPAL_TEAM_NO   11
 
#define kGSTeamHome   "HomeTeam"
 
#define kGSTeamAway   "AwayTeam"
 
#define kGSFirstHalf   "FirstHalf"
 
#define kGSSecondHalf   "SecondHalf"
 
#define kGSNormalGame   "NormalGame"
 
#define kGSMixedTeam   "MixedTeams"
 
#define kGSDropIn   "Drop In"
 
#define kGSPenaltyShots   "PenaltyShots"
 
#define kGSOverTime   "OverTime"
 
#define kGSTimeOut   "TimeOut"
 
#define kGSInitialReceived   "InitialReceived"
 
#define kGSReadyReceived   "ReadyReceived"
 
#define kGSSetReceived   "SetReceived"
 
#define kGSPlayingReceived   "PlayingReceived"
 
#define kGSFinishedReceived   "FinishedReceived"
 
#define kGSInitial   "GSInitial"
 
#define kGSReady   "GSReady"
 
#define kGSSet   "GSSet"
 
#define kGSPlaying   "GSPlaying"
 
#define kGSFinished   "GSFinished"
 
#define kGSNoSetPlay   "GSNoSetPlay"
 
#define kGSGoalFreeKick   "GSGoalFreeKick"
 
#define kGSPushingFreeKick   "GSPushingFreeKick"
 
#define kGSCornerKick   "GSCornerKick"
 
#define kGSKickIn   "GSKickIn"
 
#define kGSNoPenalty   "NoPenalty"
 
#define kGSIllegalBallContact   "IllegalBallContact"
 
#define kGSPlayerPushing   "PlayerPushing"
 
#define kGSIllegalMotionInSet   "IllegalMotionInSet"
 
#define kGSInactivePlayer   "InactivePlayer"
 
#define kGSIllegalDefender   "IllegalDefender"
 
#define kGSLeavingTheField   "LeavingTheField"
 
#define kGSKickOffGoal   "KickOffGoal"
 
#define kGSRequestForPickup   "RequestForPickup"
 
#define kGSLocalGameStuck   "LocalGameStuck"
 
#define kGSIllegalPositioning   "IllegalPositioning"
 
#define kGSSubstitutionPenalty   "SubstitutionPenalty"
 
#define kGSManualPenalty   "ManualPenalty"
 
#define kNoGSsignal   "NoGSsignal"
 
#define kGSOurGoalSignalPushed   "GSOurGoalSignalPushed"
 
#define kGSTheirGoalSignalPushed   "GSTheirGoalSignalPushed"
 
#define kGSBlueKickOffSignalPushed   "GSBlueKickOffSignalPushed"
 
#define kGSRedKickOffSignalPushed   "GSRedKickOffSignalPushed"
 

Enumerations

enum  guWhiteboard::TeamColors : int8_t {
  guWhiteboard::BLUE =0 , guWhiteboard::RED , guWhiteboard::YELLOW , guWhiteboard::BLACK ,
  guWhiteboard::WHITE , guWhiteboard::GREEN , guWhiteboard::ORANGE , guWhiteboard::PURPLE ,
  guWhiteboard::BROWN , guWhiteboard::GRAY , guWhiteboard::NUM_JERSEY_COLORS
}
 Team Colours. More...
 
enum  guWhiteboard::CompetitionType : int8_t { guWhiteboard::NormalCompetition , guWhiteboard::MixedTeam , guWhiteboard::NUM_COMPETITION_TYPES }
 Type of the competition. More...
 
enum  guWhiteboard::CompetitionPhase : int8_t { guWhiteboard::RoundRobin , guWhiteboard::PlayOff , guWhiteboard::NUM_COMPETITION_PHASES }
 Phase of the competition. More...
 
enum  guWhiteboard::GamePhase : int8_t { guWhiteboard::NormalPhase , guWhiteboard::PenaltyShoot , guWhiteboard::Overtime , guWhiteboard::Timeout }
 Phase of the game. More...
 
enum  guWhiteboard::GameState : int8_t {
  guWhiteboard::Initial , guWhiteboard::Ready , guWhiteboard::Set , guWhiteboard::Playing ,
  guWhiteboard::Finished , guWhiteboard::NUM_GAME_STATES
}
 High level Game Controller states. More...
 
enum  guWhiteboard::SetPlay : int8_t {
  guWhiteboard::NoSetPlay , guWhiteboard::GoalFreeKick , guWhiteboard::PushingFreeKick , guWhiteboard::CornerKick ,
  guWhiteboard::KickIn , guWhiteboard::NUM_SET_PLAY_TYPES
}
 Set play codes. More...
 
enum  guWhiteboard::PenaltyTypes : int8_t {
  guWhiteboard::NoPenalty = 0 , guWhiteboard::IllegalBallContact , guWhiteboard::PlayerPushing , guWhiteboard::IllegalMotionInSet ,
  guWhiteboard::InactivePlayer , guWhiteboard::IllegalDefender , guWhiteboard::LeavingTheField , guWhiteboard::KickOffGoal ,
  guWhiteboard::RequestForPickUp , guWhiteboard::LocalGameStuck , guWhiteboard::IllegalPositioning , guWhiteboard::SubstitutionPenalty = 14 ,
  guWhiteboard::ManualPenalty = 15
}
 Penalty types. More...
 
enum  guWhiteboard::HomeAway : int8_t { guWhiteboard::Home =0 , guWhiteboard::Away =1 }
 Used to nominate which team is home/away and to decouple game state from team specifics. More...
 
enum  guWhiteboard::GameHalf : int8_t { guWhiteboard::SecondHalf , guWhiteboard::FirstHalf }
 Soccer games comprise of two halves. More...
 
enum  guWhiteboard::BallOut : int8_t { guWhiteboard::OutByHome , guWhiteboard::OutByAway }
 Who kicked the ball out. More...
 
enum  guWhiteboard::GameControllerCommand : int8_t {
  guWhiteboard::InitialReceived , guWhiteboard::ReadyReceived , guWhiteboard::SetReceived , guWhiteboard::PlayingReceived ,
  guWhiteboard::FinishedReceived
}
 received command from the Game Controller More...
 
enum  guWhiteboard::GameContollerSignal : int8_t {
  guWhiteboard::NoGSsignal , guWhiteboard::GSOurGoalSignalPushed , guWhiteboard::GSTheirGoalSignalPushed , guWhiteboard::GSBlueKickOffSignalPushed ,
  guWhiteboard::GSRedKickOffSignalPushed
}
 major game event signals (goals, kick-offs) More...
 

Macro Definition Documentation

◆ DEFAULT_PLAYER_NUMBER

#define DEFAULT_PLAYER_NUMBER   2

Definition at line 70 of file GCGameState.hpp.

◆ kGSBlueKickOffSignalPushed

#define kGSBlueKickOffSignalPushed   "GSBlueKickOffSignalPushed"

Definition at line 125 of file GCGameState.hpp.

◆ kGSCornerKick

#define kGSCornerKick   "GSCornerKick"

Definition at line 103 of file GCGameState.hpp.

◆ kGSDropIn

#define kGSDropIn   "Drop In"

Definition at line 82 of file GCGameState.hpp.

◆ kGSFinished

#define kGSFinished   "GSFinished"

Definition at line 98 of file GCGameState.hpp.

◆ kGSFinishedReceived

#define kGSFinishedReceived   "FinishedReceived"

Definition at line 92 of file GCGameState.hpp.

◆ kGSFirstHalf

#define kGSFirstHalf   "FirstHalf"

Definition at line 77 of file GCGameState.hpp.

◆ kGSGoalFreeKick

#define kGSGoalFreeKick   "GSGoalFreeKick"

Definition at line 101 of file GCGameState.hpp.

◆ kGSIllegalBallContact

#define kGSIllegalBallContact   "IllegalBallContact"

Definition at line 108 of file GCGameState.hpp.

◆ kGSIllegalDefender

#define kGSIllegalDefender   "IllegalDefender"

Definition at line 112 of file GCGameState.hpp.

◆ kGSIllegalMotionInSet

#define kGSIllegalMotionInSet   "IllegalMotionInSet"

Definition at line 110 of file GCGameState.hpp.

◆ kGSIllegalPositioning

#define kGSIllegalPositioning   "IllegalPositioning"

Definition at line 117 of file GCGameState.hpp.

◆ kGSInactivePlayer

#define kGSInactivePlayer   "InactivePlayer"

Definition at line 111 of file GCGameState.hpp.

◆ kGSInitial

#define kGSInitial   "GSInitial"

Definition at line 94 of file GCGameState.hpp.

◆ kGSInitialReceived

#define kGSInitialReceived   "InitialReceived"

Definition at line 88 of file GCGameState.hpp.

◆ kGSKickIn

#define kGSKickIn   "GSKickIn"

Definition at line 104 of file GCGameState.hpp.

◆ kGSKickOffGoal

#define kGSKickOffGoal   "KickOffGoal"

Definition at line 114 of file GCGameState.hpp.

◆ kGSLeavingTheField

#define kGSLeavingTheField   "LeavingTheField"

Definition at line 113 of file GCGameState.hpp.

◆ kGSLocalGameStuck

#define kGSLocalGameStuck   "LocalGameStuck"

Definition at line 116 of file GCGameState.hpp.

◆ kGSManualPenalty

#define kGSManualPenalty   "ManualPenalty"

Definition at line 119 of file GCGameState.hpp.

◆ kGSMixedTeam

#define kGSMixedTeam   "MixedTeams"

Definition at line 81 of file GCGameState.hpp.

◆ kGSNoPenalty

#define kGSNoPenalty   "NoPenalty"

Definition at line 107 of file GCGameState.hpp.

◆ kGSNormalGame

#define kGSNormalGame   "NormalGame"

Definition at line 80 of file GCGameState.hpp.

◆ kGSNoSetPlay

#define kGSNoSetPlay   "GSNoSetPlay"

Definition at line 100 of file GCGameState.hpp.

◆ kGSOurGoalSignalPushed

#define kGSOurGoalSignalPushed   "GSOurGoalSignalPushed"

Definition at line 123 of file GCGameState.hpp.

◆ kGSOverTime

#define kGSOverTime   "OverTime"

Definition at line 85 of file GCGameState.hpp.

◆ kGSPenaltyShots

#define kGSPenaltyShots   "PenaltyShots"

Definition at line 84 of file GCGameState.hpp.

◆ kGSPlayerPushing

#define kGSPlayerPushing   "PlayerPushing"

Definition at line 109 of file GCGameState.hpp.

◆ kGSPlaying

#define kGSPlaying   "GSPlaying"

Definition at line 97 of file GCGameState.hpp.

◆ kGSPlayingReceived

#define kGSPlayingReceived   "PlayingReceived"

Definition at line 91 of file GCGameState.hpp.

◆ kGSPushingFreeKick

#define kGSPushingFreeKick   "GSPushingFreeKick"

Definition at line 102 of file GCGameState.hpp.

◆ kGSReady

#define kGSReady   "GSReady"

Definition at line 95 of file GCGameState.hpp.

◆ kGSReadyReceived

#define kGSReadyReceived   "ReadyReceived"

Definition at line 89 of file GCGameState.hpp.

◆ kGSRedKickOffSignalPushed

#define kGSRedKickOffSignalPushed   "GSRedKickOffSignalPushed"

Definition at line 126 of file GCGameState.hpp.

◆ kGSRequestForPickup

#define kGSRequestForPickup   "RequestForPickup"

Definition at line 115 of file GCGameState.hpp.

◆ kGSSecondHalf

#define kGSSecondHalf   "SecondHalf"

Definition at line 78 of file GCGameState.hpp.

◆ kGSSet

#define kGSSet   "GSSet"

Definition at line 96 of file GCGameState.hpp.

◆ kGSSetReceived

#define kGSSetReceived   "SetReceived"

Definition at line 90 of file GCGameState.hpp.

◆ kGSSubstitutionPenalty

#define kGSSubstitutionPenalty   "SubstitutionPenalty"

Definition at line 118 of file GCGameState.hpp.

◆ kGSTeamAway

#define kGSTeamAway   "AwayTeam"

Definition at line 75 of file GCGameState.hpp.

◆ kGSTeamHome

#define kGSTeamHome   "HomeTeam"

Definition at line 74 of file GCGameState.hpp.

◆ kGSTheirGoalSignalPushed

#define kGSTheirGoalSignalPushed   "GSTheirGoalSignalPushed"

Definition at line 124 of file GCGameState.hpp.

◆ kGSTimeOut

#define kGSTimeOut   "TimeOut"

Definition at line 86 of file GCGameState.hpp.

◆ kNoGSsignal

#define kNoGSsignal   "NoGSsignal"

Definition at line 122 of file GCGameState.hpp.

◆ MIPAL_TEAM_NO

#define MIPAL_TEAM_NO   11

Definition at line 72 of file GCGameState.hpp.

◆ SPL_NUM_PLAYERS

#define SPL_NUM_PLAYERS   6

Definition at line 67 of file GCGameState.hpp.

◆ SPL_NUM_TEAMS

#define SPL_NUM_TEAMS   2

Definition at line 68 of file GCGameState.hpp.