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 ANALOG_TRIGGER_OUTPUT_H_ 00008 #define ANALOG_TRIGGER_OUTPUT_H_ 00009 00010 #include "DigitalSource.h" 00011 00012 class AnalogTrigger; 00013 00041 class AnalogTriggerOutput: public DigitalSource 00042 { 00043 friend class AnalogTrigger; 00044 public: 00045 typedef enum {kInWindow=0, kState=1, kRisingPulse=2, kFallingPulse=3} Type; 00046 00047 virtual ~AnalogTriggerOutput(); 00048 bool Get(); 00049 00050 // DigitalSource interface 00051 virtual UINT32 GetChannelForRouting(); 00052 virtual UINT32 GetModuleForRouting(); 00053 virtual bool GetAnalogTriggerForRouting(); 00054 virtual void RequestInterrupts(tInterruptHandler handler, void *param=NULL); 00055 virtual void RequestInterrupts(); 00056 protected: 00057 AnalogTriggerOutput(AnalogTrigger *trigger, Type outputType); 00058 00059 private: 00060 AnalogTrigger *m_trigger; 00061 Type m_outputType; 00062 }; 00063 00064 00065 #endif