summaryrefslogtreecommitdiffstats
path: root/presence/fan_enclosure.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'presence/fan_enclosure.hpp')
-rw-r--r--presence/fan_enclosure.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/presence/fan_enclosure.hpp b/presence/fan_enclosure.hpp
index 071b59c..30bd235 100644
--- a/presence/fan_enclosure.hpp
+++ b/presence/fan_enclosure.hpp
@@ -54,10 +54,13 @@ class FanEnclosure
* @brief Constructs Fan Enclosure Object
*
* @param[in] fanProp - Fan enclosure properties
+ * @param[in] initialState - The initial state of the enclosure.
*/
- explicit FanEnclosure(const phosphor::fan::Properties& fanProp) :
+ explicit FanEnclosure(const phosphor::fan::Properties& fanProp,
+ presenceState initialState = UNKNOWN) :
invPath(std::get<0>(fanProp)),
- fanDesc(std::get<1>(fanProp))
+ fanDesc(std::get<1>(fanProp)),
+ presState(initialState)
{
}
@@ -82,7 +85,7 @@ class FanEnclosure
/** @brief List of sensors associated with this fan enclosure */
std::vector<std::unique_ptr<Sensor>> sensors;
/** @brief Last known presence state of this fan enclosure */
- presenceState presState = UNKNOWN;
+ presenceState presState;
/**
* @brief Get the current presence state based on all sensors
OpenPOWER on IntegriCloud