A class that keeps an eye on a threads timer.
More...
#include <threading.h>
A class that keeps an eye on a threads timer.
Definition at line 168 of file threading.h.
◆ WatchDogThread()
xsens::WatchDogThread::WatchDogThread |
( |
WatchDogFunction |
func, |
|
|
void * |
param = NULL |
|
) |
| |
◆ ~WatchDogThread()
xsens::WatchDogThread::~WatchDogThread |
( |
| ) |
|
◆ getThreadId()
XsThreadId xsens::WatchDogThread::getThreadId |
( |
void |
| ) |
const |
|
inline |
◆ isAlive()
bool xsens::WatchDogThread::isAlive |
( |
void |
| ) |
const volatile |
|
privatenoexcept |
◆ isRunning()
bool xsens::WatchDogThread::isRunning |
( |
void |
| ) |
const volatile |
|
privatenoexcept |
◆ resetTimer()
bool xsens::WatchDogThread::resetTimer |
( |
uint32_t |
timeout = 0 | ) |
|
Resets the timer and sets a timeout.
- Parameters
-
timeout | The timeout value to set |
- Returns
- True if successful
Definition at line 739 of file threading.cpp.
◆ startTimer()
bool xsens::WatchDogThread::startTimer |
( |
uint32_t |
timeout = 10000 , |
|
|
const char * |
name = NULL |
|
) |
| |
Starts a timer using some parameters.
- Parameters
-
timeout | The timeout value to use |
name | The name of a thread to set |
- Returns
- True if successful
Definition at line 551 of file threading.cpp.
◆ stopTimer()
bool xsens::WatchDogThread::stopTimer |
( |
void |
| ) |
|
|
noexcept |
Stops the timer.
- Returns
- True if successful
Definition at line 591 of file threading.cpp.
◆ threadInit()
◆ threadMain()
void xsens::WatchDogThread::threadMain |
( |
void |
| ) |
|
|
private |
◆ m_attr
pthread_attr_t xsens::WatchDogThread::m_attr |
|
private |
◆ m_func
◆ m_mutex
Mutex xsens::WatchDogThread::m_mutex |
|
private |
◆ m_name
char* xsens::WatchDogThread::m_name |
|
private |
◆ m_param
void* xsens::WatchDogThread::m_param |
|
private |
◆ m_reset
bool xsens::WatchDogThread::m_reset |
|
private |
◆ m_running
bool xsens::WatchDogThread::m_running |
|
private |
◆ m_stop
bool xsens::WatchDogThread::m_stop |
|
private |
◆ m_thread
XsThread xsens::WatchDogThread::m_thread |
|
private |
◆ m_threadId
◆ m_timeout
volatile std::atomic<std::uint32_t> xsens::WatchDogThread::m_timeout |
|
private |
The documentation for this class was generated from the following files: