forked from RoboCup-SSL/ssl-game-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathssl_game_controller_team.proto
74 lines (66 loc) · 2.75 KB
/
ssl_game_controller_team.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
syntax = "proto2";
import "ssl_game_event_2019.proto";
import "ssl_game_controller_common.proto";
// a registration that must be send by teams and autoRefs to the controller as the very first message
message TeamRegistration {
// the exact team name as published by the game-controller
required string team_name = 1;
// signature can optionally be specified to enable secure communication
optional Signature signature = 2;
}
// wrapper for all messages from a team's computer to the controller
message TeamToController {
// signature can optionally be specified to enable secure communication
optional Signature signature = 1;
oneof msg {
// request a new desired keeper id
// this is only allowed during STOP and will be rejected otherwise
int32 desired_keeper = 2;
// response to an advantage choice request
AdvantageResponse advantage_response = 3;
// request to substitute a robot at the next possibility
bool substitute_bot = 4;
// send a ping to the GC to test if the connection is still open.
// the value is ignored and a reply is sent back
bool ping = 5;
}
enum AdvantageResponse {
option allow_alias = true;
// stop the game and handle the foul immediately
STOP = 0;
// continue the game until the next stop of the game, then handle the foul
CONTINUE = 1;
// no choice -> will default to STOP
UNDECIDED = 0;
}
}
// wrapper for all messages from controller to a team's computer
message ControllerToTeam {
oneof msg {
// a reply from the controller
ControllerReply controller_reply = 1;
// the team is offered an advantage choice
AdvantageChoice advantage_choice = 2;
}
}
// information about the advantage choice that is offered to a team
message AdvantageChoice {
// the type of foul that occurred
required Foul foul = 1;
// the bot crash event that was the source for this advantage choice
optional GameEvent.BotCrashUnique bot_crash_unique = 2;
// the bot push event that was the source for this advantage choice
optional GameEvent.BotPushedBot bot_pushed_bot = 3;
// the bot push event that was the source for this advantage choice
optional GameEvent.AttackerTouchedOpponentInDefenseArea attacker_touched_opponent_in_defense_area = 4;
enum Foul {
// default value when not set
UNKNOWN = 0;
// an opponent bot has crashed with one of your bots
COLLISION = 1;
// an opponent bot has pushed one of your bots
PUSHING = 2;
// an opponent has touched one of your bots while your bot has been at least partially inside the defense area
ATTACKER_TOUCHED_OPPONENT_IN_DEFENSE_AREA = 3;
}
}