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 bool | check_connection ()=0 |
Check if the connection is alive and reconnect. More... | |
virtual void | refbox_process ()=0 |
Process incoming refbox communication. 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 | ||
) |
|
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 216 of file spl.cpp.
References fawkes::Exception::get_errno(), spl_gamecontrol_t::header, fawkes::Logger::log_warn(), and spl_gamecontrol_t::version.
void SplRefBoxProcessor::run | ( | ) |
Run.
Reads messages from the network, processes them and calls the refbox state sender.
Definition at line 245 of file spl.cpp.
References RefBoxProcessor::_rsh, and RefBoxStateHandler::handle_refbox_state().