Package edu.wpi.first.hal
Class HALUtil
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.HALUtil
Hardware Abstraction Layer (HAL) Utilities JNI Functions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.hal.JNIWrapper
JNIWrapper.Helper -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAttempted to read AnalogTrigger pulse output.static final intThe operation cannot be completed.static final intDigital module loop timing is not the expected value.static final intNo available resources to allocate.static final intA pointer parameter to a method is NULL.static final intA parameter is out of range.static final introboRIO 1.0.static final introboRIO 2.0.static final intSimulation runtime.static final intSystemCore.static final intAnalog module sample rate is too high.static final intVoltage to convert to raw value is out of range [0; 5]. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the comments from the roboRIO web interface.static longReads the microsecond-resolution timer on the FPGA.static intGet the last HAL error code.static StringgetHALErrorMessage(int code) Gets the error message for a specific status code.static intReturns the runtime type of the HAL.static StringGets the error message for the last HAL error.static StringgetHALstrerror(int errno) Returns the textual description of the system error code.static StringReturns the roboRIO serial number.static intReturns the team number configured for the robot controller.Methods inherited from class edu.wpi.first.hal.JNIWrapper
forceLoad, suppressUnused
-
Field Details
-
NULL_PARAMETER
A pointer parameter to a method is NULL.- See Also:
-
SAMPLE_RATE_TOO_HIGH
Analog module sample rate is too high.- See Also:
-
VOLTAGE_OUT_OF_RANGE
Voltage to convert to raw value is out of range [0; 5].- See Also:
-
LOOP_TIMING_ERROR
Digital module loop timing is not the expected value.- See Also:
-
INCOMPATIBLE_STATE
The operation cannot be completed.- See Also:
-
ANALOG_TRIGGER_PULSE_OUTPUT_ERROR
Attempted to read AnalogTrigger pulse output.- See Also:
-
NO_AVAILABLE_RESOURCES
No available resources to allocate.- See Also:
-
PARAMETER_OUT_OF_RANGE
A parameter is out of range.- See Also:
-
RUNTIME_ROBORIO
roboRIO 1.0.- See Also:
-
RUNTIME_ROBORIO2
roboRIO 2.0.- See Also:
-
RUNTIME_SIMULATION
Simulation runtime.- See Also:
-
RUNTIME_SYSTEMCORE
SystemCore.- See Also:
-
-
Method Details
-
getSerialNumber
Returns the roboRIO serial number.- Returns:
- The roboRIO serial number.
- See Also:
-
getComments
Returns the comments from the roboRIO web interface.- Returns:
- The comments string.
- See Also:
-
getTeamNumber
Returns the team number configured for the robot controller.- Returns:
- team number, or 0 if not found.
- See Also:
-
getFPGATime
Reads the microsecond-resolution timer on the FPGA.- Returns:
- The current time in microseconds according to the FPGA (since FPGA reset).
-
getHALRuntimeType
Returns the runtime type of the HAL.- Returns:
- HAL Runtime Type
- See Also:
-
getHALErrorMessage
Gets the error message for a specific status code.- Parameters:
code- the status code- Returns:
- the error message for the code. This does not need to be freed.
- See Also:
-
getHALErrno
Get the last HAL error code.- Returns:
- error code
-
getHALstrerror
Returns the textual description of the system error code.- Parameters:
errno- errno to get description of- Returns:
- description of errno
- See Also:
-
getHALstrerror
Gets the error message for the last HAL error.- Returns:
- the error message for the code.
-