presence: Add ctors for AnyOf and Fallback
Add constructors to the AnyOf and Fallback presence detection classes
that don't take an EEPROMDevice pointer. This will fix the YAML based
compilation which was failing because the python template wasn't adding
that EEPROMDevice argument.
Alternatively the python mako template could have been modified to pass
in the argument, but there are no plans to add the EEPROM support to the
YAML mode anyway.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I178bf8a8e258de3597f8ced600dc803cab54f227
diff --git a/presence/anyof.hpp b/presence/anyof.hpp
index 03fd1a4..2e49552 100644
--- a/presence/anyof.hpp
+++ b/presence/anyof.hpp
@@ -48,6 +48,17 @@
std::unique_ptr<EEPROMDevice> e);
/**
+ * @brief Construct an any of bitwise policy.
+ *
+ * @param[in] fan - The fan associated with the policy.
+ * @param[in] s - The set of sensors associated with the policy.
+ */
+ AnyOf(const Fan& fan,
+ const std::vector<std::reference_wrapper<PresenceSensor>>& s) :
+ AnyOf(fan, s, nullptr)
+ {}
+
+ /**
* @brief stateChanged
*
* Update the inventory and execute the fallback
diff --git a/presence/fallback.hpp b/presence/fallback.hpp
index db661e0..e6a1685 100644
--- a/presence/fallback.hpp
+++ b/presence/fallback.hpp
@@ -51,6 +51,17 @@
}
/**
+ * @brief Construct a fallback policy.
+ *
+ * @param[in] fan - The fan associated with the policy.
+ * @param[in] s - The set of sensors associated with the policy.
+ */
+ Fallback(const Fan& fan,
+ const std::vector<std::reference_wrapper<PresenceSensor>>& s) :
+ Fallback(fan, s, nullptr)
+ {}
+
+ /**
* @brief stateChanged
*
* Update the inventory and execute the fallback