Fawkes API
Fawkes Development Version
|
Mid-size league refbox repeater. More...
#include "processor/msl2010.h"
Public Member Functions | |
Msl2010RefBoxProcessor (fawkes::Logger *logger, const char *refbox_host, unsigned short int refbox_port) | |
Constructor. More... | |
~Msl2010RefBoxProcessor () | |
Destructor. 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... | |
Mid-size league refbox repeater.
This class will communicate with the mid-size league refbox and derive matching game states from the communiation stream and send this via the world info.
Msl2010RefBoxProcessor::Msl2010RefBoxProcessor | ( | fawkes::Logger * | logger, |
const char * | refbox_host, | ||
unsigned short int | refbox_port | ||
) |
Constructor.
logger | logger for output |
refbox_host | refbox host |
refbox_port | refbox port |
Definition at line 108 of file msl2010.cpp.
Msl2010RefBoxProcessor::~Msl2010RefBoxProcessor | ( | ) |
Destructor.
Definition at line 129 of file msl2010.cpp.
References RefBoxProcessor::_rsh, fawkes::MulticastDatagramSocket::bind(), fawkes::Socket::close(), 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::HALF_FIRST, fawkes::HALF_SECOND, fawkes::Logger::log_info(), RefBoxStateHandler::set_gamestate(), RefBoxStateHandler::set_half(), fawkes::MulticastDatagramSocket::set_loop(), RefBoxStateHandler::set_score(), fawkes::TEAM_BOTH, fawkes::TEAM_CYAN, and fawkes::TEAM_MAGENTA.
|
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.
Definition at line 382 of file msl2010.cpp.
|
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 358 of file msl2010.cpp.
References fawkes::Logger::log_debug(), fawkes::Logger::log_warn(), fawkes::Socket::poll(), and fawkes::Socket::read().