forked from RoboCup-SSL/ssl-game-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssl_gc_change.proto
200 lines (177 loc) · 7.03 KB
/
ssl_gc_change.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
syntax = "proto2";
option go_package = "github.com/RoboCup-SSL/ssl-game-controller/internal/app/statemachine";
import "ssl_gc_state.proto";
import "ssl_gc_common.proto";
import "ssl_gc_geometry.proto";
import "ssl_gc_game_event.proto";
import "ssl_gc_referee_message.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
// A state change
message StateChange {
// A unique increasing id
optional int32 id = 1;
// The previous state
optional State state_pre = 2;
// The state after the change was applied
optional State state = 3;
// The change itself
optional Change change = 4;
// The timestamp when the change was triggered
optional google.protobuf.Timestamp timestamp = 5;
}
// A certain change
message Change {
// An identifier of the origin that triggered the change
optional string origin = 1;
// Is this change revertible?
optional bool revertible = 16;
oneof change {
NewCommand new_command_change = 2;
ChangeStage change_stage_change = 3;
SetBallPlacementPos set_ball_placement_pos_change = 4;
AddYellowCard add_yellow_card_change = 5;
AddRedCard add_red_card_change = 6;
YellowCardOver yellow_card_over_change = 7;
AddGameEvent add_game_event_change = 8;
AddPassiveGameEvent add_passive_game_event_change = 19;
AddProposal add_proposal_change = 9;
UpdateConfig update_config_change = 12;
UpdateTeamState update_team_state_change = 13;
SwitchColors switch_colors_change = 14;
Revert revert_change = 15;
NewGameState new_game_state_change = 17;
AcceptProposalGroup accept_proposal_group_change = 18;
SetStatusMessage set_status_message_change = 20;
}
// New referee command
message NewCommand {
// The command
optional Command command = 1;
}
// Switch to a new stage
message ChangeStage {
// The new stage
optional Referee.Stage new_stage = 1;
}
// Set the ball placement pos
message SetBallPlacementPos {
// The position in [m]
optional Vector2 pos = 1;
}
// Add a new yellow card
message AddYellowCard {
// The team that the card is for
optional Team for_team = 1;
// The game event that caused the card
optional GameEvent caused_by_game_event = 2;
}
// Add a new red card
message AddRedCard {
// The team that the card is for
optional Team for_team = 1;
// The game event that caused the card
optional GameEvent caused_by_game_event = 2;
}
// Trigger when a yellow card timed out
message YellowCardOver {
// The team that the card was for
optional Team for_team = 1;
}
// Add a new game event
message AddGameEvent {
// The game event
optional GameEvent game_event = 1;
}
// Add a new passive game event (that is only logged, but does not automatically trigger anything)
message AddPassiveGameEvent {
// The game event
optional GameEvent game_event = 1;
}
// Add a new proposal (i.e. from an auto referee for majority voting)
message AddProposal {
// The proposal
optional Proposal proposal = 1;
}
// Accept a proposal group (that contain one or more proposals of the same type)
message AcceptProposalGroup {
// The id of the group
optional string group_id = 3;
// An identifier of the acceptor
optional string accepted_by = 2;
}
// Update some configuration
message UpdateConfig {
// The division to play with
optional Division division = 1;
// the team that does/did the first kick off
optional Team first_kickoff_team = 2;
reserved 3; // auto_continue moved to gcState
// The match type
optional MatchType match_type = 4;
// The number of robots per team
optional google.protobuf.Int32Value max_robots_per_team = 5;
}
// Update the current state of a team (all fields that should be updated are set)
message UpdateTeamState {
// The team
optional Team for_team = 1;
// Change the name of the team
optional google.protobuf.StringValue team_name = 2;
// Change the number of goals that the teams has at the moment
optional google.protobuf.Int32Value goals = 3;
// The id of the goal keeper
optional google.protobuf.Int32Value goalkeeper = 4;
// The number of timeouts that the team has left
optional google.protobuf.Int32Value timeouts_left = 5;
// The timeout time that the team has left
optional google.protobuf.StringValue timeout_time_left = 6;
// Does the team play on the positive or the negative half (in ssl-vision coordinates)?
optional google.protobuf.BoolValue on_positive_half = 7;
// The number of ball placement failures
optional google.protobuf.Int32Value ball_placement_failures = 8;
// Can the team place the ball, or is ball placement for this team disabled and should be skipped?
optional google.protobuf.BoolValue can_place_ball = 9;
// The number of challenge flags that the team has left
optional google.protobuf.Int32Value challenge_flags_left = 21;
// The number of bot substitutions left by the team in this halftime
optional google.protobuf.Int32Value bot_substitutions_left = 22;
// Does the team want to substitute a robot in the next possible situation?
optional google.protobuf.BoolValue requests_bot_substitution = 10;
// Does the team want to take a timeout in the next possible situation?
optional google.protobuf.BoolValue requests_timeout = 17;
// Does the team want to challenge a recent decision of the referee?
optional google.protobuf.BoolValue requests_challenge = 18;
// Does the team want to request an emergency stop?
optional google.protobuf.BoolValue requests_emergency_stop = 19;
// Update a certain yellow card of the team
optional YellowCard yellow_card = 20;
// Update a certain red card of the team
optional RedCard red_card = 12;
// Update a certain foul of the team
optional Foul foul = 13;
// Remove the yellow card with this id
optional google.protobuf.UInt32Value remove_yellow_card = 14;
// Remove the red card with this id
optional google.protobuf.UInt32Value remove_red_card = 15;
// Remove the foul with this id
optional google.protobuf.UInt32Value remove_foul = 16;
}
// Switch the team colors
message SwitchColors {
}
// Revert a certain change
message Revert {
// The id of the change
optional int32 change_id = 1;
}
// Change the current game state
message NewGameState {
// The new game state
optional GameState game_state = 1;
}
message SetStatusMessage {
// The new status message
optional string status_message = 1;
}
}