Fawkes API  Fawkes Development Version
RefBoxStateHandler Class Referenceabstract

Referee Box state handler for RefBoxProcessor. More...

#include "processor/state_handler.h"

Inheritance diagram for RefBoxStateHandler:

Public Member Functions

virtual ~RefBoxStateHandler ()
 Empty destructor. More...
 
virtual void set_gamestate (int game_state, fawkes::worldinfo_gamestate_team_t state_team)=0
 Set current game state. More...
 
virtual void set_score (unsigned int score_cyan, unsigned int score_magenta)=0
 Set score. More...
 
virtual void set_team_goal (fawkes::worldinfo_gamestate_team_t our_team, fawkes::worldinfo_gamestate_goalcolor_t goal_color)=0
 Set team and goal info. More...
 
virtual void set_half (fawkes::worldinfo_gamestate_half_t half, bool kickoff=false)=0
 Set current half of the game time. More...
 
virtual void add_penalty (unsigned int penalty, unsigned int seconds_remaining)=0
 Add penalty. More...
 
virtual void handle_refbox_state ()=0
 Process the information set up to now. More...
 

Detailed Description

Referee Box state handler for RefBoxProcessor.

Handlers that implement this interface are used by processors to announce received information.

Author
Tim Niemueller

Definition at line 28 of file state_handler.h.

Constructor & Destructor Documentation

◆ ~RefBoxStateHandler()

RefBoxStateHandler::~RefBoxStateHandler ( )
virtual

Empty destructor.

Definition at line 62 of file state_handler.cpp.

Member Function Documentation

◆ add_penalty()

void RefBoxStateHandler::add_penalty ( unsigned int  penalty,
unsigned int  seconds_remaining 
)
pure virtual

Add penalty.

Parameters
penaltypenalty code
seconds_remainingestimated time when the penalty will be lifted

Implemented in RefBoxCommThread.

◆ handle_refbox_state()

void RefBoxStateHandler::handle_refbox_state ( )
pure virtual

Process the information set up to now.

Implemented in RefBoxCommThread.

◆ set_gamestate()

void RefBoxStateHandler::set_gamestate ( int  game_state,
fawkes::worldinfo_gamestate_team_t  state_team 
)
pure virtual

Set current game state.

Parameters
game_statecurrent game state
state_teamteam referenced by the game state

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process(), and Msl2010RefBoxProcessor::~Msl2010RefBoxProcessor().

◆ set_half()

void RefBoxStateHandler::set_half ( fawkes::worldinfo_gamestate_half_t  half,
bool  kickoff = false 
)
pure virtual

Set current half of the game time.

Parameters
halfcurrent half
kickoffwhether we have kickoff

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process(), and Msl2010RefBoxProcessor::~Msl2010RefBoxProcessor().

◆ set_score()

void RefBoxStateHandler::set_score ( unsigned int  score_cyan,
unsigned int  score_magenta 
)
pure virtual

Set score.

Parameters
score_cyancurrent score of team cyan
score_magentacurrent score of team magenta

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process(), and Msl2010RefBoxProcessor::~Msl2010RefBoxProcessor().

◆ set_team_goal()

void RefBoxStateHandler::set_team_goal ( fawkes::worldinfo_gamestate_team_t  our_team,
fawkes::worldinfo_gamestate_goalcolor_t  goal_color 
)
pure virtual

Set team and goal info.

Parameters
our_teamour team color
goal_colorour goal color

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process().


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