Add ids to flatbuffer fields in y2012, y2016, frc971, and aos

Change-Id: I9ed9006ce6224e2df0459df47771786b928164a1
diff --git a/y2016/actors/superstructure_action.fbs b/y2016/actors/superstructure_action.fbs
index 405f35b..3a86888 100644
--- a/y2016/actors/superstructure_action.fbs
+++ b/y2016/actors/superstructure_action.fbs
@@ -2,15 +2,15 @@
 
 // Parameters to send with start.
 table SuperstructureActionParams {
-  partial_angle:double;
-  delay_time:double;
-  full_angle:double;
-  shooter_angle:double;
+  partial_angle:double (id: 0);
+  delay_time:double (id: 1);
+  full_angle:double (id: 2);
+  shooter_angle:double (id: 3);
 }
 
 table Goal {
-  run:uint;
-  params:SuperstructureActionParams;
+  run:uint (id: 0);
+  params:SuperstructureActionParams (id: 1);
 }
 
 root_type Goal;
diff --git a/y2016/actors/vision_align_action.fbs b/y2016/actors/vision_align_action.fbs
index 1dd66fc..8b8ea46 100644
--- a/y2016/actors/vision_align_action.fbs
+++ b/y2016/actors/vision_align_action.fbs
@@ -2,12 +2,12 @@
 
 // Parameters to send with start.
 table VisionAlignActionParams {
-  run:int;
+  run:int (id: 0);
 }
 
 table Goal {
-  run:uint;
-  params:VisionAlignActionParams;
+  run:uint (id: 0);
+  params:VisionAlignActionParams (id: 1);
 }
 
 root_type Goal;
diff --git a/y2016/control_loops/shooter/shooter_goal.fbs b/y2016/control_loops/shooter/shooter_goal.fbs
index f041503..5931d57 100644
--- a/y2016/control_loops/shooter/shooter_goal.fbs
+++ b/y2016/control_loops/shooter/shooter_goal.fbs
@@ -4,20 +4,20 @@
 // For all angular velocities, positive is shooting the ball out of the robot.
 table Goal {
   // Angular velocity goals in radians/second.
-  angular_velocity:double;
+  angular_velocity:double (id: 0);
 
-  clamp_open:bool; // True to release our clamp on the ball.
+  clamp_open:bool (id: 1); // True to release our clamp on the ball.
   // True to push the ball into the shooter.
   // If we are in the act of shooting with a goal velocity != 0, wait until it
   // is up to speed, push the ball into the shooter, and then wait until it
   // spins up and down before letting the piston be released.
-  push_to_shooter:bool;
+  push_to_shooter:bool (id: 2);
 
   // Forces the lights on.
-  force_lights_on:bool;
+  force_lights_on:bool (id: 3);
 
   // If true, the robot is shooting forwards.
-  shooting_forwards:bool;
+  shooting_forwards:bool (id: 4);
 }
 
 root_type Goal;
diff --git a/y2016/control_loops/shooter/shooter_output.fbs b/y2016/control_loops/shooter/shooter_output.fbs
index 6d7fcdf..a1f3914 100644
--- a/y2016/control_loops/shooter/shooter_output.fbs
+++ b/y2016/control_loops/shooter/shooter_output.fbs
@@ -2,18 +2,18 @@
 
 table Output {
   // Voltage in volts of the left and right shooter motors.
-  voltage_left:double;
-  voltage_right:double;
+  voltage_left:double (id: 0);
+  voltage_right:double (id: 1);
 
   // See comments on the identical fields in Goal for details.
-  clamp_open:bool;
-  push_to_shooter:bool;
+  clamp_open:bool (id: 2);
+  push_to_shooter:bool (id: 3);
 
   // If true, the lights are on.
-  lights_on:bool;
+  lights_on:bool (id: 4);
 
-  forwards_flashlight:bool;
-  backwards_flashlight:bool;
+  forwards_flashlight:bool (id: 5);
+  backwards_flashlight:bool (id: 6);
 }
 
 root_type Output;
