Fawkes API  Fawkes Development Version
remotebb.h
1 
2 /***************************************************************************
3  * remotebb.h - Fawkes remote blackboard processor
4  *
5  * Created: Fri Apr 09 23:58:11 2010
6  * Copyright 2010 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef _PLUGINS_REFBOXCOMM_PROCESSOR_REMOTEBB_H_
24 #define _PLUGINS_REFBOXCOMM_PROCESSOR_REMOTEBB_H_
25 
26 #include "processor.h"
27 #include "state_handler.h"
28 
29 namespace fawkes {
30 class Logger;
31 class BlackBoard;
32 class GameStateInterface;
33 } // namespace fawkes
34 
36 {
37 public:
39  const char * bb_host,
40  unsigned short int bb_port,
41  const char * iface_id);
43 
44  bool check_connection();
45  void refbox_process();
46 
47 private: // methods
48  void reconnect();
49 
50 private:
51  fawkes::Logger * logger_;
52  fawkes::BlackBoard *rbb_;
53 
54  fawkes::GameStateInterface *gamestate_if_;
55 
56  const char *name_;
57 
58  char * bb_host_;
59  unsigned short int bb_port_;
60  char * iface_id_;
61 
62  bool message_shown_;
63 };
64 
65 #endif
Fawkes library namespace.
void refbox_process()
Process incoming refbox communication.
Definition: remotebb.cpp:108
RemoteBlackBoardRefBoxProcessor(fawkes::Logger *logger, const char *bb_host, unsigned short int bb_port, const char *iface_id)
Constructor.
Definition: remotebb.cpp:49
bool check_connection()
Check if the connection is alive and reconnect.
Definition: remotebb.cpp:129
Referee Box Communication Processor.
Definition: processor.h:28
Remote BlackBoard refbox repeater.
Definition: remotebb.h:35
GameStateInterface Fawkes BlackBoard Interface.
The BlackBoard abstract class.
Definition: blackboard.h:45
~RemoteBlackBoardRefBoxProcessor()
Destructor.
Definition: remotebb.cpp:75
Interface for logging.
Definition: logger.h:41