sensor: Add new Accuracy interface
This will express the +/- percentage accuracy of the Value read. Default
to NaN (not a number).
Tested:
Local CI build against phosphor-dbus-interfaces clean.
Built p10bmc obmc-phosphor-image (devtool modify ...)
Find and view client.hpp and server.hpp for Accuracy, looks good.
Change-Id: I42b93c0267cf6ce397c922a0c161c41a56c8b30e
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/yaml/xyz/openbmc_project/Sensor/Accuracy.interface.yaml b/yaml/xyz/openbmc_project/Sensor/Accuracy.interface.yaml
new file mode 100644
index 0000000..7d5fa54
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Sensor/Accuracy.interface.yaml
@@ -0,0 +1,16 @@
+description: >
+ Implement to provide accuracy for sensor readings.
+
+properties:
+ - name: Accuracy
+ type: double
+ default: NaN
+ description: >
+ The accuracy range (+/-) of the sensor Value as a percentage, with a
+ value between 0 and 100.
+ This is NOT a percentage of the sensor value ranges.
+ A value of 0.25 would be 0.25%, a value of 2 would represent 2%.
+ A value of 2 for 2% would mean that a reading of 10 would have an
+ actual value of 9.8 to 10.2.
+ flags:
+ - readonly