summaryrefslogtreecommitdiffstats
path: root/control/zone.hpp
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2017-05-22 14:18:25 -0500
committerMatthew Barth <msbarth@us.ibm.com>2017-05-31 12:46:08 -0500
commit861d77c39a3b69d5be43aceca72602beb18165df (patch)
tree5f592d2cc58fbbafeb14c6312981e2bcef703d0c /control/zone.hpp
parent14184131ba863121ac0cda5d8cacfd9a18643fae (diff)
downloadphosphor-fan-presence-861d77c39a3b69d5be43aceca72602beb18165df.tar.gz
phosphor-fan-presence-861d77c39a3b69d5be43aceca72602beb18165df.zip
Add an active state for automatic fan control
Each zone contains an active state that determines whether the automatic fan control algorithm is active and controlling the fan speeds dynamically or not. This will be used to determine if the fan speeds within the zone are set dynamically or rather held at another speed for a determined reason. Change-Id: I2f81de168c5f7d859b3ec917022c4749e1a28d4e Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
Diffstat (limited to 'control/zone.hpp')
-rw-r--r--control/zone.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/control/zone.hpp b/control/zone.hpp
index 1a4e173..b727567 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -71,6 +71,14 @@ class Zone
}
/**
+ * @brief Sets the automatic fan control allowed active state
+ *
+ * @param[in] group - A group that affects the active state
+ * @param[in] isActiveAllow - Active state according to group
+ */
+ void setActiveAllow(const Group* group, bool isActiveAllow);
+
+ /**
* @brief Sets a given object's property value
*
* @param[in] object - Name of the object containing the property
@@ -116,6 +124,11 @@ class Zone
const size_t _zoneNum;
/**
+ * Automatic fan control active state
+ */
+ bool _isActive = true;
+
+ /**
* The vector of fans in this zone
*/
std::vector<std::unique_ptr<Fan>> _fans;
@@ -126,6 +139,11 @@ class Zone
std::map<std::string, std::map<std::string, bool>> _properties;
/**
+ * @brief Map of active fan control allowed by groups
+ */
+ std::map<const Group*, bool> _active;
+
+ /**
* @brief List of signal event arguments
*/
std::vector<std::unique_ptr<SignalEvent>> _signalEvents;
OpenPOWER on IntegriCloud