Fawkes API  Fawkes Development Version
RefBoxStateBBWriter Class Reference

RefBox repeater state writer. More...

#include "refbox_state_writer.h"

Inheritance diagram for RefBoxStateBBWriter:

Public Member Functions

 RefBoxStateBBWriter (std::vector< std::string > hosts, bool debug=false)
 Constructor. More...
 
virtual ~RefBoxStateBBWriter ()
 Destructor. More...
 
virtual void send ()
 Send worldinfo. More...
 
virtual void set_gamestate (int game_state, fawkes::worldinfo_gamestate_team_t state_team)
 Set current game state. More...
 
virtual void set_score (unsigned int score_cyan, unsigned int score_magenta)
 Set score. More...
 
virtual void set_team_goal (fawkes::worldinfo_gamestate_team_t our_team, fawkes::worldinfo_gamestate_goalcolor_t goal_color)
 Set team and goal info. More...
 
virtual void set_half (fawkes::worldinfo_gamestate_half_t half)
 Set current half of the game time. More...
 
- Public Member Functions inherited from RefBoxStateSender
 RefBoxStateSender (const char *addr, unsigned short port, const char *key, const char *iv, bool debug=false)
 Constructor. More...
 
virtual ~RefBoxStateSender ()
 Destructor. More...
 
virtual void add_penalty (unsigned int player, unsigned int penalty, unsigned int seconds_remaining)
 Add penalty. More...
 

Additional Inherited Members

- Protected Member Functions inherited from RefBoxStateSender
 RefBoxStateSender ()
 Constructor. More...
 

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
hostshosts to connect to to send game state info via remote blackboard
debugtrue 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.

References fawkes::RemoteBlackBoard::close().

Member Function Documentation

void RefBoxStateBBWriter::send ( )
virtual
void RefBoxStateBBWriter::set_half ( fawkes::worldinfo_gamestate_half_t  half)
virtual

Set current half of the game time.

Parameters
halfcurrent 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_cyancurrent score of team cyan
score_magentacurrent 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

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