Fawkes API Fawkes Development Version
msl2010.h
1
2/***************************************************************************
3 * msl2010.h - Fawkes mid-size refbox 2010 protocol repeater
4 *
5 * Created: Wed Apr 01 10:36:08 2009
6 * Copyright 2009 Stefan Schiffer [stefanschiffer.de]
7 * 2010 Tim Niemueller [www.niemueller.de]
8 *
9 ****************************************************************************/
10
11/* This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL file in the doc directory.
22 */
23
24#ifndef _PLUGINS_REFBOXCOMM_PROCESSOR_MSL2010_H_
25#define _PLUGINS_REFBOXCOMM_PROCESSOR_MSL2010_H_
26
27#include "processor.h"
28#include "state_handler.h"
29
30#include <cstddef>
31
32namespace fawkes {
33class MulticastDatagramSocket;
34class Logger;
35} // namespace fawkes
36
37namespace xmlpp {
38class DomParser;
39class Node;
40} // namespace xmlpp
41
43{
44public:
46 const char * refbox_host,
47 unsigned short int refbox_port);
49
50 bool check_connection();
51 void refbox_process();
52
53private:
54 void process_string(char *buf, size_t len);
55 void reconnect();
56
57private:
58 fawkes::Logger * logger_;
60
61 unsigned int score_cyan_;
62 unsigned int score_magenta_;
63
64 const char *name_;
65
66 bool quit_;
67 bool connection_died_;
68
69 char * refbox_host_;
70 unsigned short int refbox_port_;
71
72 xmlpp::DomParser *dom;
73 xmlpp::Node * root;
74};
75
76#endif
Mid-size league refbox repeater.
Definition: msl2010.h:43
void refbox_process()
Process incoming refbox communication.
Definition: msl2010.cpp:328
~Msl2010RefBoxProcessor()
Destructor.
Definition: msl2010.cpp:126
Msl2010RefBoxProcessor(fawkes::Logger *logger, const char *refbox_host, unsigned short int refbox_port)
Constructor.
Definition: msl2010.cpp:106
bool check_connection()
Check if the connection is alive and reconnect.
Definition: msl2010.cpp:351
Referee Box Communication Processor.
Definition: processor.h:29
Interface for logging.
Definition: logger.h:42
Multicast datagram socket.
Fawkes library namespace.