Package edu.wpi.first.hal
Class DriverStationJNI
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.DriverStationJNI
public class DriverStationJNI extends JNIWrapper
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static int
kBlue1AllianceStation
static int
kBlue2AllianceStation
static int
kBlue3AllianceStation
static int
kMaxJoystickAxes
static int
kMaxJoystickPOVs
static int
kMaxJoysticks
static int
kRed1AllianceStation
static int
kRed2AllianceStation
static int
kRed3AllianceStation
-
Method Summary
Modifier and Type Method Description static AllianceStationID
getAllianceStation()
static void
getAllJoystickData(float[] axesArray, byte[] rawAxesArray, short[] povsArray, long[] buttonsAndMetadata)
static void
getControlWord(ControlWord controlWord)
static int
getJoystickAxes(byte joystickNum, float[] axesArray)
static int
getJoystickAxesRaw(byte joystickNum, int[] rawAxesArray)
static int
getJoystickAxisType(byte joystickNum, byte axis)
static int
getJoystickButtons(byte joystickNum, ByteBuffer count)
static int
getJoystickIsXbox(byte joystickNum)
static String
getJoystickName(byte joystickNum)
static int
getJoystickPOVs(byte joystickNum, short[] povsArray)
static int
getJoystickType(byte joystickNum)
static int
getMatchInfo(MatchInfoData info)
static double
getMatchTime()
static boolean
getOutputsActive()
static int
nativeGetControlWord()
static void
observeUserProgramAutonomous()
static void
observeUserProgramDisabled()
static void
observeUserProgramStarting()
static void
observeUserProgramTeleop()
static void
observeUserProgramTest()
static void
provideNewDataEventHandle(int handle)
static boolean
refreshDSData()
static void
removeNewDataEventHandle(int handle)
static void
report(int resource, int instanceNumber)
static void
report(int resource, int instanceNumber, int context)
static int
report(int resource, int instanceNumber, int context, String feature)
Report the usage of a resource of interest.static int
sendConsoleLine(String line)
static int
sendError(boolean isError, int errorCode, boolean isLVCode, String details, String location, String callStack, boolean printMsg)
static int
setJoystickOutputs(byte joystickNum, int outputs, short leftRumble, short rightRumble)
-
Field Details
-
kRed1AllianceStation
- See Also:
- Constant Field Values
-
kRed2AllianceStation
- See Also:
- Constant Field Values
-
kRed3AllianceStation
- See Also:
- Constant Field Values
-
kBlue1AllianceStation
- See Also:
- Constant Field Values
-
kBlue2AllianceStation
- See Also:
- Constant Field Values
-
kBlue3AllianceStation
- See Also:
- Constant Field Values
-
kMaxJoystickAxes
- See Also:
- Constant Field Values
-
kMaxJoystickPOVs
- See Also:
- Constant Field Values
-
kMaxJoysticks
- See Also:
- Constant Field Values
-
-
Method Details
-
observeUserProgramStarting
-
observeUserProgramDisabled
-
observeUserProgramAutonomous
-
observeUserProgramTeleop
-
observeUserProgramTest
-
report
-
report
-
report
Report the usage of a resource of interest.Original signature:
uint32_t report(tResourceType, uint8_t, uint8_t, const char*)
- Parameters:
resource
- one of the values in the tResourceType above (max value 51).instanceNumber
- an index that identifies the resource instance.context
- an optional additional context number for some cases (such as module number). Set to 0 to omit.feature
- a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string.- Returns:
- TODO
-
nativeGetControlWord
-
getControlWord
-
getAllianceStation
-
getJoystickAxes
-
getJoystickAxesRaw
-
getJoystickPOVs
-
getJoystickButtons
-
getAllJoystickData
public static void getAllJoystickData(float[] axesArray, byte[] rawAxesArray, short[] povsArray, long[] buttonsAndMetadata) -
setJoystickOutputs
public static int setJoystickOutputs(byte joystickNum, int outputs, short leftRumble, short rightRumble) -
getJoystickIsXbox
-
getJoystickType
-
getJoystickName
-
getJoystickAxisType
-
getMatchTime
-
getMatchInfo
-
sendError
-
sendConsoleLine
-
refreshDSData
-
provideNewDataEventHandle
-
removeNewDataEventHandle
-
getOutputsActive
-