Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RemoteBlackBoardRefBoxProcessor Class Reference

Remote BlackBoard refbox repeater. More...

#include "processor/remotebb.h"

Inheritance diagram for RemoteBlackBoardRefBoxProcessor:

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.
- Public Member Functions inherited from RefBoxProcessor
virtual ~RefBoxProcessor ()
 Pure virtual destructor.
virtual void set_handler (RefBoxStateHandler *rsh)
 Set handler.

Additional Inherited Members

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

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

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


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