diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-10-17 10:35:20 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-11-17 13:14:11 -0600 |
commit | 98726c4585d6743c0948ed0140835e438de1df79 (patch) | |
tree | 1404b5f2256972d96fb940687808f27f187a272d /control/zone.hpp | |
parent | 9df7475003a090aa104f033270533f106e004c57 (diff) | |
download | phosphor-fan-presence-98726c4585d6743c0948ed0140835e438de1df79.tar.gz phosphor-fan-presence-98726c4585d6743c0948ed0140835e438de1df79.zip |
Set floor to default on missing owner action
An action to set the fan floor speed to the defined default fan floor
speed when any services associated to a given group of sensors have
terminated. Once those services are functional and providing the
sensors, the fan floor is allowed to be set normally again.
i.e.) For fan floor speeds based on an ambient sensor, if the service
providing the ambient temperature value from the sensor terminates, the
default floor for the zone is used as the fan floor speed.
Change-Id: I2d58cc9b31051e6b8e5e798c0a736f58f5efe5b1
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r-- | control/zone.hpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/control/zone.hpp b/control/zone.hpp index 1fdeaf2..fa3ed82 100644 --- a/control/zone.hpp +++ b/control/zone.hpp @@ -78,6 +78,17 @@ class Zone void setActiveAllow(const Group* group, bool isActiveAllow); /** + * @brief Sets the floor change allowed state + * + * @param[in] group - A group that affects floor changes + * @param[in] isAllow - Allow state according to group + */ + inline void setFloorChangeAllow(const Group* group, bool isAllow) + { + _floorChange[*(group)] = isAllow; + } + + /** * @brief Sets a given object's property value * * @param[in] object - Name of the object containing the property @@ -231,7 +242,8 @@ class Zone /** * @brief Set the floor speed to the given speed and increase target - * speed to the floor when target is below floor. + * speed to the floor when target is below floor where floor changes + * are allowed. * * @param[in] speed - Speed to set the floor to */ @@ -454,6 +466,11 @@ class Zone std::map<const Group, bool> _active; /** + * @brief Map of floor change allowed by groups + */ + std::map<const Group, bool> _floorChange; + + /** * @brief Map of group service names */ std::map<const Group, std::vector<Service>> _services; |