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