001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.hal.simulation;
006
007import edu.wpi.first.hal.JNIWrapper;
008
009public class EncoderDataJNI extends JNIWrapper {
010  public static native int registerInitializedCallback(
011      int index, NotifyCallback callback, boolean initialNotify);
012
013  public static native void cancelInitializedCallback(int index, int uid);
014
015  public static native boolean getInitialized(int index);
016
017  public static native void setInitialized(int index, boolean initialized);
018
019  public static native int registerCountCallback(
020      int index, NotifyCallback callback, boolean initialNotify);
021
022  public static native void cancelCountCallback(int index, int uid);
023
024  public static native int getCount(int index);
025
026  public static native void setCount(int index, int count);
027
028  public static native int registerPeriodCallback(
029      int index, NotifyCallback callback, boolean initialNotify);
030
031  public static native void cancelPeriodCallback(int index, int uid);
032
033  public static native double getPeriod(int index);
034
035  public static native void setPeriod(int index, double period);
036
037  public static native int registerResetCallback(
038      int index, NotifyCallback callback, boolean initialNotify);
039
040  public static native void cancelResetCallback(int index, int uid);
041
042  public static native boolean getReset(int index);
043
044  public static native void setReset(int index, boolean reset);
045
046  public static native int registerMaxPeriodCallback(
047      int index, NotifyCallback callback, boolean initialNotify);
048
049  public static native void cancelMaxPeriodCallback(int index, int uid);
050
051  public static native double getMaxPeriod(int index);
052
053  public static native void setMaxPeriod(int index, double maxPeriod);
054
055  public static native int registerDirectionCallback(
056      int index, NotifyCallback callback, boolean initialNotify);
057
058  public static native void cancelDirectionCallback(int index, int uid);
059
060  public static native boolean getDirection(int index);
061
062  public static native void setDirection(int index, boolean direction);
063
064  public static native int registerReverseDirectionCallback(
065      int index, NotifyCallback callback, boolean initialNotify);
066
067  public static native void cancelReverseDirectionCallback(int index, int uid);
068
069  public static native boolean getReverseDirection(int index);
070
071  public static native void setReverseDirection(int index, boolean reverseDirection);
072
073  public static native int registerSamplesToAverageCallback(
074      int index, NotifyCallback callback, boolean initialNotify);
075
076  public static native void cancelSamplesToAverageCallback(int index, int uid);
077
078  public static native int getSamplesToAverage(int index);
079
080  public static native void setSamplesToAverage(int index, int samplesToAverage);
081
082  public static native void setDistance(int index, double distance);
083
084  public static native double getDistance(int index);
085
086  public static native void setRate(int index, double rate);
087
088  public static native double getRate(int index);
089
090  public static native void resetData(int index);
091
092  public static native int findForChannel(int channel);
093}