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 roboRIO data. */
010public class RoboRioDataJNI extends JNIWrapper {
011  public static native int registerFPGAButtonCallback(
012      NotifyCallback callback, boolean initialNotify);
013
014  public static native void cancelFPGAButtonCallback(int uid);
015
016  public static native boolean getFPGAButton();
017
018  public static native void setFPGAButton(boolean fPGAButton);
019
020  public static native int registerVInVoltageCallback(
021      NotifyCallback callback, boolean initialNotify);
022
023  public static native void cancelVInVoltageCallback(int uid);
024
025  public static native double getVInVoltage();
026
027  public static native void setVInVoltage(double vInVoltage);
028
029  public static native int registerVInCurrentCallback(
030      NotifyCallback callback, boolean initialNotify);
031
032  public static native void cancelVInCurrentCallback(int uid);
033
034  public static native double getVInCurrent();
035
036  public static native void setVInCurrent(double vInCurrent);
037
038  public static native int registerUserVoltage6VCallback(
039      NotifyCallback callback, boolean initialNotify);
040
041  public static native void cancelUserVoltage6VCallback(int uid);
042
043  public static native double getUserVoltage6V();
044
045  public static native void setUserVoltage6V(double userVoltage6V);
046
047  public static native int registerUserCurrent6VCallback(
048      NotifyCallback callback, boolean initialNotify);
049
050  public static native void cancelUserCurrent6VCallback(int uid);
051
052  public static native double getUserCurrent6V();
053
054  public static native void setUserCurrent6V(double userCurrent6V);
055
056  public static native int registerUserActive6VCallback(
057      NotifyCallback callback, boolean initialNotify);
058
059  public static native void cancelUserActive6VCallback(int uid);
060
061  public static native boolean getUserActive6V();
062
063  public static native void setUserActive6V(boolean userActive6V);
064
065  public static native int registerUserVoltage5VCallback(
066      NotifyCallback callback, boolean initialNotify);
067
068  public static native void cancelUserVoltage5VCallback(int uid);
069
070  public static native double getUserVoltage5V();
071
072  public static native void setUserVoltage5V(double userVoltage5V);
073
074  public static native int registerUserCurrent5VCallback(
075      NotifyCallback callback, boolean initialNotify);
076
077  public static native void cancelUserCurrent5VCallback(int uid);
078
079  public static native double getUserCurrent5V();
080
081  public static native void setUserCurrent5V(double userCurrent5V);
082
083  public static native int registerUserActive5VCallback(
084      NotifyCallback callback, boolean initialNotify);
085
086  public static native void cancelUserActive5VCallback(int uid);
087
088  public static native boolean getUserActive5V();
089
090  public static native void setUserActive5V(boolean userActive5V);
091
092  public static native int registerUserVoltage3V3Callback(
093      NotifyCallback callback, boolean initialNotify);
094
095  public static native void cancelUserVoltage3V3Callback(int uid);
096
097  public static native double getUserVoltage3V3();
098
099  public static native void setUserVoltage3V3(double userVoltage3V3);
100
101  public static native int registerUserCurrent3V3Callback(
102      NotifyCallback callback, boolean initialNotify);
103
104  public static native void cancelUserCurrent3V3Callback(int uid);
105
106  public static native double getUserCurrent3V3();
107
108  public static native void setUserCurrent3V3(double userCurrent3V3);
109
110  public static native int registerUserActive3V3Callback(
111      NotifyCallback callback, boolean initialNotify);
112
113  public static native void cancelUserActive3V3Callback(int uid);
114
115  public static native boolean getUserActive3V3();
116
117  public static native void setUserActive3V3(boolean userActive3V3);
118
119  public static native int registerUserFaults6VCallback(
120      NotifyCallback callback, boolean initialNotify);
121
122  public static native void cancelUserFaults6VCallback(int uid);
123
124  public static native int getUserFaults6V();
125
126  public static native void setUserFaults6V(int userFaults6V);
127
128  public static native int registerUserFaults5VCallback(
129      NotifyCallback callback, boolean initialNotify);
130
131  public static native void cancelUserFaults5VCallback(int uid);
132
133  public static native int getUserFaults5V();
134
135  public static native void setUserFaults5V(int userFaults5V);
136
137  public static native int registerUserFaults3V3Callback(
138      NotifyCallback callback, boolean initialNotify);
139
140  public static native void cancelUserFaults3V3Callback(int uid);
141
142  public static native int getUserFaults3V3();
143
144  public static native void setUserFaults3V3(int userFaults3V3);
145
146  public static native int registerBrownoutVoltageCallback(
147      NotifyCallback callback, boolean initialNotify);
148
149  public static native void cancelBrownoutVoltageCallback(int uid);
150
151  public static native double getBrownoutVoltage();
152
153  public static native void setBrownoutVoltage(double brownoutVoltage);
154
155  public static native int registerCPUTempCallback(NotifyCallback callback, boolean initialNotify);
156
157  public static native void cancelCPUTempCallback(int uid);
158
159  public static native double getCPUTemp();
160
161  public static native void setCPUTemp(double cpuTemp);
162
163  public static native int registerTeamNumberCallback(
164      NotifyCallback callback, boolean initialNotify);
165
166  public static native void cancelTeamNumberCallback(int uid);
167
168  public static native int getTeamNumber();
169
170  public static native void setTeamNumber(int teamNumber);
171
172  public static native String getSerialNumber();
173
174  public static native void setSerialNumber(String serialNumber);
175
176  public static native String getComments();
177
178  public static native void setComments(String comments);
179
180  public static native int registerRadioLEDStateCallback(
181      NotifyCallback callback, boolean initialNotify);
182
183  public static native void cancelRadioLEDStateCallback(int uid);
184
185  public static native int getRadioLEDState();
186
187  public static native void setRadioLEDState(int state);
188
189  public static native void resetData();
190
191  /** Utility class. */
192  private RoboRioDataJNI() {}
193}