Class DigitalInputEvent

java.lang.Object
com.diozero.api.DeviceEvent
com.diozero.api.DigitalInputEvent

public class DigitalInputEvent
extends DeviceEvent
  • Constructor Summary

    Constructors 
    Constructor Description
    DigitalInputEvent​(int gpio, long epochTime, long nanoTime, boolean value)  
  • Method Summary

    Modifier and Type Method Description
    boolean getValue()
    Returns the underlying GPIO state.
    boolean isActive()  
    java.lang.String toString()  

    Methods inherited from class com.diozero.api.DeviceEvent

    getEpochTime, getGpio, getNanoTime

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DigitalInputEvent

      public DigitalInputEvent​(int gpio, long epochTime, long nanoTime, boolean value)
  • Method Details

    • getValue

      public boolean getValue()
      Returns the underlying GPIO state. Note does not compensate for different pull up/down logic.
      Returns:
      underlying digital pin state
    • isActive

      public boolean isActive()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object