UWB-Tracking
Loading...
Searching...
No Matches
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Watchdog Class Reference

Watchdog class for monitoring and resetting a timer. More...

#include <watchdog.h>

Public Member Functions

 Watchdog (unsigned long timeoutMillis)
 Constructor to create a Watchdog instance. More...
 
void resetTimer ()
 Reset the timer to the initial timeout value. This has to be called within timeoutMillis or else the timer will trigger an esp restart. More...
 
void begin ()
 Start the watchdog timer. More...
 
void stop ()
 Stop and release the watchdog timer. More...
 
unsigned long get_timeout ()
 Get the milliseconds of the Timeout. More...
 

Static Private Member Functions

static void timerCallback (TimerHandle_t xTimer)
 Static callback function for the timer expiration event. More...
 

Private Attributes

unsigned long timeoutMillis
 The timeout duration in milliseconds. More...
 
TimerHandle_t timer
 Timer handle for the watchdog timer. More...
 

Detailed Description

Watchdog class for monitoring and resetting a timer.

Constructor & Destructor Documentation

◆ Watchdog()

Watchdog ( unsigned long  timeoutMillis)
inline

Constructor to create a Watchdog instance.

Parameters
timeoutMillisThe timeout duration in milliseconds.

Member Function Documentation

◆ begin()

void begin ( )

Start the watchdog timer.

◆ get_timeout()

unsigned long get_timeout ( )

Get the milliseconds of the Timeout.

◆ resetTimer()

void resetTimer ( )

Reset the timer to the initial timeout value. This has to be called within timeoutMillis or else the timer will trigger an esp restart.

◆ stop()

void stop ( )

Stop and release the watchdog timer.

◆ timerCallback()

static void timerCallback ( TimerHandle_t  xTimer)
inlinestaticprivate

Static callback function for the timer expiration event.

Parameters
xTimerThe timer handle.

Member Data Documentation

◆ timeoutMillis

unsigned long timeoutMillis
private

The timeout duration in milliseconds.

◆ timer

TimerHandle_t timer
private

Timer handle for the watchdog timer.


The documentation for this class was generated from the following files: