sensorhandler: support setting analog sensors

Refactor YAML format to denote mutability of sensors.

Sensors which expect different formats for reads and writes
should present two entries in the sensor YAML, one with the read
interface and one with the write interface.  Sensors which
share a format for both reads and writes may present only one entry
in the YAML with both readable and writable enums specified.

If a sensor receives a write which has an interface of Sensor.Value,
the "Set" message is sent via DBus to the path provided in the YAML.
The previous codepath is maintained.

Change-Id: I292f95b6fe936de759fd65ce72c842a1bfe66448
Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/scripts/sensor-example.yaml b/scripts/sensor-example.yaml
index 2556261..52eb076 100755
--- a/scripts/sensor-example.yaml
+++ b/scripts/sensor-example.yaml
@@ -74,3 +74,20 @@
   sensorReadingType: 0x6F
   sensorType: 0xC3
   serviceInterface: org.freedesktop.DBus.Properties
+
+0xD0:
+  sensorType: 0x01
+  path: /xyz/openbmc_project/sensors/temperature/fleeting0
+  sensorReadingType: 0x01
+  multiplierM: 511
+  offsetB: 0
+  bExp: 0
+  mutability: Mutability::Write|Mutability::Read
+  serviceInterface: org.freedesktop.DBus.Properties
+  readingType: readingData
+  interfaces:
+    xyz.openbmc_project.Sensor.Value:
+      Value:
+        0xFF:
+          type: int64_t
+