RemoteBlackBoardRefBoxProcessor Class Reference

Remote BlackBoard refbox repeater. More...

#include <processor/remotebb.h>

Inheritance diagram for RemoteBlackBoardRefBoxProcessor:

[legend]
List of all members.

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.

Detailed Description

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.

Author:
Tim Niemueller

Definition at line 35 of file remotebb.h.


Constructor & Destructor Documentation

RemoteBlackBoardRefBoxProcessor::RemoteBlackBoardRefBoxProcessor ( fawkes::Logger logger,
const char *  bb_host,
unsigned short int  bb_port,
const char *  iface_id 
)

Constructor.

Parameters:
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 (  ) 

Destructor.

Definition at line 76 of file remotebb.cpp.

References fawkes::BlackBoard::close().


Member Function Documentation

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.

Returns:
true if the connection is established or could be recovered, false otherwise.

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().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:31:33 2011 for Fawkes API by  doxygen 1.4.7