Project

General

Profile

Using Watchdog » qwatchdog.h

Jonathan Cormier, 10/14/2014 02:27 PM

 
1
/**
2
 * \file qwatchdog.h
3
 *
4
 * \brief Simple QT based watchdog class definition
5
 *
6
 * \author Tim Iskander
7
 *
8
 *     o  0
9
 *     | /       Copyright (c) 2005-2012
10
 *    (CL)---o   Critical Link, LLC
11
 *      \
12
 *       O
13
 */
14
#ifndef TCWATCHDOG_H_
15
#define TCWATCHDOG_H_
16

    
17
#include <QObject>
18

    
19
/**
20
 * @brief Watchdog Class. Pings the System watchdog
21
 */
22
class tcQWatchDog : public QObject
23
{
24
    Q_OBJECT
25
public:
26
    tcQWatchDog  (int anBarkMs = 10000, QObject* apParent=NULL);
27
    virtual ~tcQWatchDog ();
28

    
29
protected:
30
    void timerEvent(QTimerEvent *);
31

    
32
    int     mnBarkMs;   //!< Watchdog Ping Interval in ms
33
    int     mnFd;       //!< File descripter for Watchdog
34
    int     mnTimerId;  //!< TimerID
35
};
36

    
37
#endif  // TCWATCHDOG_H_
38

    
(2-2/7) Go to top
Add picture from clipboard (Maximum size: 1 GB)