Add sensor object framework
Create a sensor object to store sensor monitoring specifications.
Tested:
Sensor objects are created and stored for each sensor
Change-Id: Idfa982f1bb8da888abbd473881870df4beec6824
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/sensor.hpp b/sensor.hpp
index e22af0b..4d3dc3c 100644
--- a/sensor.hpp
+++ b/sensor.hpp
@@ -1,11 +1,40 @@
#pragma once
+#include "types.hpp"
#include "sensorset.hpp"
-#include "mainloop.hpp"
+#include "hwmonio.hpp"
namespace sensor
{
+/** @class Sensor
+ * @brief Sensor object based on a SensorSet container's key type
+ * @details Sensor object to create and modify an associated device's sensor
+ * attributes based on the key type of each sensor in the set provided by the
+ * device.
+ */
+class Sensor
+{
+ public:
+ Sensor() = delete;
+ Sensor(const Sensor&) = delete;
+ Sensor(Sensor&&) = default;
+ Sensor& operator=(const Sensor&) = delete;
+ Sensor& operator=(Sensor&&) = default;
+ ~Sensor() = default;
+
+ /**
+ * @brief Constructs Sensor object
+ *
+ * @param[in] sensor - A pair of sensor indentifiers
+ */
+ explicit Sensor(const SensorSet::key_type& sensor);
+
+ private:
+ /** @brief Sensor object's identifiers */
+ SensorSet::key_type sensor;
+};
+
/**
* @brief Add status interface and functional property for sensor
* @details When a sensor has an associated fault file, the OperationalStatus