edu.wpi.first.wpilibj.hal

## Class EncoderJNI

- java.lang.Object
- - edu.wpi.first.wpilibj.hal.JNIWrapper
  - - edu.wpi.first.wpilibj.hal.EncoderJNI

-     public class EncoderJNI
      extends JNIWrapper

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncoderJNI()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `freeEncoder(int encoderHandle)`
    `static int` | `getEncoder(int encoderHandle)`
    `static double` | `getEncoderDecodingScaleFactor(int encoderHandle)`
    `static boolean` | `getEncoderDirection(int encoderHandle)`
    `static double` | `getEncoderDistance(int encoderHandle)`
    `static double` | `getEncoderDistancePerPulse(int encoderHandle)`
    `static int` | `getEncoderEncodingScale(int encoderHandle)`
    `static int` | `getEncoderEncodingType(int encoderHandle)`
    `static int` | `getEncoderFPGAIndex(int encoderHandle)`
    `static double` | `getEncoderPeriod(int encoderHandle)`
    `static double` | `getEncoderRate(int encoderHandle)`
    `static int` | `getEncoderRaw(int encoderHandle)`
    `static int` | `getEncoderSamplesToAverage(int encoderHandle)`
    `static boolean` | `getEncoderStopped(int encoderHandle)`
    `static int` | `getEncodingScaleFactor(int encoderHandle)`
    `static int` | `initializeEncoder(int digitalSourceHandleA, int analogTriggerTypeA, int digitalSourceHandleB, int analogTriggerTypeB, boolean reverseDirection, int encodingType)`
    `static void` | `resetEncoder(int encoderHandle)`
    `static void` | `setEncoderDistancePerPulse(int encoderHandle, double distancePerPulse)`
    `static void` | `setEncoderIndexSource(int encoderHandle, int digitalSourceHandle, int analogTriggerType, int indexingType)`
    `static void` | `setEncoderMaxPeriod(int encoderHandle, double maxPeriod)`
    `static void` | `setEncoderMinRate(int encoderHandle, double minRate)`
    `static void` | `setEncoderReverseDirection(int encoderHandle, boolean reverseDirection)`
    `static void` | `setEncoderSamplesToAverage(int encoderHandle, int samplesToAverage)`

    - ### Methods inherited from class edu.wpi.first.wpilibj.hal.JNIWrapper

      `getPort, getPortWithModule`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EncoderJNI

          public EncoderJNI()

  - ### Method Detail

    - #### initializeEncoder

          public static int initializeEncoder(int digitalSourceHandleA,
                                              int analogTriggerTypeA,
                                              int digitalSourceHandleB,
                                              int analogTriggerTypeB,
                                              boolean reverseDirection,
                                              int encodingType)

    - #### freeEncoder

          public static void freeEncoder(int encoderHandle)

    - #### getEncoder

          public static int getEncoder(int encoderHandle)

    - #### getEncoderRaw

          public static int getEncoderRaw(int encoderHandle)

    - #### getEncodingScaleFactor

          public static int getEncodingScaleFactor(int encoderHandle)

    - #### resetEncoder

          public static void resetEncoder(int encoderHandle)

    - #### getEncoderPeriod

          public static double getEncoderPeriod(int encoderHandle)

    - #### setEncoderMaxPeriod

          public static void setEncoderMaxPeriod(int encoderHandle,
                                                 double maxPeriod)

    - #### getEncoderStopped

          public static boolean getEncoderStopped(int encoderHandle)

    - #### getEncoderDirection

          public static boolean getEncoderDirection(int encoderHandle)

    - #### getEncoderDistance

          public static double getEncoderDistance(int encoderHandle)

    - #### getEncoderRate

          public static double getEncoderRate(int encoderHandle)

    - #### setEncoderMinRate

          public static void setEncoderMinRate(int encoderHandle,
                                               double minRate)

    - #### setEncoderDistancePerPulse

          public static void setEncoderDistancePerPulse(int encoderHandle,
                                                        double distancePerPulse)

    - #### setEncoderReverseDirection

          public static void setEncoderReverseDirection(int encoderHandle,
                                                        boolean reverseDirection)

    - #### setEncoderSamplesToAverage

          public static void setEncoderSamplesToAverage(int encoderHandle,
                                                        int samplesToAverage)

    - #### getEncoderSamplesToAverage

          public static int getEncoderSamplesToAverage(int encoderHandle)

    - #### setEncoderIndexSource

          public static void setEncoderIndexSource(int encoderHandle,
                                                   int digitalSourceHandle,
                                                   int analogTriggerType,
                                                   int indexingType)

    - #### getEncoderFPGAIndex

          public static int getEncoderFPGAIndex(int encoderHandle)

    - #### getEncoderEncodingScale

          public static int getEncoderEncodingScale(int encoderHandle)

    - #### getEncoderDecodingScaleFactor

          public static double getEncoderDecodingScaleFactor(int encoderHandle)

    - #### getEncoderDistancePerPulse

          public static double getEncoderDistancePerPulse(int encoderHandle)

    - #### getEncoderEncodingType

          public static int getEncoderEncodingType(int encoderHandle)