Class DigitalInputEvent

public class DigitalInputEvent
extends DeviceEvent
Represents an input event from a digital device.
  • Constructor Details

    • DigitalInputEvent

      public DigitalInputEvent​(int gpio, long epochTime, long nanoTime, boolean value)
      Constructs an input event from a digital device. See (@link com.diozero.api.DeviceEvent} for first 3 parameters.
      gpio -
      epochTime -
      nanoTime -
      value - initial value
  • Method Details

    • getValue

      public boolean getValue()
      Returns the underlying GPIO state. Note does not compensate for active high / low.
      the physical digital pin state
    • isActive

      public boolean isActive()
      Determine if the event is active or not compensating for active high / low wiring
      if the event should be consider active or inactive
    • toString

      public String toString()
      toString in class Object