Class DeviceEvent

java.lang.Object
com.diozero.api.Event
com.diozero.api.DeviceEvent
Direct Known Subclasses:
AnalogInputEvent, DigitalInputEvent

public abstract class DeviceEvent
extends Event
Abstract class representing an event from a GPIO device.
  • Constructor Details

    • DeviceEvent

      public DeviceEvent​(int gpio, long epochTime, long nanoTime)
      Constructor for a device event.
      Parameters:
      gpio - GPIO pin
      epochTime - Unix epoch time: seconds elapsed since January 1, 1970 (midnight UTC/GMT), not counting leap seconds
      nanoTime - current value of the Java Virtual Machine's high-resolution time source, in nanoseconds
  • Method Details

    • getGpio

      public int getGpio()