WPILib  2014.0
WPIRoboticsLibraryforFRC
 All Classes Functions Variables Pages
Watchdog.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef WATCHDOG_H
8 #define WATCHDOG_H
9 
10 #include "ChipObject.h"
11 #include "SensorBase.h"
12 #include "Base.h"
13 
25 class Watchdog : public SensorBase
26 {
27 public:
28  static constexpr double kDefaultWatchdogExpiration = 0.5;
29 
30  Watchdog();
31  virtual ~Watchdog();
32  bool Feed();
33  void Kill();
34  double GetTimer();
35  double GetExpiration();
36  void SetExpiration(double expiration);
37  bool GetEnabled();
38  void SetEnabled(bool enabled);
39  bool IsAlive();
40  bool IsSystemActive();
41 
42 private:
43  tWatchdog *m_fpgaWatchDog;
44  DISALLOW_COPY_AND_ASSIGN(Watchdog);
45 };
46 
47 #endif
void SetEnabled(bool enabled)
Definition: Watchdog.cpp:131
Watchdog()
Definition: Watchdog.cpp:14
void SetExpiration(double expiration)
Definition: Watchdog.cpp:99
double GetTimer()
Definition: Watchdog.cpp:73
bool Feed()
Definition: Watchdog.cpp:46
Definition: SensorBase.h:20
bool GetEnabled()
Definition: Watchdog.cpp:111
double GetExpiration()
Definition: Watchdog.cpp:86
Definition: Watchdog.h:25
bool IsSystemActive()
Definition: Watchdog.cpp:163
virtual ~Watchdog()
Definition: Watchdog.cpp:27
void Kill()
Definition: Watchdog.cpp:61
bool IsAlive()
Definition: Watchdog.cpp:150