Package edu.wpi.first.hal
Class NotifierJNI
- java.lang.Object
-
- edu.wpi.first.hal.JNIWrapper
-
- edu.wpi.first.hal.NotifierJNI
-
public class NotifierJNI extends JNIWrapper
The NotifierJNI class directly wraps the C++ HAL Notifier.This class is not meant for direct use by teams. Instead, the edu.wpi.first.wpilibj.Notifier class, which corresponds to the C++ Notifier class, should be used.
-
-
Constructor Summary
Constructors Constructor Description NotifierJNI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cancelNotifierAlarm(int notifierHandle)
Cancels any pending wakeups set by updateNotifierAlarm().static void
cleanNotifier(int notifierHandle)
Deletes the notifier object when we are done with it.static int
initializeNotifier()
Initializes the notifier.static void
stopNotifier(int notifierHandle)
Wakes up the waiter with time=0.static void
updateNotifierAlarm(int notifierHandle, long triggerTime)
Sets the notifier to wakeup the waiter in another triggerTime microseconds.static long
waitForNotifierAlarm(int notifierHandle)
Block until woken up by an alarm (or stop).
-
-
-
Method Detail
-
initializeNotifier
public static int initializeNotifier()
Initializes the notifier.
-
stopNotifier
public static void stopNotifier(int notifierHandle)
Wakes up the waiter with time=0. Note: after this function is called, all calls to waitForNotifierAlarm() will immediately start returning 0.
-
cleanNotifier
public static void cleanNotifier(int notifierHandle)
Deletes the notifier object when we are done with it.
-
updateNotifierAlarm
public static void updateNotifierAlarm(int notifierHandle, long triggerTime)
Sets the notifier to wakeup the waiter in another triggerTime microseconds.
-
cancelNotifierAlarm
public static void cancelNotifierAlarm(int notifierHandle)
Cancels any pending wakeups set by updateNotifierAlarm(). Does NOT wake up any waiters.
-
waitForNotifierAlarm
public static long waitForNotifierAlarm(int notifierHandle)
Block until woken up by an alarm (or stop).- Returns:
- Time when woken up.
-
-