Fawkes API  Fawkes Development Version
Msl2010RefBoxProcessor Class Reference

Mid-size league refbox repeater. More...

#include "processor/msl2010.h"

Inheritance diagram for Msl2010RefBoxProcessor:

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

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.

Author
Stefan Schiffer

Definition at line 42 of file msl2010.h.

Constructor & Destructor Documentation

◆ Msl2010RefBoxProcessor()

Msl2010RefBoxProcessor::Msl2010RefBoxProcessor ( fawkes::Logger logger,
const char *  refbox_host,
unsigned short int  refbox_port 
)

Constructor.

Parameters
loggerlogger for output
refbox_hostrefbox host
refbox_portrefbox port

Definition at line 108 of file msl2010.cpp.

◆ ~Msl2010RefBoxProcessor()

Member Function Documentation

◆ check_connection()

bool Msl2010RefBoxProcessor::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 382 of file msl2010.cpp.

◆ refbox_process()

void Msl2010RefBoxProcessor::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 358 of file msl2010.cpp.

References fawkes::Logger::log_debug(), fawkes::Logger::log_warn(), fawkes::Socket::poll(), and fawkes::Socket::read().


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