cpusensor: Add thresold offset

Added DTS critical offset parameter to change critical thresold
value of DTS sensors.

Tested by setting value in entity manager and seeing output
reflect in dbus interface.

Change-Id: Ib819d20322b7eca5f6e8690827bf97d49695e995
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
index 2cac56e..1c25655 100644
--- a/include/CPUSensor.hpp
+++ b/include/CPUSensor.hpp
@@ -18,7 +18,8 @@
               std::shared_ptr<sdbusplus::asio::connection>& conn,
               boost::asio::io_service& io, const std::string& sensorName,
               std::vector<thresholds::Threshold>&& thresholds,
-              const std::string& configuration, int cpuId, bool show);
+              const std::string& configuration, int cpuId, bool show,
+              double dtsOffset);
     ~CPUSensor();
     static constexpr unsigned int sensorScaleFactor = 1000;
     static constexpr unsigned int sensorPollMs = 1000;
@@ -35,6 +36,7 @@
     std::string nameTcontrol;
     std::string path;
     double privTcontrol;
+    double dtsOffset;
     bool show;
     int errCount;
     void setupRead(void);
@@ -117,4 +119,4 @@
     }
     cpuPresence[gpioNum] = resp;
     return resp;
-}
\ No newline at end of file
+}
diff --git a/include/Thresholds.hpp b/include/Thresholds.hpp
index 16b8bb9..f374ab6 100644
--- a/include/Thresholds.hpp
+++ b/include/Thresholds.hpp
@@ -104,7 +104,8 @@
 
 bool parseThresholdsFromAttr(std::vector<thresholds::Threshold>& thresholds,
                              const std::string& inputPath,
-                             const double& scaleFactor);
+                             const double& scaleFactor,
+                             const double& offset = 0);
 bool hasCriticalInterface(
     const std::vector<thresholds::Threshold>& thresholdVector);