Class HALUtil
java.lang.Object
org.wpilib.hardware.hal.JNIWrapper
org.wpilib.hardware.hal.HALUtil
Hardware Abstraction Layer (HAL) Utilities JNI Functions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class JNIWrapper
JNIWrapper.Helper -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe operation cannot be completed.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 intSimulation runtime.static final intSystemcore runtime.static final intVoltage to convert to raw value is out of range [0; 5]. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the comments from the Systemcore web interface.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 longReads the nanosecond-resolution monotonic timer.static StringReturns the Systemcore serial number.static intReturns the team number configured for the robot controller.Methods inherited from class JNIWrapper
forceLoad, suppressUnused
-
Field Details
-
NULL_PARAMETER
public static final int NULL_PARAMETERA pointer parameter to a method is NULL.- See Also:
-
VOLTAGE_OUT_OF_RANGE
public static final int VOLTAGE_OUT_OF_RANGEVoltage to convert to raw value is out of range [0; 5].- See Also:
-
INCOMPATIBLE_STATE
public static final int INCOMPATIBLE_STATEThe operation cannot be completed.- See Also:
-
NO_AVAILABLE_RESOURCES
public static final int NO_AVAILABLE_RESOURCESNo available resources to allocate.- See Also:
-
PARAMETER_OUT_OF_RANGE
public static final int PARAMETER_OUT_OF_RANGEA parameter is out of range.- See Also:
-
RUNTIME_SYSTEMCORE
public static final int RUNTIME_SYSTEMCORESystemcore runtime.- See Also:
-
RUNTIME_SIMULATION
public static final int RUNTIME_SIMULATIONSimulation runtime.- See Also:
-
-
Method Details
-
getSerialNumber
Returns the Systemcore serial number.- Returns:
- The Systemcore serial number.
- See Also:
-
getComments
Returns the comments from the Systemcore web interface.- Returns:
- The comments string.
- See Also:
-
getTeamNumber
public static int getTeamNumber()Returns the team number configured for the robot controller.- Returns:
- team number, or 0 if not found.
- See Also:
-
getMonotonicTime
public static long getMonotonicTime()Reads the nanosecond-resolution monotonic timer.- Returns:
- The current monotonic time in nanoseconds.
-
getHALRuntimeType
public static int 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
public static int 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.
-