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