WPILib 2012
WPILibRoboticsLibraryforFRC
Watchdog.h
00001 /*----------------------------------------------------------------------------*/
00002 /* Copyright (c) FIRST 2008. All Rights Reserved.                                                         */
00003 /* Open Source Software - may be modified and shared by FRC teams. The code   */
00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib.  */
00005 /*----------------------------------------------------------------------------*/
00006 
00007 #ifndef WATCHDOG_H
00008 #define WATCHDOG_H
00009 
00010 #include "ChipObject.h"
00011 #include "SensorBase.h"
00012 #include "Base.h"
00013 
00025 class Watchdog : public SensorBase
00026 {
00027 public:
00028         static const double kDefaultWatchdogExpiration = 0.5;
00029 
00030         Watchdog();
00031         virtual ~Watchdog();
00032         bool Feed();
00033         void Kill();
00034         double GetTimer();
00035         double GetExpiration();
00036         void SetExpiration(double expiration);
00037         bool GetEnabled();
00038         void SetEnabled(bool enabled);
00039         bool IsAlive();
00040         bool IsSystemActive();
00041 
00042 private:
00043         tWatchdog *m_fpgaWatchDog;
00044         DISALLOW_COPY_AND_ASSIGN(Watchdog);
00045 };
00046 
00047 #endif
 All Classes Functions Variables