WPILib  2014.0
WPIRoboticsLibraryforFRC
 All Classes Functions Variables Pages
AnalogTriggerOutput.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 ANALOG_TRIGGER_OUTPUT_H_
8 #define ANALOG_TRIGGER_OUTPUT_H_
9 
10 #include "DigitalSource.h"
11 
12 class AnalogTrigger;
13 
42 {
43  friend class AnalogTrigger;
44 public:
45  typedef enum {kInWindow=0, kState=1, kRisingPulse=2, kFallingPulse=3} Type;
46 
47  virtual ~AnalogTriggerOutput();
48  bool Get();
49 
50  // DigitalSource interface
51  virtual uint32_t GetChannelForRouting();
52  virtual uint32_t GetModuleForRouting();
53  virtual bool GetAnalogTriggerForRouting();
54  virtual void RequestInterrupts(tInterruptHandler handler, void *param=NULL);
55  virtual void RequestInterrupts();
56 protected:
57  AnalogTriggerOutput(AnalogTrigger *trigger, Type outputType);
58 
59 private:
60  AnalogTrigger *m_trigger;
61  Type m_outputType;
62 };
63 
64 
65 #endif
Definition: AnalogTrigger.h:16
Definition: AnalogTriggerOutput.h:41
Definition: DigitalSource.h:19
AnalogTriggerOutput(AnalogTrigger *trigger, Type outputType)
Definition: AnalogTriggerOutput.cpp:21
bool Get()
Definition: AnalogTriggerOutput.cpp:36
virtual uint32_t GetModuleForRouting()
Definition: AnalogTriggerOutput.cpp:66
virtual uint32_t GetChannelForRouting()
Definition: AnalogTriggerOutput.cpp:58
virtual bool GetAnalogTriggerForRouting()
Definition: AnalogTriggerOutput.cpp:74
virtual void RequestInterrupts()
Synchronus Wait version.
Definition: AnalogTriggerOutput.cpp:91