From b638de22154aa4cae788d9117d2507394388f839 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Fri, 9 Feb 2018 16:12:53 -0800 Subject: 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 --- app/watchdog_service.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/watchdog_service.hpp') 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 +#include /** @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 -- cgit v1.2.1