regulators: Implements support for i2c_compare actions

Enhance the configuration file parser to support the i2c_compare_bit,
i2c_compare_byte, and i2c_compare_bytes actions.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I752afde05f16d82da22d404bf24a8c1ab3b7785c
diff --git a/phosphor-regulators/src/config_file_parser.hpp b/phosphor-regulators/src/config_file_parser.hpp
index 558debc..b653c00 100644
--- a/phosphor-regulators/src/config_file_parser.hpp
+++ b/phosphor-regulators/src/config_file_parser.hpp
@@ -19,6 +19,9 @@
 #include "chassis.hpp"
 #include "configuration.hpp"
 #include "device.hpp"
+#include "i2c_compare_bit_action.hpp"
+#include "i2c_compare_byte_action.hpp"
+#include "i2c_compare_bytes_action.hpp"
 #include "i2c_interface.hpp"
 #include "i2c_write_bit_action.hpp"
 #include "i2c_write_byte_action.hpp"
@@ -308,6 +311,45 @@
 std::vector<uint8_t> parseHexByteArray(const nlohmann::json& element);
 
 /**
+ * Parses a JSON element containing an i2c_compare_bit action.
+ *
+ * Returns the corresponding C++ I2CCompareBitAction object.
+ *
+ * Throws an exception if parsing fails.
+ *
+ * @param element JSON element
+ * @return I2CCompareBitAction object
+ */
+std::unique_ptr<I2CCompareBitAction>
+    parseI2CCompareBit(const nlohmann::json& element);
+
+/**
+ * Parses a JSON element containing an i2c_compare_byte action.
+ *
+ * Returns the corresponding C++ I2CCompareByteAction object.
+ *
+ * Throws an exception if parsing fails.
+ *
+ * @param element JSON element
+ * @return I2CCompareByteAction object
+ */
+std::unique_ptr<I2CCompareByteAction>
+    parseI2CCompareByte(const nlohmann::json& element);
+
+/**
+ * Parses a JSON element containing an i2c_compare_bytes action.
+ *
+ * Returns the corresponding C++ I2CCompareBytesAction object.
+ *
+ * Throws an exception if parsing fails.
+ *
+ * @param element JSON element
+ * @return I2CCompareBytesAction object
+ */
+std::unique_ptr<I2CCompareBytesAction>
+    parseI2CCompareBytes(const nlohmann::json& element);
+
+/**
  * Parses a JSON element containing an i2c_interface.
  *
  * Returns the corresponding C++ i2c::I2CInterface object.