scc
2022.4.0
SystemC components library
|
a watch dog based on https://github.com/didenko/TimeoutGuard More...
#include <watchdog.h>
Public Member Functions | |
watchdog (std::chrono::system_clock::duration timeout, std::function< void(void)> alarm_cb, std::chrono::system_clock::duration sleep_duration) | |
watchdog (std::chrono::system_clock::duration timeout, std::function< void(void)> alarm) | |
~watchdog () | |
watchdog (const watchdog &)=delete | |
watchdog & | operator= (const watchdog &)=delete |
watchdog (watchdog &&)=delete | |
watchdog & | operator= (watchdog &&)=delete |
void | arm () |
void | re_arm () |
a watch dog based on https://github.com/didenko/TimeoutGuard
Definition at line 37 of file watchdog.h.
util::watchdog::watchdog | ( | std::chrono::system_clock::duration | timeout, |
std::function< void(void)> | alarm_cb, | ||
std::chrono::system_clock::duration | sleep_duration | ||
) |
constructor
timeout | until the watch dog is going to expire |
alarm_cb | the function to be called once the watch dog expires, upon expiration the watch dog goes into idle state |
sleep_duration | the granularity to check expiration |
util::watchdog::watchdog | ( | std::chrono::system_clock::duration | timeout, |
std::function< void(void)> | alarm | ||
) |
timeout | timeout until the watch dog is going to expire |
alarm | the function to be called once the watch dog expires, upon expiration the watch dog goes into idle state |
watchdog::~watchdog | ( | ) |
destructor
Definition at line 36 of file watchdog.cpp.
void watchdog::arm | ( | ) |
arms the watch dog
Definition at line 66 of file watchdog.cpp.
void watchdog::re_arm | ( | ) |
re-arms the watch dog
Definition at line 72 of file watchdog.cpp.