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 | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 19 | table MobilityAction { |
| 20 | mobility:bool (id:0); |
| 21 | } |
| 22 | |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 23 | table AutoBalanceAction { |
| 24 | docked:bool (id:0); |
| 25 | engaged:bool (id:1); |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 26 | balance_attempt:bool (id:2); |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 27 | } |
| 28 | |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 29 | table PickupObjectAction { |
| 30 | object_type:ObjectType (id:0); |
| 31 | auto:bool (id:1); |
| 32 | } |
| 33 | |
| 34 | table PlaceObjectAction { |
| 35 | object_type:ObjectType (id:0); |
| 36 | score_level:ScoreLevel (id:1); |
| 37 | auto:bool (id:2); |
| 38 | } |
| 39 | |
| 40 | table RobotDeathAction { |
| 41 | robot_on:bool (id:0); |
| 42 | } |
| 43 | |
| 44 | table EndMatchAction { |
Filip Kujawa | 5877c69 | 2023-02-20 20:58:14 -0800 | [diff] [blame] | 45 | docked:bool (id:0); |
| 46 | engaged:bool (id:1); |
Emily Markova | 63c63f6 | 2023-03-29 20:57:35 -0700 | [diff] [blame] | 47 | balance_attempt:bool (id:2); |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | union ActionType { |
Filip Kujawa | 0b4b1e5 | 2023-04-15 14:05:40 -0700 | [diff] [blame] | 51 | MobilityAction, |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 52 | AutoBalanceAction, |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 53 | StartMatchAction, |
| 54 | PickupObjectAction, |
| 55 | PlaceObjectAction, |
| 56 | RobotDeathAction, |
| 57 | EndMatchAction |
| 58 | } |
| 59 | |
| 60 | table Action { |
Philipp Schrader | 8c878a2 | 2023-03-20 22:36:38 -0700 | [diff] [blame] | 61 | timestamp:int64 (id:0); |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 62 | action_taken:ActionType (id:2); |
| 63 | } |
| 64 | |
| 65 | table SubmitActions { |
Emily Markova | 1abe978 | 2023-03-11 19:45:38 -0800 | [diff] [blame] | 66 | team_number:string (id: 0); |
| 67 | match_number:int (id: 1); |
| 68 | set_number:int (id: 2); |
| 69 | comp_level:string (id: 3); |
| 70 | actions_list:[Action] (id:4); |
Philipp Schrader | e11114f | 2023-04-15 17:04:25 -0700 | [diff] [blame] | 71 | |
| 72 | // Do not use this field. The information is collected by the webserver, |
| 73 | // not the web page. |
| 74 | collected_by:string (id: 5, deprecated); |
| 75 | |
Philipp Schrader | 4b48922 | 2023-04-15 16:40:16 -0700 | [diff] [blame] | 76 | // If this is for pre-scouting, then the server should accept this |
| 77 | // submission. I.e. checking that the match information exists in the match |
| 78 | // list should be skipped. |
| 79 | pre_scouting:bool (id: 6); |
Philipp Schrader | 8c878a2 | 2023-03-20 22:36:38 -0700 | [diff] [blame] | 80 | } |