Class DigitalSource

  extended by edu.wpi.first.wpilibj.SensorBase
      extended by edu.wpi.first.wpilibj.InterruptableSensorBase
          extended by edu.wpi.first.wpilibj.DigitalSource
All Implemented Interfaces:
Direct Known Subclasses:
AnalogTriggerOutput, DigitalInput, DigitalOutput

public abstract class DigitalSource
extends InterruptableSensorBase

DigitalSource Interface. The DigitalSource represents all the possible inputs for a counter or a quadrature encoder. The source may be either a digital input or an analog input. If the caller just provides a channel, then a digital input will be constructed and freed when finished for the source. The source can either be a digital input or analog trigger but not both.

Field Summary
Fields inherited from class edu.wpi.first.wpilibj.InterruptableSensorBase
interrupts, m_interrupt, m_interruptIndex, m_manager
Fields inherited from class edu.wpi.first.wpilibj.SensorBase
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond, n_simProperties
Constructor Summary
Method Summary
abstract  boolean getAnalogTriggerForRouting()
          Is this an analog trigger
abstract  int getChannelForRouting()
          Get the channel routing number
abstract  int getModuleForRouting()
          Get the module routing number
Methods inherited from class edu.wpi.first.wpilibj.InterruptableSensorBase
allocateInterrupts, cancelInterrupts, disableInterrupts, enableInterrupts, readInterruptTimestamp, waitForInterrupt
Methods inherited from class edu.wpi.first.wpilibj.SensorBase
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, free, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, getSimProperties, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DigitalSource()
Method Detail


public abstract int getChannelForRouting()
Get the channel routing number

channel routing number


public abstract int getModuleForRouting()
Get the module routing number

module routing number


public abstract boolean getAnalogTriggerForRouting()
Is this an analog trigger

true if this is an analog trigger