Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
refbox_state_writer.h
1
2
/***************************************************************************
3
* refbox_state_writer.h - Fawkes RefBox state writer
4
*
5
* Created: Wed Apr 22 02:32:52 2009
6
* Copyright 2009 Christpoh Schwering
7
* 2008-2009 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 __TOOLS_REFBOXREP_REFBOX_STATE_WRITER_H_
25
#define __TOOLS_REFBOXREP_REFBOX_STATE_WRITER_H_
26
27
#include "refbox_state_sender.h"
28
29
#include <blackboard/remote.h>
30
#include <interfaces/GameStateInterface.h>
31
#include <netcomm/worldinfo/enums.h>
32
33
#include <vector>
34
#include <string>
35
#include <map>
36
37
class
RefBoxStateBBWriter
:
public
RefBoxStateSender
38
{
39
public
:
40
RefBoxStateBBWriter
(std::vector<std::string> hosts,
bool
debug =
false
);
41
virtual
~RefBoxStateBBWriter
();
42
43
virtual
void
send
();
44
virtual
void
set_gamestate
(
int
game_state,
45
fawkes::worldinfo_gamestate_team_t
state_team);
46
virtual
void
set_score
(
unsigned
int
score_cyan,
unsigned
int
score_magenta);
47
virtual
void
set_team_goal
(
fawkes::worldinfo_gamestate_team_t
our_team,
48
fawkes::worldinfo_gamestate_goalcolor_t
goal_color);
49
virtual
void
set_half
(
fawkes::worldinfo_gamestate_half_t
half);
50
51
private
:
52
void
connect(
const
std::string &host);
53
54
unsigned
int
__counter;
55
56
std::map<fawkes::RemoteBlackBoard *, std::string> __rbbs;
57
std::map<fawkes::RemoteBlackBoard *, fawkes::GameStateInterface *> __giss;
58
59
bool
__debug;
60
int
__game_state;
61
fawkes::worldinfo_gamestate_team_t
__state_team;
62
unsigned
int
__score_cyan;
63
unsigned
int
__score_magenta;
64
fawkes::worldinfo_gamestate_team_t
__our_team;
65
fawkes::worldinfo_gamestate_goalcolor_t
__our_goal_color;
66
fawkes::worldinfo_gamestate_half_t
__half;
67
};
68
69
#endif
src
tools
refboxrep
refbox_state_writer.h
Generated by
1.8.3.1