Documentation only, no functional change
Added copyrights and comments within headers
Resolves openbmc/openbmc#959
Change-Id: If58d78a39fb08251a34a88c2b6340c9fa33d2569
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/sensor_base.hpp b/sensor_base.hpp
index 2dc2b8d..c206e70 100644
--- a/sensor_base.hpp
+++ b/sensor_base.hpp
@@ -8,7 +8,14 @@
namespace presence
{
+// Forward declare FanEnclosure
class FanEnclosure;
+/**
+ * @class Sensor
+ * @brief Base sensor implementation to be extended
+ * @details A type of presence detection sensor would extend this to override
+ * how presences is determined by the fan enclosure containing that type
+ */
class Sensor
{
public:
@@ -19,6 +26,12 @@
Sensor& operator=(Sensor&&) = delete;
virtual ~Sensor() = default;
+ /**
+ * @brief Constructs Sensor Object
+ *
+ * @param[in] id - ID name of this sensor
+ * @param[in] fanEnc - Reference to the fan enclosure with this sensor
+ */
Sensor(const std::string& id,
FanEnclosure& fanEnc) :
id(id),
@@ -27,10 +40,16 @@
//Nothing to do here
}
+ /**
+ * @brief Presence function that must be implemented within the derived
+ * type of sensor's implementation on how presence is determined
+ */
virtual bool isPresent() = 0;
protected:
+ /** @brief ID name of this sensor */
const std::string id;
+ /** @brief Reference to the fan enclosure containing this sensor */
FanEnclosure& fanEnc;
};