Package edu.wpi.first.hal
Class HAL
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.HAL
public final class HAL extends JNIWrapper
JNI Wrapper for HAL
.
.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HAL.SimPeriodicAfterCallback
static class
HAL.SimPeriodicBeforeCallback
-
Method Summary
Modifier and Type Method Description static void
exitMain()
static boolean
getBrownedOut()
static int
getPort(byte channel)
static int
getPortWithModule(byte module, byte channel)
static boolean
getSystemActive()
static boolean
hasMain()
static boolean
initialize(int timeout, int mode)
static HAL.SimPeriodicAfterCallback
registerSimPeriodicAfterCallback(Runnable r)
Registers a callback to be run by IterativeRobotBase after the user's simulationPeriodic code.static HAL.SimPeriodicBeforeCallback
registerSimPeriodicBeforeCallback(Runnable r)
Registers a callback to be run by IterativeRobotBase prior to the user's simulationPeriodic code.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)
static void
runMain()
static void
shutdown()
static void
simPeriodicAfter()
Runs SimPeriodicAfter callbacks.static void
simPeriodicBefore()
Runs SimPeriodicBefore callbacks.
-
Method Details
-
initialize
-
shutdown
-
hasMain
-
runMain
-
exitMain
-
registerSimPeriodicBeforeCallback
Registers a callback to be run by IterativeRobotBase prior to the user's simulationPeriodic code.- Parameters:
r
- runnable- Returns:
- Callback object (must be retained for callback to stay active).
-
simPeriodicBefore
Runs SimPeriodicBefore callbacks. IterativeRobotBase calls this prior to the user's simulationPeriodic code. -
registerSimPeriodicAfterCallback
Registers a callback to be run by IterativeRobotBase after the user's simulationPeriodic code.- Parameters:
r
- runnable- Returns:
- Callback object (must be retained for callback to stay active).
-
simPeriodicAfter
Runs SimPeriodicAfter callbacks. IterativeRobotBase calls this after the user's simulationPeriodic code. -
getBrownedOut
-
getSystemActive
-
getPortWithModule
-
getPort
-
report
-
report
-
report
-