diff --git a/y2016/control_loops/shooter/shooter_position.fbs b/y2016/control_loops/shooter/shooter_position.fbs
index d97268c..27ac7d8 100644
--- a/y2016/control_loops/shooter/shooter_position.fbs
+++ b/y2016/control_loops/shooter/shooter_position.fbs
@@ -4,8 +4,8 @@
 // For all angular velocities, positive is shooting the ball out of the robot.
 table Position {
   // Wheel angle in radians/second.
-  theta_left:double;
-  theta_right:double;
+  theta_left:double (id: 0);
+  theta_right:double (id: 1);
 }
 
 root_type Position;
diff --git a/y2016/control_loops/shooter/shooter_status.fbs b/y2016/control_loops/shooter/shooter_status.fbs
index 6f6262b..0ea54e5 100644
--- a/y2016/control_loops/shooter/shooter_status.fbs
+++ b/y2016/control_loops/shooter/shooter_status.fbs
@@ -2,26 +2,26 @@
 
 table ShooterSideStatus {
   // True if the shooter side is up to speed and stable.
-  ready:bool;
+  ready:bool (id: 0);
   // The current average velocity in radians/second.
-  avg_angular_velocity:double;
+  avg_angular_velocity:double (id: 1);
   // The current instantaneous filtered velocity in radians/second.
-  angular_velocity:double;
+  angular_velocity:double (id: 2);
 }
 
 table Status {
   // Left side status.
-  left:ShooterSideStatus;
+  left:ShooterSideStatus (id: 0);
   // Right side status.
-  right:ShooterSideStatus;
+  right:ShooterSideStatus (id: 1);
 
   // True if the shooter is ready.  It is better to compare the velocities
   // directly so there isn't confusion on if the goal is up to date.
-  ready:bool;
+  ready:bool (id: 2);
 
   // The number of shots that have been fired since the start of the shooter
   // control loop.
-  shots:uint;
+  shots:uint (id: 3);
 }
 
 root_type Status;
diff --git a/y2016/control_loops/superstructure/superstructure_goal.fbs b/y2016/control_loops/superstructure/superstructure_goal.fbs
index 4274bd8..efba4a7 100644
--- a/y2016/control_loops/superstructure/superstructure_goal.fbs
+++ b/y2016/control_loops/superstructure/superstructure_goal.fbs
@@ -15,36 +15,36 @@
   // to the big frame supporting the shooter.
 
   // Goal angles and angular velocities of the superstructure subsystems.
-  angle_intake:double;
-  angle_shoulder:double;
+  angle_intake:double (id: 0);
+  angle_shoulder:double (id: 1);
   // In relation to the ground plane.
-  angle_wrist:double;
+  angle_wrist:double (id: 2);
 
   // Caps on velocity/acceleration for profiling. 0 for the default.
-  max_angular_velocity_intake:float;
-  max_angular_velocity_shoulder:float;
-  max_angular_velocity_wrist:float;
+  max_angular_velocity_intake:float (id: 3);
+  max_angular_velocity_shoulder:float (id: 4);
+  max_angular_velocity_wrist:float (id: 5);
 
-  max_angular_acceleration_intake:float;
-  max_angular_acceleration_shoulder:float;
-  max_angular_acceleration_wrist:float;
+  max_angular_acceleration_intake:float (id: 6);
+  max_angular_acceleration_shoulder:float (id: 7);
+  max_angular_acceleration_wrist:float (id: 8);
 
   // Voltage to send to the rollers. Positive is sucking in.
-  voltage_top_rollers:float;
-  voltage_bottom_rollers:float;
+  voltage_top_rollers:float (id: 9);
+  voltage_bottom_rollers:float (id: 10);
 
   // Voltage to sent to the climber. Positive is pulling the robot up.
-  voltage_climber:float;
+  voltage_climber:float (id: 11);
   // If true, unlatch the climber and allow it to unfold.
-  unfold_climber:bool;
+  unfold_climber:bool (id: 12);
 
