Class AbstractDigitalInputDevice

    • Field Detail

      • activeHigh

        protected boolean activeHigh
    • Constructor Detail

      • AbstractDigitalInputDevice

        public AbstractDigitalInputDevice​(int gpio,
                                          boolean activeHigh)
    • Method Detail

      • isActiveHigh

        public boolean isActiveHigh()
        Get active high configuration.
        Returns:
        Returns false if configured as pull-up, true for all other pull up / down options.
      • whenActivated

        public void whenActivated​(LongConsumer consumer)
        Action to perform when the device state is active.
        Parameters:
        consumer - Callback object to be invoked when activated (long parameter is nanoseconds time).
      • whenDeactivated

        public void whenDeactivated​(LongConsumer consumer)
        Action to perform when the device state is inactive.
        Parameters:
        consumer - Callback object to be invoked when activated (long parameter is nanoseconds time)
      • setListener

        protected abstract void setListener()
      • removeListener

        protected abstract void removeListener()