run control loops and write their output on new sensor values

This also includes sending solenoid values from their own thread at 50Hz
(formerly I613f95a6efb5efe428029e4825ba6caeb34ea326).

Change-Id: I3d3021cdbbf2ddf895e5ceebd4db299b4743e124
diff --git a/frc971/wpilib/buffered_solenoid.h b/frc971/wpilib/buffered_solenoid.h
new file mode 100644
index 0000000..f0a4c11
--- /dev/null
+++ b/frc971/wpilib/buffered_solenoid.h
@@ -0,0 +1,28 @@
+#ifndef FRC971_WPILIB_BUFFERED_SOLENOID_H_
+#define FRC971_WPILIB_BUFFERED_SOLENOID_H_
+
+namespace frc971 {
+namespace wpilib {
+
+class BufferedPcm;
+
+// Handles sending values for a single solenoid to a BufferedPcm. Instances are
+// created with BufferedPcm::MakeSolenoid.
+class BufferedSolenoid {
+ public:
+  // Sets or unsets the solenoid.
+  void Set(bool value);
+
+ private:
+  BufferedSolenoid(int number, BufferedPcm *pcm) : number_(number), pcm_(pcm) {}
+
+  const int number_;
+  BufferedPcm *const pcm_;
+
+  friend class BufferedPcm;
+};
+
+}  // namespace wpilib
+}  // namespace frc971
+
+#endif  // FRC971_WPILIB_BUFFERED_SOLENOID_H_