-  force_intake:bool;
+  force_intake:bool (id: 13);
 
   // If true, release the latch which holds the traverse mechanism in the
   // middle.
-  traverse_unlatched:bool;
+  traverse_unlatched:bool (id: 14);
   // If true, fire the traverse mechanism down.
-  traverse_down:bool;
+  traverse_down:bool (id: 15);
 }
 
 root_type Goal;
diff --git a/y2016/control_loops/superstructure/superstructure_output.fbs b/y2016/control_loops/superstructure/superstructure_output.fbs
index 40a0091..7e790cd 100644
--- a/y2016/control_loops/superstructure/superstructure_output.fbs
+++ b/y2016/control_loops/superstructure/superstructure_output.fbs
@@ -1,22 +1,22 @@
 namespace y2016.control_loops.superstructure;
 
 table Output {
-  voltage_intake:float;
-  voltage_shoulder:float;
-  voltage_wrist:float;
+  voltage_intake:float (id: 0);
+  voltage_shoulder:float (id: 1);
+  voltage_wrist:float (id: 2);
 
-  voltage_top_rollers:float;
-  voltage_bottom_rollers:float;
+  voltage_top_rollers:float (id: 3);
+  voltage_bottom_rollers:float (id: 4);
 
   // Voltage to sent to the climber. Positive is pulling the robot up.
-  voltage_climber:float;
+  voltage_climber:float (id: 5);
   // If true, release the latch to trigger the climber to unfold.
-  unfold_climber:bool;
+  unfold_climber:bool (id: 6);
 
   // If true, release the latch to hold the traverse mechanism in the middle.
-  traverse_unlatched:bool;
+  traverse_unlatched:bool (id: 7);
   // If true, fire the traverse mechanism down.
-  traverse_down:bool;
+  traverse_down:bool (id: 8);
 }
 
 root_type Output;
diff --git a/y2016/control_loops/superstructure/superstructure_position.fbs b/y2016/control_loops/superstructure/superstructure_position.fbs
index fb356e0..3660e43 100644
--- a/y2016/control_loops/superstructure/superstructure_position.fbs
+++ b/y2016/control_loops/superstructure/superstructure_position.fbs
@@ -11,9 +11,9 @@
   // the shooter wheels pointed towards the shoulder joint.  This is measured
   // relative to the arm, not the ground, not like the world we actually
   // present to users.
-  intake:frc971.PotAndIndexPosition;
-  shoulder:frc971.PotAndIndexPosition;
-  wrist:frc971.PotAndIndexPosition;
+  intake:frc971.PotAndIndexPosition (id: 0);
+  shoulder:frc971.PotAndIndexPosition (id: 1);
+  wrist:frc971.PotAndIndexPosition (id: 2);
 }
 
 root_type Position;
