Remote BlackBoard refbox repeater. More...
#include <processor/remotebb.h>
Public Member Functions | |
RemoteBlackBoardRefBoxProcessor (fawkes::Logger *logger, const char *bb_host, unsigned short int bb_port, const char *iface_id) | |
Constructor. | |
~RemoteBlackBoardRefBoxProcessor () | |
Destructor. | |
bool | check_connection () |
Check if the connection is alive and reconnect. | |
void | refbox_process () |
Process incoming refbox communication. |
Remote BlackBoard refbox repeater.
This class will establish the connection to a remote blackboard and copy the refbox information from there to the local state handler. It can be used as a fallback for unicast communcation to a central repeater host.
Definition at line 35 of file remotebb.h.
RemoteBlackBoardRefBoxProcessor::RemoteBlackBoardRefBoxProcessor | ( | fawkes::Logger * | logger, | |
const char * | bb_host, | |||
unsigned short int | bb_port, | |||
const char * | iface_id | |||
) |
Constructor.
logger | logger for output | |
bb_host | remote blackboard host | |
bb_port | remote blackboard port | |
iface_id | ID of the GameStateInterface on the remote blackboard |
Definition at line 49 of file remotebb.cpp.
References fawkes::Logger::log_warn().
RemoteBlackBoardRefBoxProcessor::~RemoteBlackBoardRefBoxProcessor | ( | ) |
bool RemoteBlackBoardRefBoxProcessor::check_connection | ( | ) | [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 132 of file remotebb.cpp.
References fawkes::BlackBoard::is_alive(), fawkes::Interface::is_valid(), and fawkes::Logger::log_warn().
void RemoteBlackBoardRefBoxProcessor::refbox_process | ( | ) | [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 110 of file remotebb.cpp.
References RefBoxProcessor::_rsh, fawkes::GameStateInterface::game_state(), fawkes::GameStateInterface::half(), fawkes::BlackBoard::is_alive(), fawkes::GameStateInterface::is_kickoff(), fawkes::Interface::is_valid(), fawkes::Logger::log_warn(), fawkes::GameStateInterface::our_goal_color(), fawkes::GameStateInterface::our_team(), fawkes::Interface::read(), fawkes::GameStateInterface::score_cyan(), fawkes::GameStateInterface::score_magenta(), RefBoxStateHandler::set_gamestate(), RefBoxStateHandler::set_half(), RefBoxStateHandler::set_score(), RefBoxStateHandler::set_team_goal(), and fawkes::GameStateInterface::state_team().