diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-02-17 17:10:19 -0600 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-03-15 12:17:38 -0500 |
commit | d64038262e4c8743ae774efde7a8e91544ed359b (patch) | |
tree | f72a9030e4fcf15bfe5641f1bedd255c3cce2c74 /fan_enclosure.cpp | |
parent | b803445f7095c9b1e2ab40dc37526b15e7006393 (diff) | |
download | phosphor-fan-presence-d64038262e4c8743ae774efde7a8e91544ed359b.tar.gz phosphor-fan-presence-d64038262e4c8743ae774efde7a8e91544ed359b.zip |
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>
Diffstat (limited to 'fan_enclosure.cpp')
-rw-r--r-- | fan_enclosure.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fan_enclosure.cpp b/fan_enclosure.cpp index 346911d..46efeb5 100644 --- a/fan_enclosure.cpp +++ b/fan_enclosure.cpp @@ -13,6 +13,12 @@ void FanEnclosure::addInventory() //TODO Add this fan to inventory } +void FanEnclosure::addSensor( + std::unique_ptr<Sensor>&& sensor) +{ + FanEnclosure::sensors.push_back(std::move(sensor)); +} + } // namespace presence } // namespace fan } // namespace phosphor |