button-handler: Add ID button actions
Creates a signal handler for the 'Released' signal.
The handler will toggle the 'Asserted' property in the
LED group defined by the configure file. The default
group is 'enclosure_identify'. The effect of this is
the LEDs in the group will toggle on or off on each
button press.
Tested: Used the 'simPress' method on the ID button object.
Change-Id: I9f68a8b3fae02efc7f6cfb6dbcf8a45cce7f2d9c
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/inc/button_handler.hpp b/inc/button_handler.hpp
index 0964aad..7340c2f 100644
--- a/inc/button_handler.hpp
+++ b/inc/button_handler.hpp
@@ -58,6 +58,15 @@
void longPowerPressed(sdbusplus::message::message& msg);
/**
+ * @brief The handler for an ID button press
+ *
+ * Toggles the ID LED group
+ *
+ * @param[in] msg - sdbusplus message from signal
+ */
+ void idPressed(sdbusplus::message::message& msg);
+
+ /**
* @brief The handler for a reset button press
*
* Reboots the host if it is powered on.
@@ -101,6 +110,11 @@
std::unique_ptr<sdbusplus::bus::match_t> powerButtonLongPressReleased;
/**
+ * @brief Matches on the ID button released signal
+ */
+ std::unique_ptr<sdbusplus::bus::match_t> idButtonReleased;
+
+ /**
* @brief Matches on the reset button released signal
*/
std::unique_ptr<sdbusplus::bus::match_t> resetButtonReleased;