regulators: Implements support for compare_presence action
Enhance the configuration file parser to support the
compare_presence action element.
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I9bfa3d260e0a6f7d8f41bed473b436148141ea50
diff --git a/phosphor-regulators/src/config_file_parser.hpp b/phosphor-regulators/src/config_file_parser.hpp
index e3f6bde..706c609 100644
--- a/phosphor-regulators/src/config_file_parser.hpp
+++ b/phosphor-regulators/src/config_file_parser.hpp
@@ -18,6 +18,7 @@
#include "action.hpp"
#include "and_action.hpp"
#include "chassis.hpp"
+#include "compare_presence_action.hpp"
#include "configuration.hpp"
#include "device.hpp"
#include "i2c_compare_bit_action.hpp"
@@ -223,6 +224,19 @@
parseChassisArray(const nlohmann::json& element);
/**
+ * Parses a JSON element containing a compare_presence action.
+ *
+ * Returns the corresponding C++ ComparePresenceAction object.
+ *
+ * Throws an exception if parsing fails.
+ *
+ * @param element JSON element
+ * @return ComparePresenceAction object
+ */
+std::unique_ptr<ComparePresenceAction>
+ parseComparePresence(const nlohmann::json& element);
+
+/**
* Parses a JSON element containing a configuration.
*
* Returns the corresponding C++ Configuration object.