Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 1 | namespace scouting.webserver.requests; |
| 2 | |
| 3 | table StartMatchAction { |
| 4 | position:int (id:0); |
| 5 | } |
| 6 | |
| 7 | enum ObjectType: short { |
| 8 | kCube, |
| 9 | kCone |
| 10 | } |
| 11 | |
| 12 | enum ScoreLevel: short { |
| 13 | kLow, |
| 14 | kMiddle, |
| 15 | kHigh |
| 16 | } |
| 17 | |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 18 | table AutoBalanceAction { |
| 19 | docked:bool (id:0); |
| 20 | engaged:bool (id:1); |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 21 | balance_attempt:bool (id:2); |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 22 | } |
| 23 | |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 24 | table PickupObjectAction { |
| 25 | object_type:ObjectType (id:0); |
| 26 | auto:bool (id:1); |
| 27 | } |
| 28 | |
| 29 | table PlaceObjectAction { |
| 30 | object_type:ObjectType (id:0); |
| 31 | score_level:ScoreLevel (id:1); |
| 32 | auto:bool (id:2); |
| 33 | } |
| 34 | |
| 35 | table RobotDeathAction { |
| 36 | robot_on:bool (id:0); |
| 37 | } |
| 38 | |
| 39 | table EndMatchAction { |
Filip Kujawa | 5877c69 | 2023-02-20 20:58:14 -0800 | [diff] [blame] | 40 | docked:bool (id:0); |
| 41 | engaged:bool (id:1); |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 42 | balance_attempt:bool (id:2); |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | union ActionType { |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 46 | AutoBalanceAction, |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 47 | StartMatchAction, |
| 48 | PickupObjectAction, |
| 49 | PlaceObjectAction, |
| 50 | RobotDeathAction, |
| 51 | EndMatchAction |
| 52 | } |
| 53 | |
| 54 | table Action { |
Philipp Schrader | 8c878a2 | 2023-03-20 22:36:38 -0700 | [diff] [blame] | 55 | timestamp:int64 (id:0); |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 56 | action_taken:ActionType (id:2); |
| 57 | } |
| 58 | |
| 59 | table SubmitActions { |
Emily Markova | 1abe978 | 2023-03-11 19:45:38 -0800 | [diff] [blame] | 60 | team_number:string (id: 0); |
| 61 | match_number:int (id: 1); |
| 62 | set_number:int (id: 2); |
| 63 | comp_level:string (id: 3); |
| 64 | actions_list:[Action] (id:4); |
Sabina Leaver | 9b4eb31 | 2023-02-20 19:58:17 -0800 | [diff] [blame^] | 65 | //TODO: delete this field |
Emily Markova | 1abe978 | 2023-03-11 19:45:38 -0800 | [diff] [blame] | 66 | collected_by:string (id: 5); |
Philipp Schrader | 8c878a2 | 2023-03-20 22:36:38 -0700 | [diff] [blame] | 67 | } |