jerrym | f157933 | 2013-02-07 01:56:28 +0000 | [diff] [blame^] | 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 DIGITAL_SOURCE_H
|
| 8 | #define DIGITAL_SOURCE_H
|
| 9 |
|
| 10 | #include "InterruptableSensorBase.h"
|
| 11 |
|
| 12 | /**
|
| 13 | * DigitalSource Interface.
|
| 14 | * The DigitalSource represents all the possible inputs for a counter or a quadrature encoder. The source may be
|
| 15 | * either a digital input or an analog input. If the caller just provides a channel, then a digital input will be
|
| 16 | * constructed and freed when finished for the source. The source can either be a digital input or analog trigger
|
| 17 | * but not both.
|
| 18 | */
|
| 19 | class DigitalSource: public InterruptableSensorBase
|
| 20 | {
|
| 21 | public:
|
| 22 | virtual ~DigitalSource();
|
| 23 | virtual UINT32 GetChannelForRouting() = 0;
|
| 24 | virtual UINT32 GetModuleForRouting() = 0;
|
| 25 | virtual bool GetAnalogTriggerForRouting() = 0;
|
| 26 | virtual void RequestInterrupts(tInterruptHandler handler, void *param) = 0;
|
| 27 | virtual void RequestInterrupts() = 0;
|
| 28 | };
|
| 29 |
|
| 30 | #endif
|
| 31 |
|