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