Class 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 Detail

      • NotifierJNI

        public NotifierJNI()
    • 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.