RefBoxStateBBWriter Class Reference

RefBox repeater state writer. More...

#include <refbox_state_writer.h>

Inheritance diagram for RefBoxStateBBWriter:

[legend]
List of all members.

Public Member Functions

 RefBoxStateBBWriter (std::vector< std::string > hosts, bool debug=false)
 Constructor.
virtual ~RefBoxStateBBWriter ()
 Destructor.
virtual void send ()
 Send worldinfo.
virtual void set_gamestate (int game_state, fawkes::worldinfo_gamestate_team_t state_team)
 Set current game state.
virtual void set_score (unsigned int score_cyan, unsigned int score_magenta)
 Set score.
virtual void set_team_goal (fawkes::worldinfo_gamestate_team_t our_team, fawkes::worldinfo_gamestate_goalcolor_t goal_color)
 Set team and goal info.
virtual void set_half (fawkes::worldinfo_gamestate_half_t half)
 Set current half of the game time.

Detailed Description

RefBox repeater state writer.

Writes to GameStateInterfaces "WM GameState" of given hosts.

Author:
Christoph Schwering

Definition at line 37 of file refbox_state_writer.h.


Constructor & Destructor Documentation

RefBoxStateBBWriter::RefBoxStateBBWriter ( std::vector< std::string >  hosts,
bool  debug = false 
)

Constructor.

Parameters:
hosts hosts to connect to to send game state info via remote blackboard
debug true to enable debug output

Definition at line 70 of file refbox_state_writer.cpp.

References fawkes::GOAL_BLUE, fawkes::GS_FROZEN, fawkes::HALF_FIRST, fawkes::TEAM_BOTH, and fawkes::TEAM_CYAN.

RefBoxStateBBWriter::~RefBoxStateBBWriter (  )  [virtual]

Destructor.

Definition at line 91 of file refbox_state_writer.cpp.


Member Function Documentation

void RefBoxStateBBWriter::send (  )  [virtual]

Send worldinfo.

Reimplemented from RefBoxStateSender.

Definition at line 285 of file refbox_state_writer.cpp.

References fawkes::Exception::print_trace(), fawkes::GameStateInterface::score_cyan(), fawkes::GameStateInterface::set_score_cyan(), and fawkes::Interface::write().

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

Set current game state.

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

Reimplemented from RefBoxStateSender.

Definition at line 130 of file refbox_state_writer.cpp.

References fawkes::GS_CORNER_KICK, fawkes::GS_DROP_BALL, fawkes::GS_FREE_KICK, fawkes::GS_FROZEN, fawkes::GS_GOAL_KICK, fawkes::GS_HALF_TIME, fawkes::GS_KICK_OFF, fawkes::GS_PENALTY, fawkes::GS_PLAY, fawkes::GS_THROW_IN, fawkes::GameStateInterface::set_game_state(), fawkes::GameStateInterface::set_state_team(), fawkes::TEAM_BOTH, fawkes::TEAM_CYAN, fawkes::TEAM_MAGENTA, fawkes::TEAM_NONE, and fawkes::worldinfo_gamestate_team_tostring().

void RefBoxStateBBWriter::set_half ( fawkes::worldinfo_gamestate_half_t  half  )  [virtual]

Set current half of the game time.

Parameters:
half current half

Reimplemented from RefBoxStateSender.

Definition at line 262 of file refbox_state_writer.cpp.

References fawkes::HALF_FIRST, fawkes::HALF_SECOND, fawkes::GameStateInterface::set_half(), and fawkes::worldinfo_gamestate_half_tostring().

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

Set score.

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

Reimplemented from RefBoxStateSender.

Definition at line 211 of file refbox_state_writer.cpp.

References fawkes::GameStateInterface::set_score_cyan(), and fawkes::GameStateInterface::set_score_magenta().

void RefBoxStateBBWriter::set_team_goal ( fawkes::worldinfo_gamestate_team_t  our_team,
fawkes::worldinfo_gamestate_goalcolor_t  goal_color 
) [virtual]

Set team and goal info.

Parameters:
our_team our team color
goal_color our goal color

Reimplemented from RefBoxStateSender.

Definition at line 231 of file refbox_state_writer.cpp.

References fawkes::GOAL_BLUE, fawkes::GameStateInterface::set_our_goal_color(), fawkes::GameStateInterface::set_our_team(), fawkes::TEAM_CYAN, fawkes::worldinfo_gamestate_goalcolor_tostring(), and fawkes::worldinfo_gamestate_team_tostring().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:31:33 2011 for Fawkes API by  doxygen 1.4.7