WPILib 2012
WPILibRoboticsLibraryforFRC
|
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 CPPCOUNTER_BASE_H_ 00008 #define CPPCOUNTER_BASE_H_ 00009 00015 class CounterBase 00016 { 00017 public: 00018 typedef enum {k1X, k2X, k4X} EncodingType; 00019 00020 virtual ~CounterBase() {} 00021 virtual void Start() = 0; 00022 virtual INT32 Get() = 0; 00023 virtual void Reset() = 0; 00024 virtual void Stop() = 0; 00025 virtual double GetPeriod() = 0; 00026 virtual void SetMaxPeriod(double maxPeriod) = 0; 00027 virtual bool GetStopped() = 0; 00028 virtual bool GetDirection() = 0; 00029 }; 00030 00031 #endif