Add tach sensors to each fan enclosure
Create a tach sensor instance for each sensor listed within a fan
enclosure that uses 'tach' based presence detection. Each tach sensor
has a pointer to the fan it's associated with and is added to the list
of sensors for that fan enclosure.
Change-Id: I9a83ec52d1a5d01e39702e185336a09edeb4d158
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/fan_enclosure.hpp b/fan_enclosure.hpp
index f214f18..0b96bfc 100644
--- a/fan_enclosure.hpp
+++ b/fan_enclosure.hpp
@@ -2,6 +2,7 @@
#include <sdbusplus/bus.hpp>
#include "fan_properties.hpp"
+#include "sensor_base.hpp"
namespace phosphor
@@ -31,10 +32,14 @@
addInventory();
}
+ void addSensor(
+ std::unique_ptr<Sensor>&& sensor);
+
private:
sdbusplus::bus::bus& bus;
const std::string invPath;
const std::string fanDesc;
+ std::vector<std::unique_ptr<Sensor>> sensors;
void addInventory();