Add base class to simplify threshold logic

Add base class for the default case check_thresholds
calls the thresholds.cpp function. This way for normal
things we can just pass sensors around as the base class.

Make it so that theshold alerts are only sent once.

Change-Id: Ic8e3ae1900aeb12b74c099f637f45bc038bd3c9a
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/include/sensor.hpp b/include/sensor.hpp
new file mode 100644
index 0000000..2f746da
--- /dev/null
+++ b/include/sensor.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <Thresholds.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+
+struct Sensor
+{
+    virtual ~Sensor() = default;
+    std::vector<thresholds::Threshold> thresholds;
+    std::shared_ptr<sdbusplus::asio::dbus_interface> sensorInterface;
+    std::shared_ptr<sdbusplus::asio::dbus_interface> thresholdInterfaceWarning;
+    std::shared_ptr<sdbusplus::asio::dbus_interface> thresholdInterfaceCritical;
+    double value = std::numeric_limits<double>::quiet_NaN();
+};
\ No newline at end of file