sensor: Implement sensor "ACCURACY"

Support the accuracy attribute of the sensor. Since the latest
Redfish spec needs to support the accuracy attribute of the sensor,
extend the configuration file syntax to support the accuracy value,
read the value and publish it to the new D-Bus Accuracy interface.

Also, This function will be synchronized to the dbus sensors repo in
the future.

Tested: Build phosphor-hwmon successfully
eg: The configuration accuracy in power supply is 1
~# busctl get-property xyz.openbmc_project.Hwmon-xxx.Hwmon1
/xyz/openbmc_project/sensors/power/ps0_input_power
xyz.openbmc_project.Sensor.Accuracy Accuracy
d 1

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Idd0159b75a7506001cf886f4ae8a22dbd38b1135
diff --git a/sensor.hpp b/sensor.hpp
index a1e0524..1fd6a70 100644
--- a/sensor.hpp
+++ b/sensor.hpp
@@ -125,6 +125,19 @@
     std::shared_ptr<StatusObject> addStatus(ObjectInfo& info);
 
     /**
+     * @brief Add Accuracy interface and accuracy property for sensor
+     * @details Accuracy interface is the accuracy range (+/-) of the sensor
+     * Value as a percentage, with a value between 0 and 100.
+     *
+     * @param[in] info     - Sensor object information
+     * @param[in] accuracy - The accuracy value for sensor readings
+     *
+     * @return - Shared pointer to the accuracy object
+     */
+    std::shared_ptr<AccuracyObject> addAccuracy(ObjectInfo& info,
+                                                double accuracy);
+
+    /**
      * @brief Get the scale from the sensor.
      *
      * @return - Scale value