summaryrefslogtreecommitdiffstats
path: root/app/watchdog_service.cpp
diff options
context:
space:
mode:
authorYong Li <yong.b.li@linux.intel.com>2019-01-11 17:36:17 +0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-02-12 21:14:25 +0000
commit118907ed5aff8ad5037f98bf8699c5105781e4dd (patch)
treef4dd82d8a48d84ab44329a805ad6adf5cc835f8a /app/watchdog_service.cpp
parent2c2af2ca713f56b117ad2c8c1a1f0e370b7c2d9c (diff)
downloadphosphor-host-ipmid-118907ed5aff8ad5037f98bf8699c5105781e4dd.tar.gz
phosphor-host-ipmid-118907ed5aff8ad5037f98bf8699c5105781e4dd.zip
Add timer use field support in watchdog command
Tested: ipmitool raw 0x06 0x24 1 0 0 0 0 0 ipmitool mc watchdog get Change-Id: Iaffd6622821d33183a52f54a4e2e52a36aa17dde Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Diffstat (limited to 'app/watchdog_service.cpp')
-rw-r--r--app/watchdog_service.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
index 1deb58b..e65ea63 100644
--- a/app/watchdog_service.cpp
+++ b/app/watchdog_service.cpp
@@ -80,6 +80,9 @@ WatchdogService::Properties WatchdogService::getProperties()
wd_prop.enabled = get<bool>(properties.at("Enabled"));
wd_prop.expireAction = Watchdog::convertActionFromString(
get<std::string>(properties.at("ExpireAction")));
+ wd_prop.timerUse = Watchdog::convertTimerUseFromString(
+ get<std::string>(properties.at("CurrentTimerUse")));
+
wd_prop.interval = get<uint64_t>(properties.at("Interval"));
wd_prop.timeRemaining = get<uint64_t>(properties.at("TimeRemaining"));
return wd_prop;
@@ -179,6 +182,11 @@ void WatchdogService::setExpireAction(Action expireAction)
setProperty("ExpireAction", convertForMessage(expireAction));
}
+void WatchdogService::setTimerUse(TimerUse timerUse)
+{
+ setProperty("CurrentTimerUse", convertForMessage(timerUse));
+}
+
void WatchdogService::setInterval(uint64_t interval)
{
setProperty("Interval", interval);
OpenPOWER on IntegriCloud