RefBoxStateHandler Class Reference

Referee Box state handler for RefBoxProcessor. More...

#include <processor/state_handler.h>

Inheritance diagram for RefBoxStateHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~RefBoxStateHandler ()
 Empty destructor.
virtual void set_gamestate (int game_state, fawkes::worldinfo_gamestate_team_t state_team)=0
 Set current game state.
virtual void set_score (unsigned int score_cyan, unsigned int score_magenta)=0
 Set score.
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.
virtual void set_half (fawkes::worldinfo_gamestate_half_t half, bool kickoff=false)=0
 Set current half of the game time.
virtual void add_penalty (unsigned int penalty, unsigned int seconds_remaining)=0
 Add penalty.
virtual void handle_refbox_state ()=0
 Process the information set up to now.

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 (  )  [virtual]

Empty destructor.

Definition at line 62 of file state_handler.cpp.


Member Function Documentation

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

Add penalty.

Parameters:
penalty penalty code
seconds_remaining estimated time when the penalty will be lifted

Implemented in RefBoxCommThread.

void RefBoxStateHandler::handle_refbox_state (  )  [pure virtual]

Process the information set up to now.

Implemented in RefBoxCommThread.

Referenced by SplRefBoxProcessor::run().

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

Set current game state.

Parameters:
game_state current game state
state_team team referenced by the game state

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process().

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

Set current half of the game time.

Parameters:
half current half
kickoff whether we have kickoff

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process().

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

Set score.

Parameters:
score_cyan current score of team cyan
score_magenta current score of team magenta

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process().

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_team our team color
goal_color our goal color

Implemented in RefBoxCommThread.

Referenced by RemoteBlackBoardRefBoxProcessor::refbox_process().


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1