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); |
| 21 | } |
| 22 | |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 23 | table PickupObjectAction { |
| 24 | object_type:ObjectType (id:0); |
| 25 | auto:bool (id:1); |
| 26 | } |
| 27 | |
| 28 | table PlaceObjectAction { |
| 29 | object_type:ObjectType (id:0); |
| 30 | score_level:ScoreLevel (id:1); |
| 31 | auto:bool (id:2); |
| 32 | } |
| 33 | |
| 34 | table RobotDeathAction { |
| 35 | robot_on:bool (id:0); |
| 36 | } |
| 37 | |
| 38 | table EndMatchAction { |
Filip Kujawa | 5877c69 | 2023-02-20 20:58:14 -0800 | [diff] [blame] | 39 | docked:bool (id:0); |
| 40 | engaged:bool (id:1); |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | union ActionType { |
Filip Kujawa | 4413a59 | 2023-03-01 10:54:34 -0800 | [diff] [blame] | 44 | AutoBalanceAction, |
Sabina Leaver | 759090b | 2023-01-14 20:42:56 -0800 | [diff] [blame] | 45 | StartMatchAction, |
| 46 | PickupObjectAction, |
| 47 | PlaceObjectAction, |
| 48 | RobotDeathAction, |
| 49 | EndMatchAction |
| 50 | } |
| 51 | |
| 52 | table Action { |
| 53 | timestamp:int (id:0); |
| 54 | action_taken:ActionType (id:2); |
| 55 | } |
| 56 | |
| 57 | table SubmitActions { |
| 58 | actions_list:[Action] (id:0); |
| 59 | } |
| 60 | |
| 61 | root_type SubmitActions; |