ARC SDK
Watchdog.h
1 #ifndef __ARC_WATCHDOG_H__
2 #define __ARC_WATCHDOG_H__
3 
4 namespace Arc {
5 
6  // Internal implementation of watchdog.
7  // Currently only single global watchdog is supported.
8  class Watchdog;
9 
11 
14  private:
15  Watchdog& instance_;
16  time_t last;
17 
18  public:
19  WatchdogListener(void);
20 
22 
24  bool Listen(void);
25 
27 
29  bool Listen(int limit, bool& error);
30  };
31 
33 
36  private:
37  int id_;
38 
39  public:
40 
42 
46  WatchdogChannel(int timeout);
47 
49  ~WatchdogChannel(void);
50 
52  void Kick(void);
53  };
54 
55 } // namespace Arc
56 
57 #endif // __ARC_WATCHDOG_H__
58