-
Notifications
You must be signed in to change notification settings - Fork 0
/
ssl_match_stats.proto
167 lines (146 loc) · 3.88 KB
/
ssl_match_stats.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
syntax = "proto3";
option go_package = "github.com/RoboCup-SSL/ssl-match-stats/pkg/matchstats";
import "ssl_gc_game_event.proto";
enum TeamColor {
TEAM_UNKNOWN = 0;
TEAM_YELLOW = 1;
TEAM_BLUE = 2;
TEAM_NONE = 3;
}
enum CommandType {
COMMAND_UNKNOWN = 0;
COMMAND_HALT = 1;
COMMAND_STOP = 2;
COMMAND_BALL_PLACEMENT = 3;
COMMAND_NORMAL_START = 4;
COMMAND_FORCE_START = 5;
COMMAND_DIRECT_FREE = 6;
COMMAND_INDIRECT_FREE = 7;
COMMAND_PREPARE_KICKOFF = 8;
COMMAND_PREPARE_PENALTY = 9;
COMMAND_TIMEOUT = 10;
COMMAND_GOAL = 11;
}
enum StageType {
STAGE_UNKNOWN = 0;
STAGE_NORMAL_FIRST_HALF_PRE = 1;
STAGE_NORMAL_FIRST_HALF = 2;
STAGE_NORMAL_HALF_TIME = 3;
STAGE_NORMAL_SECOND_HALF_PRE = 4;
STAGE_NORMAL_SECOND_HALF = 5;
STAGE_EXTRA_TIME_BREAK = 6;
STAGE_EXTRA_FIRST_HALF_PRE = 7;
STAGE_EXTRA_FIRST_HALF = 8;
STAGE_EXTRA_HALF_TIME = 9;
STAGE_EXTRA_SECOND_HALF_PRE = 10;
STAGE_EXTRA_SECOND_HALF = 11;
STAGE_PENALTY_SHOOTOUT_BREAK = 12;
STAGE_PENALTY_SHOOTOUT = 13;
STAGE_POST_GAME = 14;
}
enum GamePhaseType {
PHASE_UNKNOWN = 0;
PHASE_RUNNING = 1;
PHASE_PREPARE_KICKOFF = 2;
PHASE_PREPARE_PENALTY = 3;
PHASE_STOP = 4;
PHASE_BALL_PLACEMENT = 5;
PHASE_TIMEOUT = 6;
PHASE_BREAK = 7;
PHASE_HALT = 8;
PHASE_POST_GAME = 9;
}
// MatchType is a meta information about the current match for easier log processing
enum StatsMatchType {
// not set
MATCH_UNKNOWN = 0;
// match is part of the group phase
MATCH_GROUP_PHASE = 1;
// match is part of the elimination phase
MATCH_ELIMINATION_PHASE = 2;
// a friendly match, not part of a tournament
MATCH_FRIENDLY = 3;
}
// GameEventCategory is a derived category for the game event type
enum GameEventCategory {
CATEGORY_UNKNOWN = 0;
CATEGORY_BALL_OUT = 1;
CATEGORY_FOUL = 2;
CATEGORY_GOAL = 3;
CATEGORY_OTHER = 4;
}
message Command {
CommandType type = 1;
TeamColor for_team = 2;
// [microseconds]
uint64 timestamp = 3;
}
message RobotCount {
// [microseconds]
uint64 start_time = 1;
// [microseconds]
int64 duration = 2;
int32 count = 3;
TeamColor team_color = 4;
}
message GamePhase {
// [microseconds]
uint64 start_time = 1;
// [microseconds]
uint64 end_time = 2;
// [microseconds]
int64 duration = 3;
GamePhaseType type = 4;
Command command_entry = 5;
Command command_exit = 6;
TeamColor for_team = 7;
repeated GameEvent game_events_entry = 8;
repeated GameEvent game_events_exit = 9;
Command next_command_proposed = 10;
StageType stage = 11;
int64 stage_time_left_entry = 12;
int64 stage_time_left_exit = 13;
Command command_prev = 14;
repeated GameEventTimed game_events_applied = 15;
repeated GameEventTimed game_events_proposed = 16;
repeated RobotCount robot_count = 17;
}
message GameEventTimed {
GameEvent game_event = 1;
uint64 timestamp = 2;
bool withdrawn = 3;
}
message TeamStats {
string name = 1;
int32 goals = 2;
int32 fouls = 3;
int32 yellow_cards = 4;
int32 red_cards = 5;
// [microseconds]
int64 timeout_time = 6;
int32 timeouts_taken = 7;
int32 timeouts_left = 14;
int32 penalty_shots_total = 8;
int32 penalty_shots_success = 9;
int32 conceded_goals = 10;
// [microseconds]
int64 ball_placement_time = 11;
int32 ball_placements = 12;
int32 max_active_yellow_cards = 13;
}
message MatchStats {
string name = 1;
StatsMatchType type = 11;
// [microseconds]
int64 match_duration = 2;
// unix timestamp [microseconds]
uint64 start_time = 10;
repeated GamePhase game_phases = 3;
bool extra_time = 4;
bool shootout = 5;
TeamStats team_stats_yellow = 6;
TeamStats team_stats_blue = 7;
}
message MatchStatsCollection {
repeated MatchStats match_stats = 1;
}