Package com.pi4j.io.wdt.impl
Class WDTimerImpl
- java.lang.Object
-
- com.pi4j.io.wdt.impl.WDTimerImpl
-
-
Constructor Summary
Constructors Constructor Description WDTimerImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close a watchdog (file).voiddisable()Disable watchdog with "Magic Close".static WDTimergetInstance()Singleton.intgetTimeOut()Get timeoutvoidheartbeat()Ping a watchdog.voidopen()Open Watchdog.voidopen(String file)Open custom WatchdogvoidsetTimeOut(int timeout)Set new timeout
-
-
-
Method Detail
-
getInstance
public static WDTimer getInstance()
Singleton.- Returns:
- instance
-
open
public void open() throws IOExceptionOpen Watchdog.- Specified by:
openin interfaceWDTimer- Throws:
IOException
-
open
public void open(String file) throws IOException
Open custom Watchdog- Parameters:
file-- Throws:
IOException
-
setTimeOut
public void setTimeOut(int timeout) throws IOExceptionSet new timeout- Specified by:
setTimeOutin interfaceWDTimer- Parameters:
timeout-- Throws:
IOException
-
getTimeOut
public int getTimeOut() throws IOExceptionGet timeout- Specified by:
getTimeOutin interfaceWDTimer- Returns:
- Throws:
IOException
-
heartbeat
public void heartbeat() throws IOExceptionPing a watchdog.- Specified by:
heartbeatin interfaceWDTimer- Throws:
IOException
-
disable
public void disable() throws IOExceptionDisable watchdog with "Magic Close". Now watchdog not working. Close watchdog without call disable causes RaspberryPi reboot!- Specified by:
disablein interfaceWDTimer- Throws:
IOException
-
close
public void close() throws IOExceptionClose a watchdog (file). If close withoutdisable()Raspberry reboot after timeout expired.- Specified by:
closein interfaceWDTimer- Throws:
IOException
-
-