Fawkes API
Fawkes Development Version
|
SPL league refbox repeater. More...
#include "processor/spl.h"
Public Member Functions | |
SplRefBoxProcessor (fawkes::Logger *logger, unsigned short int broadcast_port, unsigned int team_number, unsigned int player_number) | |
Constructor. More... | |
~SplRefBoxProcessor () | |
Destructor. More... | |
void | run () |
Run. More... | |
bool | check_connection () |
Check if the connection is alive and reconnect. More... | |
void | refbox_process () |
Process incoming refbox communication. More... | |
![]() | |
virtual | ~RefBoxProcessor () |
Pure virtual destructor. More... | |
virtual void | set_handler (RefBoxStateHandler *rsh) |
Set handler. More... | |
Additional Inherited Members | |
![]() | |
RefBoxStateHandler * | _rsh |
Refbox state handler, set via set_handler() More... | |
SPL league refbox repeater.
This class will listen to SPL refbox commands and derive matching game states from the communication stream and send this via the world info.
SplRefBoxProcessor::SplRefBoxProcessor | ( | fawkes::Logger * | logger, |
unsigned short int | broadcast_port, | ||
unsigned int | team_number, | ||
unsigned int | player_number | ||
) |
Constructor.
logger | Logger |
broadcast_port | Broadcast port |
team_number | our team number |
player_number | individual player number |
Definition at line 112 of file spl.cpp.
References fawkes::Socket::IPv4.
SplRefBoxProcessor::~SplRefBoxProcessor | ( | ) |
Destructor.
Definition at line 129 of file spl.cpp.
References spl_gamecontrol_t::first_half, fawkes::GOAL_BLUE, fawkes::GOAL_YELLOW, fawkes::GS_SPL_FINISHED, fawkes::GS_SPL_INITIAL, fawkes::GS_SPL_PLAY, fawkes::GS_SPL_READY, fawkes::GS_SPL_SET, fawkes::HALF_FIRST, fawkes::HALF_SECOND, spl_gamecontrol_t::kick_off_team, spl_robotinfo_t::penalty, fawkes::PENALTY_NONE, spl_teaminfo_t::players, spl_teaminfo_t::score, spl_robotinfo_t::secs_till_unpenalized, fawkes::SoccerPenaltyInterface::SPL_PENALTY_BALL_HOLDING, fawkes::SoccerPenaltyInterface::SPL_PENALTY_ILLEGAL_DEFENDER, fawkes::SoccerPenaltyInterface::SPL_PENALTY_LEAVING_THE_FIELD, fawkes::SoccerPenaltyInterface::SPL_PENALTY_MANUAL, fawkes::SoccerPenaltyInterface::SPL_PENALTY_NONE, fawkes::SoccerPenaltyInterface::SPL_PENALTY_OBSTRUCTION, fawkes::SoccerPenaltyInterface::SPL_PENALTY_PLAYER_PUSHING, fawkes::SoccerPenaltyInterface::SPL_PENALTY_REQ_FOR_PICKUP, spl_gamecontrol_t::state, fawkes::TEAM_BOTH, spl_teaminfo_t::team_color, fawkes::TEAM_CYAN, fawkes::TEAM_MAGENTA, spl_teaminfo_t::team_number, and spl_gamecontrol_t::teams.
|
virtual |
Check if the connection is alive and reconnect.
If the connection is not alive the processor shall do a single attempt to reestablish the connection.
Implements RefBoxProcessor.
|
virtual |
Process incoming refbox communication.
This shall process a (limited number of) communication packets received from the particular refbox at hand.
Implements RefBoxProcessor.
Definition at line 231 of file spl.cpp.
References fawkes::Exception::get_errno().
void SplRefBoxProcessor::run | ( | ) |