summaryrefslogtreecommitdiffstats
path: root/app/watchdog_service.hpp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-02-09 16:12:53 -0800
committerWilliam A. Kennington III <wak@google.com>2018-02-21 23:54:59 +0000
commitb638de22154aa4cae788d9117d2507394388f839 (patch)
tree6445adf4a1e1914dcf05d35d467961f14de940c0 /app/watchdog_service.hpp
parentde14a027c06d93dadf05322529bec9d83f4cd181 (diff)
downloadphosphor-host-ipmid-b638de22154aa4cae788d9117d2507394388f839.tar.gz
phosphor-host-ipmid-b638de22154aa4cae788d9117d2507394388f839.zip
watchdog: Implement watchdog action setting
We now respect the action set during the SetTimeout command. This maps to one of the actions defined by the dbus Watchdog interface Change-Id: I4d13d2539a2d955a4340bf5f915ca6f3b694550a Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'app/watchdog_service.hpp')
-rw-r--r--app/watchdog_service.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/watchdog_service.hpp b/app/watchdog_service.hpp
index 1d5ffb8..432c7ce 100644
--- a/app/watchdog_service.hpp
+++ b/app/watchdog_service.hpp
@@ -1,5 +1,6 @@
#pragma once
#include <sdbusplus/bus.hpp>
+#include <xyz/openbmc_project/State/Watchdog/server.hpp>
/** @class WatchdogService
* @brief Access to the running OpenBMC watchdog implementation.
@@ -10,12 +11,15 @@ class WatchdogService {
public:
WatchdogService();
+ using Action = sdbusplus::xyz::openbmc_project::State::server::Watchdog::Action;
+
/** @brief Contains a copy of the properties enumerated by the
* watchdog service.
*/
struct Properties {
bool initialized;
bool enabled;
+ Action expireAction;
uint64_t interval;
uint64_t timeRemaining;
};
@@ -40,6 +44,12 @@ class WatchdogService {
*/
void setEnabled(bool enabled);
+ /** @brief Sets the value of the expireAction property on the host watchdog
+ *
+ * @param[in] expireAction - The new expireAction value
+ */
+ void setExpireAction(Action expireAction);
+
/** @brief Sets the value of the interval property on the host watchdog
*
* @param[in] interval - The new interval value
OpenPOWER on IntegriCloud