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 void
close()
Close a watchdog (file).void
disable()
Disable watchdog with "Magic Close".static WDTimer
getInstance()
Singleton.int
getTimeOut()
Get timeoutvoid
heartbeat()
Ping a watchdog.void
open()
Open Watchdog.void
open(String file)
Open custom Watchdogvoid
setTimeOut(int timeout)
Set new timeout
-
-
-
Method Detail
-
getInstance
public static WDTimer getInstance()
Singleton.- Returns:
- instance
-
open
public void open() throws IOException
Open Watchdog.- Specified by:
open
in 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 IOException
Set new timeout- Specified by:
setTimeOut
in interfaceWDTimer
- Parameters:
timeout
-- Throws:
IOException
-
getTimeOut
public int getTimeOut() throws IOException
Get timeout- Specified by:
getTimeOut
in interfaceWDTimer
- Returns:
- Throws:
IOException
-
heartbeat
public void heartbeat() throws IOException
Ping a watchdog.- Specified by:
heartbeat
in interfaceWDTimer
- Throws:
IOException
-
disable
public void disable() throws IOException
Disable watchdog with "Magic Close". Now watchdog not working. Close watchdog without call disable causes RaspberryPi reboot!- Specified by:
disable
in interfaceWDTimer
- Throws:
IOException
-
close
public void close() throws IOException
Close a watchdog (file). If close withoutdisable()
Raspberry reboot after timeout expired.- Specified by:
close
in interfaceWDTimer
- Throws:
IOException
-
-