WPILib 2012
WPILibRoboticsLibraryforFRC
MotorSafety.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 #ifndef _MOTOR_SAFETY_
00007 #define _MOTOR_SAFETY_
00008 
00009 #define DEFAULT_SAFETY_EXPIRATION 0.1
00010 
00011 class MotorSafety {
00012 public:
00013         virtual void SetExpiration(float timeout) = 0;
00014         virtual float GetExpiration() = 0;
00015         virtual bool IsAlive() = 0;
00016         virtual void StopMotor() = 0;
00017         virtual void SetSafetyEnabled(bool enabled) = 0;
00018         virtual bool IsSafetyEnabled() = 0;
00019         virtual void GetDescription(char *desc) = 0;
00020 };
00021 
00022 #endif
00023 
 All Classes Functions Variables