Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj
Class InterruptableSensorBase

    java.lang.Object
      edu.wpi.first.wpilibj.SensorBase
          edu.wpi.first.wpilibj.InterruptableSensorBase

Direct Known Subclasses:
  DigitalSource

    public abstract class InterruptableSensorBase

extends SensorBase

Base for sensors to be used with interrupts

Field Summary
`protected static Resource` | `interrupts` Resource manager
`protected tInterrupt` | `m_interrupt` The interrupt resource
`protected int` | `m_interruptIndex` The index of the interrupt
`protected tInterruptManager` | `m_manager` The interrupt manager resource

Fields inherited from class edu.wpi.first.wpilibj.SensorBase
`kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond`

Constructor Summary
`InterruptableSensorBase()` Create a new InterrupatableSensorBase

Method Summary
`void` | `allocateInterrupts(boolean watcher)` Allocate the interrupt
`void` | `cancelInterrupts()` Cancel interrupts on this device.
`void` | `disableInterrupts()` Disable Interrupts without without deallocating structures.
`void` | `enableInterrupts()` Enable interrupts to occur on this input.
`double` | `readInterruptTimestamp()` Return the timestamp for the interrupt that occurred most recently.
`void` | `waitForInterrupt(double timeout)` In synchronous mode, wait for the defined interrupt to occur.

Methods inherited from class edu.wpi.first.wpilibj.SensorBase
`checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, free, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_interrupt

    protected tInterrupt m_interrupt

  The interrupt resource

### m_manager

    protected tInterruptManager m_manager

  The interrupt manager resource

### m_interruptIndex

    protected int m_interruptIndex

  The index of the interrupt

### interrupts

    protected static Resource interrupts

  Resource manager

Constructor Detail

### InterruptableSensorBase

    public InterruptableSensorBase()

  Create a new InterrupatableSensorBase

Method Detail

### allocateInterrupts

    public void allocateInterrupts(boolean watcher)

  Allocate the interrupt

  Parameters:
    `watcher` -

### cancelInterrupts

    public void cancelInterrupts()

  Cancel interrupts on this device. This deallocates all the chipobject structures and disables any interrupts.

### waitForInterrupt

    public void waitForInterrupt(double timeout)

  In synchronous mode, wait for the defined interrupt to occur.

  Parameters:
    `timeout` - Timeout in seconds

### enableInterrupts

    public void enableInterrupts()

  Enable interrupts to occur on this input. Interrupts are disabled when the RequestInterrupt call is made. This gives time to do the setup of the other options before starting to field interrupts.

### disableInterrupts

    public void disableInterrupts()

  Disable Interrupts without without deallocating structures.

### readInterruptTimestamp

    public double readInterruptTimestamp()

  Return the timestamp for the interrupt that occurred most recently. This is in the same time domain as getClock().

  Returns:
    Timestamp in seconds since boot.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"