SplRefBoxProcessor Class Reference

SPL league refbox repeater. More...

#include <processor/spl.h>

Inheritance diagram for SplRefBoxProcessor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SplRefBoxProcessor (fawkes::Logger *logger, unsigned short int broadcast_port, unsigned int team_number, unsigned int player_number)
 Constructor.
 ~SplRefBoxProcessor ()
 Destructor.
void run ()
 Run.
bool check_connection ()
 Check if the connection is alive and reconnect.
void refbox_process ()
 Process incoming refbox communication.

Detailed Description

SPL league refbox repeater.

This class will listen to SPL refbox commands and derive matching game states from the communication stream and send this via the world info.

Author:
Tim Niemueller

Definition at line 78 of file spl.h.


Constructor & Destructor Documentation

SplRefBoxProcessor::SplRefBoxProcessor ( fawkes::Logger logger,
unsigned short int  broadcast_port,
unsigned int  team_number,
unsigned int  player_number 
)

Constructor.

Parameters:
logger Logger
broadcast_port Broadcast port
team_number our team number
player_number individual player number

Definition at line 106 of file spl.cpp.

References fawkes::Socket::bind().

SplRefBoxProcessor::~SplRefBoxProcessor (  ) 

Destructor.

Definition at line 123 of file spl.cpp.

References fawkes::Socket::close().


Member Function Documentation

bool SplRefBoxProcessor::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 245 of file spl.cpp.

void SplRefBoxProcessor::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 225 of file spl.cpp.

References fawkes::Logger::log_warn(), and fawkes::Socket::recv().

void SplRefBoxProcessor::run (  ) 

Run.

Reads messages from the network, processes them and calls the refbox state sender.

Definition at line 255 of file spl.cpp.

References RefBoxProcessor::_rsh, RefBoxStateHandler::handle_refbox_state(), and fawkes::Socket::recv().


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1