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
009/** JNI for analog input data. */
010public class AnalogInDataJNI extends JNIWrapper {
011  public static native int registerInitializedCallback(
012      int index, NotifyCallback callback, boolean initialNotify);
013
014  public static native void cancelInitializedCallback(int index, int uid);
015
016  public static native boolean getInitialized(int index);
017
018  public static native void setInitialized(int index, boolean initialized);
019
020  public static native int registerAverageBitsCallback(
021      int index, NotifyCallback callback, boolean initialNotify);
022
023  public static native void cancelAverageBitsCallback(int index, int uid);
024
025  public static native int getAverageBits(int index);
026
027  public static native void setAverageBits(int index, int averageBits);
028
029  public static native int registerOversampleBitsCallback(
030      int index, NotifyCallback callback, boolean initialNotify);
031
032  public static native void cancelOversampleBitsCallback(int index, int uid);
033
034  public static native int getOversampleBits(int index);
035
036  public static native void setOversampleBits(int index, int oversampleBits);
037
038  public static native int registerVoltageCallback(
039      int index, NotifyCallback callback, boolean initialNotify);
040
041  public static native void cancelVoltageCallback(int index, int uid);
042
043  public static native double getVoltage(int index);
044
045  public static native void setVoltage(int index, double voltage);
046
047  public static native int registerAccumulatorInitializedCallback(
048      int index, NotifyCallback callback, boolean initialNotify);
049
050  public static native void cancelAccumulatorInitializedCallback(int index, int uid);
051
052  public static native boolean getAccumulatorInitialized(int index);
053
054  public static native void setAccumulatorInitialized(int index, boolean accumulatorInitialized);
055
056  public static native int registerAccumulatorValueCallback(
057      int index, NotifyCallback callback, boolean initialNotify);
058
059  public static native void cancelAccumulatorValueCallback(int index, int uid);
060
061  public static native long getAccumulatorValue(int index);
062
063  public static native void setAccumulatorValue(int index, long accumulatorValue);
064
065  public static native int registerAccumulatorCountCallback(
066      int index, NotifyCallback callback, boolean initialNotify);
067
068  public static native void cancelAccumulatorCountCallback(int index, int uid);
069
070  public static native long getAccumulatorCount(int index);
071
072  public static native void setAccumulatorCount(int index, long accumulatorCount);
073
074  public static native int registerAccumulatorCenterCallback(
075      int index, NotifyCallback callback, boolean initialNotify);
076
077  public static native void cancelAccumulatorCenterCallback(int index, int uid);
078
079  public static native int getAccumulatorCenter(int index);
080
081  public static native void setAccumulatorCenter(int index, int AccumulatorCenter);
082
083  public static native int registerAccumulatorDeadbandCallback(
084      int index, NotifyCallback callback, boolean initialNotify);
085
086  public static native void cancelAccumulatorDeadbandCallback(int index, int uid);
087
088  public static native int getAccumulatorDeadband(int index);
089
090  public static native void setAccumulatorDeadband(int index, int AccumulatorDeadband);
091
092  public static native void resetData(int index);
093
094  /** Utility class. */
095  private AnalogInDataJNI() {}
096}