Add OCP debug card host selector button interface
A new button interface class definition is added for handling OCP
debug card host selector button events.
In case of the button release event, The host selector property is
increased up to the max host position.
Design : https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/45544
Signed-off-by: Naveen Moses <naveen.mosess@hcl.com>
Change-Id: Iec8fabb00d1daa10f587981a9c77df8a62e3c373
diff --git a/inc/button_handler.hpp b/inc/button_handler.hpp
index 5723cf7..819a433 100644
--- a/inc/button_handler.hpp
+++ b/inc/button_handler.hpp
@@ -83,6 +83,17 @@
void resetReleased(sdbusplus::message_t& msg);
/**
+ * @brief The handler for a OCP debug card host selector button press
+ *
+ * In multi host system increases host position by 1 up to max host
+ * position.
+ *
+ * @param[in] msg - sdbusplus message from signal
+ */
+
+ void debugHostSelectorReleased(sdbusplus::message::message& msg);
+
+ /**
* @brief Checks if system is powered on
*
* @return true if powered on, false else
@@ -105,7 +116,14 @@
*/
size_t getHostSelectorValue();
+ /**
+ * @brief increases the host selector position property
+ * by 1 upto max host selector position
+ *
+ * @return void
+ */
+ void increaseHostSelectorPosition();
/**
* @brief checks if the system has multi host
* based on the host selector property availability
@@ -146,6 +164,11 @@
* @brief Matches on the reset button released signal
*/
std::unique_ptr<sdbusplus::bus::match_t> resetButtonReleased;
+
+ /**
+ * @brief Matches on the ocp debug host selector button released signal
+ */
+ std::unique_ptr<sdbusplus::bus::match_t> debugHSButtonReleased;
};
} // namespace button