private bool Notify() { Logger.LogTrace($"{nameof(WatchdogService)} Notifying watchdog."); switch (WatchdogLib.Notify()) { case WatchDogResponse.Error: Logger.LogError("Couldn't notify the watchdog, is the library installed?"); return(false); } return(true); }
private bool Init(out ulong intervalMicroSeconds) { switch (WatchdogLib.Enabled(out intervalMicroSeconds)) { case WatchDogResponse.Ok: Logger.LogInformation($"Watchdog expect notify messages every {intervalMicroSeconds * 1e-6} seconds."); return(true); case WatchDogResponse.Error: Logger.LogError("Couldn't call watchdog_enabled!"); break; case WatchDogResponse.NoActionRequired: Logger.LogInformation("Watchdog doesn't expect notify messages!"); break; } return(false); }