diff --git a/y2016/control_loops/superstructure/superstructure_status.fbs b/y2016/control_loops/superstructure/superstructure_status.fbs
index 373bfe2..84648ac 100644
--- a/y2016/control_loops/superstructure/superstructure_status.fbs
+++ b/y2016/control_loops/superstructure/superstructure_status.fbs
@@ -4,53 +4,53 @@
 
 table JointState {
   // Angle of the joint in radians.
-  angle:float;
+  angle:float (id: 0);
   // Angular velocity of the joint in radians/second.
-  angular_velocity:float;
+  angular_velocity:float (id: 1);
   // Profiled goal angle of the joint in radians.
-  goal_angle:float;
+  goal_angle:float (id: 2);
   // Profiled goal angular velocity of the joint in radians/second.
-  goal_angular_velocity:float;
+  goal_angular_velocity:float (id: 3);
   // Unprofiled goal angle of the joint in radians.
-  unprofiled_goal_angle:float;
+  unprofiled_goal_angle:float (id: 4);
   // Unprofiled goal angular velocity of the joint in radians/second.
-  unprofiled_goal_angular_velocity:float;
+  unprofiled_goal_angular_velocity:float (id: 5);
 
   // The estimated voltage error.
-  voltage_error:float;
+  voltage_error:float (id: 6);
 
   // The calculated velocity with delta x/delta t
-  calculated_velocity:float;
+  calculated_velocity:float (id: 7);
 
   // Components of the control loop output
-  position_power:float;
-  velocity_power:float;
-  feedforwards_power:float;
+  position_power:float (id: 8);
+  velocity_power:float (id: 9);
+  feedforwards_power:float (id: 10);
 
   // State of the estimator.
-  estimator_state:frc971.EstimatorState;
+  estimator_state:frc971.EstimatorState (id: 11);
 }
 
 table Status {
   // Are the superstructure subsystems zeroed?
-  zeroed:bool;
+  zeroed:bool (id: 0);
 
   // If true, we have aborted.
-  estopped:bool;
+  estopped:bool (id: 1);
 
   // The internal state of the state machine.
-  state:int;
+  state:int (id: 2);
 
 
   // Estimated angles and angular velocities of the superstructure subsystems.
-  intake:JointState;
-  shoulder:JointState;
-  wrist:JointState;
+  intake:JointState (id: 3);
+  shoulder:JointState (id: 4);
+  wrist:JointState (id: 5);
 
-  shoulder_controller_index:int;
+  shoulder_controller_index:int (id: 6);
 
   // Is the superstructure collided?
-  is_collided:bool;
+  is_collided:bool (id: 7);
 }
 
 root_type Status;
diff --git a/y2016/queues/ball_detector.fbs b/y2016/queues/ball_detector.fbs
index c4ef07c..1ebe28c 100644
--- a/y2016/queues/ball_detector.fbs
+++ b/y2016/queues/ball_detector.fbs
@@ -9,7 +9,7 @@
   // TODO(comran): Check to see if our sensor's output corresponds with the
   // comment above.
 
-  voltage:double;
+  voltage:double (id: 0);
 }
 
 root_type BallDetector;
diff --git a/y2016/vision/vision.fbs b/y2016/vision/vision.fbs
index 4394b10..00209d9 100644
--- a/y2016/vision/vision.fbs
+++ b/y2016/vision/vision.fbs
@@ -2,37 +2,37 @@
 
 // Published on ".y2016.vision.vision_status"
 table VisionStatus {
-  left_image_valid:bool;
-  right_image_valid:bool;
+  left_image_valid:bool (id: 0);
+  right_image_valid:bool (id: 1);
   // Times when the images were taken as nanoseconds on CLOCK_MONOTONIC on the
   // TK1.
-  left_image_timestamp:long;
-  right_image_timestamp:long;
+  left_image_timestamp:long (id: 2);
+  right_image_timestamp:long (id: 3);
   // Times when the images were sent from the TK1 as nanoseconds on the TK1's
   // CLOCK_MONOTONIC.
-  left_send_timestamp:long;
-  right_send_timestamp:long;
+  left_send_timestamp:long (id: 4);
+  right_send_timestamp:long (id: 5);
 
   // Horizontal angle of the goal in radians.
   // TODO(Brian): Figure out which way is positive.
-  horizontal_angle:double;
+  horizontal_angle:double (id: 6);
   // Vertical angle of the goal in radians.
   // TODO(Brian): Figure out which way is positive.
-  vertical_angle:double;
+  vertical_angle:double (id: 7);
   // Distance to the target in meters.
-  distance:double;
+  distance:double (id: 8);
   // The angle in radians of the bottom of the target.
-  angle:double;
+  angle:double (id: 9);
 
   // Capture time of the angle using the clock behind monotonic_clock::now().
-  target_time:long;
+  target_time:long (id: 10);
 
   // The estimated positions of both sides of the drivetrain when the frame
   // was captured.
   // These are the estimated_left_position and estimated_right_position members
   // of the drivetrain queue.
-  drivetrain_left_position:double;
-  drivetrain_right_position:double;
+  drivetrain_left_position:double (id: 11);
+  drivetrain_right_position:double (id: 12);
 }
 
 root_type VisionStatus;