summaryrefslogtreecommitdiffstats
path: root/app/watchdog_service.cpp
diff options
context:
space:
mode:
authorDeepak Kumar Sahu <deepakx.sahu@intel.com>2019-05-20 14:58:58 +0000
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-09-10 23:39:02 +0000
commitcfae948b82765c8dbaec809e0f13744e8dedb934 (patch)
treeb6059a45953b8ef96d8c62f84b17bb74386b8347 /app/watchdog_service.cpp
parent7dc4ac0246bfae3da04c11e7a2053d28acfde35c (diff)
downloadphosphor-host-ipmid-cfae948b82765c8dbaec809e0f13744e8dedb934.tar.gz
phosphor-host-ipmid-cfae948b82765c8dbaec809e0f13744e8dedb934.zip
Watchdog: move get and set watchdog to new api.
Rewrite "get and set watchdog" command to use the newly introduced ipmi api. Tested: Verified using ipmitool "get and set watchdog", timer behavior is same before and after the changes. Testing Procedure: default watchdog timer is 11.2 seconds. ipmitool raw 0x06 0x25 ---> Get Output: 00 00 00 00 70 17 70 17 Note: Here 70 count(hex value)->112 count(decimal value)->112*100=11200ms [100ms per count]->11.2sec (watchdog timer) watchdog timer set to 20 seconds. ipmitool raw 0x06 0x24 0x44 0x01 0x00 0x10 0xc8 0x00 ----> Set output: ipmitool raw 0x06 0x25 ---> Get output: 04 01 00 00 c8 00 c8 00 Note: Here 20sec->20000ms->200count->c8 (hex value) Signed-off-by: Deepak Kumar Sahu <deepakx.sahu@intel.com> Change-Id: Id8c096bc1635d1900ee842a9726c49fb690fa8bc
Diffstat (limited to 'app/watchdog_service.cpp')
-rw-r--r--app/watchdog_service.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
index 0b88369..c567ca9 100644
--- a/app/watchdog_service.cpp
+++ b/app/watchdog_service.cpp
@@ -186,6 +186,11 @@ void WatchdogService::setTimerUse(TimerUse timerUse)
setProperty("CurrentTimerUse", convertForMessage(timerUse));
}
+void WatchdogService::setExpiredTimerUse(TimerUse timerUse)
+{
+ setProperty("ExpiredTimerUse", convertForMessage(timerUse));
+}
+
void WatchdogService::setInterval(uint64_t interval)
{
setProperty("Interval", interval);
OpenPOWER on IntegriCloud