edu.wpi.first.wpilibj
Class DigitalSource

java.lang.Object
  extended by edu.wpi.first.wpilibj.SensorBase
      extended by edu.wpi.first.wpilibj.InterruptableSensorBase
          extended by edu.wpi.first.wpilibj.DigitalSource
All Implemented Interfaces:
FrcBotSimComponent
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
DigitalSource()
           
 
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

DigitalSource

public DigitalSource()
Method Detail

getChannelForRouting

public abstract int getChannelForRouting()
Get the channel routing number

Returns:
channel routing number

getModuleForRouting

public abstract int getModuleForRouting()
Get the module routing number

Returns:
module routing number

getAnalogTriggerForRouting

public abstract boolean getAnalogTriggerForRouting()
Is this an analog trigger

Returns:
true if this is an analog trigger