23 #ifndef __PLUGINS_REFBOXCOMM_COMM_THREAD_H_
24 #define __PLUGINS_REFBOXCOMM_COMM_THREAD_H_
26 #include "processor/state_handler.h"
28 #include <core/threading/thread.h>
29 #include <aspect/blocked_timing.h>
30 #include <aspect/logging.h>
31 #include <aspect/configurable.h>
32 #include <aspect/blackboard.h>
33 #include <aspect/blocked_timing.h>
36 class GameStateInterface;
37 class SwitchInterface;
39 class SoccerPenaltyInterface;
63 virtual void set_score(
unsigned int score_cyan,
unsigned int score_magenta);
68 unsigned int seconds_remaining);
73 protected:
virtual void run() { Thread::run(); }
84 bool __gamestate_modified;
88 unsigned int __last_score_cyan;
89 unsigned int __last_score_magenta;
92 unsigned int __team_number;
93 unsigned int __player_number;
95 bool __cfg_beep_on_change;
96 float __cfg_beep_frequency;
97 float __cfg_beep_duration;
virtual void init()
Initialize the thread.
Thread aspect to access to BlackBoard.
virtual void set_gamestate(int game_state, fawkes::worldinfo_gamestate_team_t state_team)
Set current game state.
virtual void handle_refbox_state()
Process the information set up to now.
Referee Box Communication Thread for robotic soccer.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread class encapsulation of pthreads.
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 loop()
Code to execute in the thread.
SoccerPenaltyInterface Fawkes BlackBoard Interface.
worldinfo_gamestate_half_t
Game time half.
virtual void add_penalty(unsigned int penalty, unsigned int seconds_remaining)
Add penalty.
Thread aspect to use blocked timing.
RefBoxCommThread()
Constructor.
SwitchInterface Fawkes BlackBoard Interface.
virtual void set_score(unsigned int score_cyan, unsigned int score_magenta)
Set score.
Thread aspect to log output.
Referee Box Communication Processor.
Thread aspect to access configuration data.
Referee Box state handler for RefBoxProcessor.
worldinfo_gamestate_team_t
Team.
virtual void finalize()
Finalize the thread.
GameStateInterface Fawkes BlackBoard Interface.
virtual void set_half(fawkes::worldinfo_gamestate_half_t half, bool kickoff)
Set current half of the game time.
worldinfo_gamestate_goalcolor_t
Goal color.