Fawkes API  Fawkes Development Version
RemoteBlackBoardRefBoxProcessor Class Reference

Remote BlackBoard refbox repeater. More...

#include "processor/remotebb.h"

Inheritance diagram for RemoteBlackBoardRefBoxProcessor:

Public Member Functions

 RemoteBlackBoardRefBoxProcessor (fawkes::Logger *logger, const char *bb_host, unsigned short int bb_port, const char *iface_id)
 Constructor. More...
 
 ~RemoteBlackBoardRefBoxProcessor ()
 Destructor. More...
 
bool check_connection ()
 Check if the connection is alive and reconnect. More...
 
void refbox_process ()
 Process incoming refbox communication. More...
 
- Public Member Functions inherited from RefBoxProcessor
virtual ~RefBoxProcessor ()
 Pure virtual destructor. More...
 
virtual void set_handler (RefBoxStateHandler *rsh)
 Set handler. More...
 

Additional Inherited Members

- Protected Attributes inherited from RefBoxProcessor
RefBoxStateHandler_rsh
 Refbox state handler, set via set_handler() More...
 

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::RemoteBlackBoardRefBoxProcessor ( fawkes::Logger logger,
const char *  bb_host,
unsigned short int  bb_port,
const char *  iface_id 
)

Constructor.

Parameters
loggerlogger for output
bb_hostremote blackboard host
bb_portremote blackboard port
iface_idID of the GameStateInterface on the remote blackboard

Definition at line 49 of file remotebb.cpp.

References fawkes::Logger::log_warn().

◆ ~RemoteBlackBoardRefBoxProcessor()

RemoteBlackBoardRefBoxProcessor::~RemoteBlackBoardRefBoxProcessor ( )

Destructor.

Definition at line 76 of file remotebb.cpp.

References fawkes::BlackBoard::close(), and fawkes::BlackBoard::open_for_reading().

Member Function Documentation

◆ check_connection()

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

◆ refbox_process()


The documentation for this class was generated from the following files: