Skip to main content

Watchdog

A watchdog timer is used to reset the system if the system fails or locks up.

It is recommended to run the watchdog inside a thread in the application.

Max timeout is 131 seconds.

using GHIElectronics.Endpoint.Core;
using GHIElectronics.Endpoint.Devices.Watchdog;

using var watchdog = WatchdogController.FromName(EPDomino24.Watchdog.Id);

watchdog.Enable(TimeSpan.FromSeconds(10)); // 10 seconds
var cnt = 0;
while (true) {
Console.WriteLine("cnt: " + cnt++);
Thread.Sleep(1000);

watchdog.Reset();
}